#endif #include "protocols/MeterW1therm.hpp" #ifdef OMS_SUPPORT #include "protocols/MeterOMS.hpp" #endif //#include <protocols/.h> #define METER_DETAIL(NAME, CLASSNAME, DESC, MAX_RDS, PERIODIC) { \ meter_protocol_##NAME, #NAME, DESC, MAX_RDS, PERIODIC/*, Meter##CLASSNAME */} int Meter::instances=0; static const meter_details_t protocols[] = { /* aliasdescriptionmax_rdsperiodic ===============================================================================================*/ METER_DETAIL(file, File, "Read from file or fifo",32,true), // METER_DETAIL(exec, "Parse program output",32,true), METER_DETAIL(random, Random, "Generate random values with a random walk",1,true), METER_DETAIL(fluksov2, Fluksov2, "Read from Flukso's onboard SPI fifo",16,false), METER_DETAIL(s0, S0, "S0-meter directly connected to RS232",2,false), METER_DETAIL(d0, D0, "DLMS/IEC 62056-21 plaintext protocol",400,false), #ifdef SML_SUPPORT METER_DETAIL(sml, Sml, "Smart Message Language as used by EDL-21, eHz and SyM²", 32,false), #endif // SML_SUPPORT #ifdef OCR_SUPPORT METER_DETAIL(ocr, OCR, "Image processing/recognizing meter", 32, false), // TODO periodic or not periodic? #endif METER_DETAIL(w1therm, W1therm, "W1-therm / 1wire temperature devices", 400, false), #ifdef OMS_SUPPORT METER_DETAIL(oms, OMS, "OMS (M-BUS) protocol based devices", 100, false), // todo what is the max. amount of reading according to spec? #endif
#include <protocols/MeterFile.hpp> #include <protocols/MeterFluksoV2.hpp> #include <protocols/MeterRandom.hpp> #include <protocols/MeterS0.hpp> #include <protocols/MeterSML.hpp> //#include <protocols/.h> #define METER_DETAIL(NAME, CLASSNAME, DESC, MAX_RDS, PERIODIC) { \ meter_protocol_##NAME, #NAME, DESC, MAX_RDS, PERIODIC/*, Meter##CLASSNAME */} int Meter::instances=0; static const meter_details_t protocols[] = { /* aliasdescriptionmax_rdsperiodic ===============================================================================================*/ METER_DETAIL(file, File, "Read from file or fifo",32,true), // METER_DETAIL(exec, "Parse program output",32,true), METER_DETAIL(random, Random, "Generate random values with a random walk",1,true), METER_DETAIL(fluksov2, Fluksov2, "Read from Flukso's onboard SPI fifo",16,false), METER_DETAIL(s0, S0, "S0-meter directly connected to RS232",2,false), METER_DETAIL(d0, D0, "DLMS/IEC 62056-21 plaintext protocol",400,false), #ifdef SML_SUPPORT METER_DETAIL(sml, Sml, "Smart Message Language as used by EDL-21, eHz and SyM²", 32,false), #endif /* SML_SUPPORT */ //{} /* stop condition for iterator */ METER_DETAIL(none, NULL,NULL, 0,false), }; Meter::Meter(std::list<Option> pOptions) : _name("meter") {