111 BACERR_TYPE_NONE = 0,
121 BACCMD_READ_PROPERTY,
122 BACCMD_WRITE_PROPERTY
163 void initMaster(std::string port,
int baudRate,
int deviceInstanceNumber,
164 int macAddr,
int maxMaster=DEFAULT_MAX_MASTER,
165 int maxInfoFrames=1);
193 BACNET_OBJECT_TYPE objType,
194 uint32_t objInstance,
195 BACNET_PROPERTY_ID objProperty,
196 uint32_t arrayIndex=BACNET_ARRAY_ALL);
232 BACNET_OBJECT_TYPE objType,
233 uint32_t objInstance,
234 BACNET_PROPERTY_ID objProperty,
235 BACNET_APPLICATION_DATA_VALUE* propValue,
236 uint8_t propPriority=BACNET_NO_PRIORITY,
237 int32_t arrayIndex=BACNET_ARRAY_ALL);
249 BACNET_APPLICATION_DATA_VALUE
getData(
int index=0);
349 #if defined(BACAPP_DOUBLE) 361 double getDataTypeDouble(
int index=0);
362 #endif // BACAPP_DOUBLE 452 return m_rejectReason;
462 return m_rejectString;
472 return m_abortReason;
482 return m_abortString;
513 return m_errorString;
524 return m_upmErrorString;
535 return m_initialized;
556 return m_deviceInstanceID;
566 return m_maxInfoFrames;
621 static void handlerError(BACNET_ADDRESS * src,
623 BACNET_ERROR_CLASS error_class,
624 BACNET_ERROR_CODE error_code);
627 static void handlerAbort(BACNET_ADDRESS * src,
629 uint8_t abort_reason,
633 static void handlerReject(BACNET_ADDRESS * src,
635 uint8_t reject_reason);
639 static void handlerReadPropertyAck(uint8_t* service_request,
640 uint16_t service_len,
642 BACNET_CONFIRMED_SERVICE_ACK_DATA* service_data);
645 static void handlerWritePropertyAck(BACNET_ADDRESS* src,
649 void initServiceHandlers();
652 std::string string2HexString(std::string input);
655 bool dispatchRequest();
676 uint32_t m_deviceInstanceID;
679 uint16_t m_adpuTimeoutMS;
682 uint8_t m_rxBuffer[MAX_MPDU];
685 BACERR_TYPE_T m_errorType;
688 uint8_t m_rejectReason;
689 std::string m_rejectString;
692 uint8_t m_abortReason;
693 std::string m_abortString;
696 BACNET_ERROR_CLASS m_errorClass;
697 BACNET_ERROR_CODE m_errorCode;
698 std::string m_errorString;
702 std::string m_upmErrorString;
705 std::vector<BACNET_APPLICATION_DATA_VALUE> m_returnedValue;
709 BACNET_ADDRESS m_targetAddress;
715 bool m_errorDetected;
726 uint32_t targetDeviceInstanceID;
727 BACNET_OBJECT_TYPE objType;
728 uint32_t objInstance;
729 BACNET_PROPERTY_ID objProperty;
731 } READ_PROPERTY_ARGS_T;
734 uint32_t targetDeviceInstanceID;
735 BACNET_OBJECT_TYPE objType;
736 uint32_t objInstance;
737 BACNET_PROPERTY_ID objProperty;
738 BACNET_APPLICATION_DATA_VALUE* propValue;
739 uint8_t propPriority;
741 } WRITE_PROPERTY_ARGS_T;
747 READ_PROPERTY_ARGS_T readPropArgs;
748 WRITE_PROPERTY_ARGS_T writePropArgs;
UPM API for BACNETMSTP.
Definition: bacnetmstp.hpp:104
int getMaxInfoFrames()
Definition: bacnetmstp.hpp:564
std::string getErrorString()
Definition: bacnetmstp.hpp:511
std::string getUPMErrorString()
Definition: bacnetmstp.hpp:522
std::string getDataTypeString(int index=0)
Definition: bacnetmstp.cxx:767
std::string getRejectString()
Definition: bacnetmstp.hpp:460
int getDataTypeSignedInt(int index=0)
Definition: bacnetmstp.cxx:714
uint32_t getDeviceInstanceID()
Definition: bacnetmstp.hpp:554
void setDebug(bool enable)
Definition: bacnetmstp.cxx:75
bool getDataTypeBoolean(int index=0)
Definition: bacnetmstp.cxx:692
static BACNETMSTP * instance()
Definition: bacnetmstp.cxx:280
bool isInitialized()
Definition: bacnetmstp.hpp:533
uint8_t getDataType(int index=0)
Definition: bacnetmstp.cxx:660
BACERR_TYPE_T getErrorType()
Definition: bacnetmstp.hpp:440
uint8_t getAbortReason()
Definition: bacnetmstp.hpp:470
float getDataTypeReal(int index=0)
Definition: bacnetmstp.cxx:665
BACNET_APPLICATION_DATA_VALUE createDataEnum(uint32_t value)
Definition: bacnetmstp.cxx:911
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
unsigned int getDataTypeUnsignedInt(int index=0)
Definition: bacnetmstp.cxx:703
BACNET_APPLICATION_DATA_VALUE createDataUnsignedInt(unsigned int value)
Definition: bacnetmstp.cxx:878
BACNET_APPLICATION_DATA_VALUE getData(int index=0)
Definition: bacnetmstp.cxx:650
int getDataNumElements()
Definition: bacnetmstp.cxx:655
BACNET_APPLICATION_DATA_VALUE createDataSignedInt(int value)
Definition: bacnetmstp.cxx:866
int getMaxMaster()
Definition: bacnetmstp.hpp:574
BACNET_APPLICATION_DATA_VALUE createDataString(std::string value)
Definition: bacnetmstp.cxx:890
std::string getPort()
Definition: bacnetmstp.hpp:543
bool readProperty(uint32_t targetDeviceInstanceID, BACNET_OBJECT_TYPE objType, uint32_t objInstance, BACNET_PROPERTY_ID objProperty, uint32_t arrayIndex=BACNET_ARRAY_ALL)
Definition: bacnetmstp.cxx:578
unsigned int getDataTypeEnum(int index=0)
Definition: bacnetmstp.cxx:756
std::string getAbortString()
Definition: bacnetmstp.hpp:480
BACNET_ERROR_CODE getErrorCode()
Definition: bacnetmstp.hpp:500
BACNET_APPLICATION_DATA_VALUE createDataReal(float Real)
Definition: bacnetmstp.cxx:842
~BACNETMSTP()
Definition: bacnetmstp.cxx:69
uint8_t getRejectReason()
Definition: bacnetmstp.hpp:450
BACNET_ERROR_CLASS getErrorClass()
Definition: bacnetmstp.hpp:490
void initMaster(std::string port, int baudRate, int deviceInstanceNumber, int macAddr, int maxMaster=DEFAULT_MAX_MASTER, int maxInfoFrames=1)
Definition: bacnetmstp.cxx:288
int getBaudRate()
Definition: bacnetmstp.hpp:584
BACNET_APPLICATION_DATA_VALUE createDataBool(bool value)
Definition: bacnetmstp.cxx:854
bool writeProperty(uint32_t targetDeviceInstanceID, BACNET_OBJECT_TYPE objType, uint32_t objInstance, BACNET_PROPERTY_ID objProperty, BACNET_APPLICATION_DATA_VALUE *propValue, uint8_t propPriority=BACNET_NO_PRIORITY, int32_t arrayIndex=BACNET_ARRAY_ALL)
Definition: bacnetmstp.cxx:612
int getMACAddress()
Definition: bacnetmstp.hpp:594
BACNETMSTP()
Definition: bacnetmstp.cxx:44