Changing handlers to register objects so that handlers can remain unchanged. In Progress!
This commit is contained in:
@@ -73,6 +73,10 @@ extern "C" {
|
||||
BACNET_ADDRESS * src,
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
||||
|
||||
void handler_read_property_object_set(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
read_property_function pFunction);
|
||||
|
||||
void handler_read_property_ack(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
@@ -84,6 +88,10 @@ extern "C" {
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src,
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
||||
|
||||
void handler_write_property_object_set(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
write_property_function pFunction);
|
||||
|
||||
void handler_atomic_read_file(
|
||||
uint8_t * service_request,
|
||||
|
||||
@@ -46,6 +46,13 @@ typedef struct BACnet_Read_Property_Data {
|
||||
int application_data_len;
|
||||
} BACNET_READ_PROPERTY_DATA;
|
||||
|
||||
typedef int (*read_property_function) (
|
||||
uint8_t * apdu,
|
||||
BACNET_PROPERTY_ID property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
BACNET_ERROR_CODE * error_code);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -53,17 +53,23 @@ typedef struct BACnet_Write_Property_Data {
|
||||
uint8_t priority; /* use BACNET_NO_PRIORITY if no priority */
|
||||
} BACNET_WRITE_PROPERTY_DATA;
|
||||
|
||||
typedef bool (*write_property_function) (
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data,
|
||||
uint8_t * service_request,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
BACNET_ERROR_CODE * error_code);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* encode service */
|
||||
|
||||
/* encode service */
|
||||
int wp_encode_apdu(
|
||||
uint8_t * apdu,
|
||||
uint8_t invoke_id,
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||
|
||||
/* decode the service request only */
|
||||
/* decode the service request only */
|
||||
int wp_decode_service_request(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
|
||||
Reference in New Issue
Block a user