Added encode/decode for Time_Synchronization_Recipients.
Added Send_TimeSync_Remote() which can use specific destination address. Added function prototypes for time sync master in the handlers.
This commit is contained in:
@@ -168,6 +168,10 @@ extern "C" {
|
||||
void Send_TimeSync(
|
||||
BACNET_DATE * bdate,
|
||||
BACNET_TIME * btime);
|
||||
void Send_TimeSync_Remote(
|
||||
BACNET_ADDRESS * dest,
|
||||
BACNET_DATE * bdate,
|
||||
BACNET_TIME * btime);
|
||||
void Send_TimeSyncUTC(
|
||||
BACNET_DATE * bdate,
|
||||
BACNET_TIME * btime);
|
||||
|
||||
@@ -176,15 +176,27 @@ extern "C" {
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src);
|
||||
|
||||
/* time synchronization handlers */
|
||||
void handler_timesync(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src);
|
||||
|
||||
void handler_timesync_utc(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src);
|
||||
/* time sync master features */
|
||||
int handler_timesync_encode_recipients(
|
||||
uint8_t * apdu,
|
||||
int max_apdu);
|
||||
void handler_timesync_task(void);
|
||||
void handler_timesync_init(void);
|
||||
bool handler_timesync_recipient_write(
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||
bool handler_timesync_interval_set(uint32_t minutes);
|
||||
bool handler_timesync_recipient_address_set(
|
||||
unsigned index,
|
||||
BACNET_ADDRESS *address);
|
||||
|
||||
void handler_read_property_multiple(
|
||||
uint8_t * service_request,
|
||||
|
||||
@@ -28,6 +28,23 @@
|
||||
#include <stdbool.h>
|
||||
#include "bacdef.h"
|
||||
|
||||
struct BACnet_Recipient_List;
|
||||
typedef struct BACnet_Recipient_List {
|
||||
/*
|
||||
BACnetRecipient ::= CHOICE {
|
||||
device [0] BACnetObjectIdentifier,
|
||||
address [1] BACnetAddress
|
||||
}
|
||||
*/
|
||||
uint8_t tag;
|
||||
union {
|
||||
BACNET_OBJECT_ID device;
|
||||
BACNET_ADDRESS address;
|
||||
} type;
|
||||
/* simple linked list */
|
||||
struct BACnet_Recipient_List *next;
|
||||
} BACNET_RECIPIENT_LIST;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
@@ -63,6 +80,15 @@ extern "C" {
|
||||
BACNET_DATE * my_date,
|
||||
BACNET_TIME * my_time);
|
||||
|
||||
int timesync_encode_timesync_recipients(
|
||||
uint8_t * apdu,
|
||||
unsigned max_apdu,
|
||||
BACNET_RECIPIENT_LIST *recipient);
|
||||
int timesync_decode_timesync_recipients(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
BACNET_RECIPIENT_LIST *recipient);
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
void testTimeSync(
|
||||
|
||||
Reference in New Issue
Block a user