29 #include "bacnetmstp.hpp"
88 typedef enum : uint32_t {
91 AV_CT_Ratio_Primary = 3,
92 AV_CT_Ratio_Secondary = 4,
94 AV_System_Voltage = 6,
96 AV_Phase_Loss_Voltage_Threshold = 8,
97 AV_Phase_Loss_Imbalance_Threshold = 9,
99 AV_Subinterval_Length = 11
103 typedef enum : uint32_t {
137 AI_KW_Present_Demand = 34,
138 AI_KVAR_Present_Demand = 35,
139 AI_KWA_Present_Demand = 36,
140 AI_KW_Max_Demand = 37,
141 AI_KVAR_Max_Demand = 38,
142 AI_KVA_Max_Demand = 39,
143 AI_Pulse_Count_1 = 40,
145 AI_Pulse_Count_2 = 41,
151 AI_Energy_Resets = 47,
153 AI_Power_Up_Count = 50,
154 AI_Output_Config = 51,
159 typedef enum : uint16_t {
160 ALARM_Volts_Error_A = 0x0001,
161 ALARM_Volts_Error_B = 0x0002,
162 ALARM_Volts_Error_C = 0x0004,
164 ALARM_Current_Error_A = 0x0008,
165 ALARM_Current_Error_B = 0x0010,
166 ALARM_Current_Error_C = 0x0020,
168 ALARM_Frequency_Error = 0x0040,
170 ALARM_Reserved_0 = 0x0080,
172 ALARM_Phase_Loss_A = 0x0100,
173 ALARM_Phase_Loss_B = 0x0200,
174 ALARM_Phase_Loss_C = 0x0400,
176 ALARM_Power_Factor_A = 0x0800,
177 ALARM_Power_Factor_B = 0x1000,
178 ALARM_Power_Factor_C = 0x2000,
180 ALARM_RTC_RESET = 0x4000
185 CFG_CLR_ENERGY_ACCUM = 30078,
187 CFG_RESET_MAX_TO_PRESENT = 21212,
188 CFG_CLEAR_PULSE_COUNTERS = 16498
193 SYSTYPE_SINGLE_PHASE_AN = 10,
194 SYSTYPE_SINGLE_PHASE_AB = 11,
195 SYSTYPE_SPLIT_PHASE_ABN = 12,
196 SYSTYPE_3PHASE_ABC = 31,
197 SYSTYPE_3PHASE_ABCN = 40
202 CT_RATIO_SECONDARY_1 = 1,
203 CT_RATIO_SECONDARY_3 = 3
217 const float RETURN_ERROR = -1.0;
218 const float RETURN_UNRELIABLE = -2.0;
232 E50HX(uint32_t targetDeviceObjectID);
268 void initMaster(std::string port,
int baudRate,
int deviceInstanceNumber,
269 int macAddr,
int maxMaster=DEFAULT_MAX_MASTER,
270 int maxInfoFrames=1);
458 m_checkReliability = enable;
569 uint32_t m_targetDeviceObjectID;
578 bool m_checkReliability;
581 typedef std::map<ANALOG_VALUES_T, std::string> avCacheMap_t;
582 avCacheMap_t m_avUnitCache;
585 typedef std::map<ANALOG_INPUTS_T, std::string> aiCacheMap_t;
586 aiCacheMap_t m_aiUnitCache;
UPM API for BACNETMSTP.
Definition: bacnetmstp.hpp:103
bool writeSystemVoltage(float sysVolts)
Definition: e50hx.cxx:466
UPM API for the Veris E50HX Energy Meter.
Definition: e50hx.hpp:84
std::string getAllErrorString()
Definition: e50hx.cxx:275
~E50HX()
Definition: e50hx.cxx:62
BACNET_ERROR_CLASS getErrorClass()
Definition: e50hx.cxx:254
void checkReliability(bool enable)
Definition: e50hx.hpp:456
void initMaster(std::string port, int baudRate, int deviceInstanceNumber, int macAddr, int maxMaster=DEFAULT_MAX_MASTER, int maxInfoFrames=1)
Definition: e50hx.cxx:66
bool writePhaseLossVT(float phaseLoss)
Definition: e50hx.cxx:514
bool writeDisplayUnits(DISP_UNITS_T dispUnits)
Definition: e50hx.cxx:493
float getAnalogInput(ANALOG_INPUTS_T objInstance)
Definition: e50hx.cxx:159
bool writePTRatio(float ptRatio)
Definition: e50hx.cxx:439
uint8_t getRejectReason()
Definition: e50hx.cxx:234
void setDebug(bool enable)
Definition: e50hx.cxx:85
std::string getAbortString()
Definition: e50hx.cxx:249
bool writeConfig(CFG_VALUES_T config)
Definition: e50hx.cxx:351
BACNETMSTP::BACERR_TYPE_T getErrorType()
Definition: e50hx.cxx:229
std::string getUPMErrorString()
Definition: e50hx.cxx:264
bool writeCTRatioPrimary(float ctRatio)
Definition: e50hx.cxx:391
BACNET_ERROR_CODE getErrorCode()
Definition: e50hx.cxx:259
bool writePhaseLossIT(float phaseLoss)
Definition: e50hx.cxx:541
std::string getErrorString()
Definition: e50hx.cxx:269
std::string getLocation()
Definition: e50hx.cxx:316
bool setLocation(std::string location)
Definition: e50hx.cxx:331
std::string getRejectString()
Definition: e50hx.cxx:239
bool writeSystemType(SYSTEM_TYPES_T systype)
Definition: e50hx.cxx:371
uint16_t getAlarmBits()
Definition: e50hx.cxx:224
std::string getAnalogInputUnits(ANALOG_INPUTS_T objInstance)
Definition: e50hx.cxx:199
bool writeCTRatioSecondary(CT_SECONDARY_T ctRatio)
Definition: e50hx.cxx:418
E50HX(uint32_t targetDeviceObjectID)
Definition: e50hx.cxx:38
std::string getAnalogValueUnits(ANALOG_VALUES_T objInstance)
Definition: e50hx.cxx:134
std::string getDescription()
Definition: e50hx.cxx:301
float getAnalogValue(ANALOG_VALUES_T objInstance)
Definition: e50hx.cxx:93
uint8_t getAbortReason()
Definition: e50hx.cxx:244