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:
skarg
2013-02-20 23:54:11 +00:00
parent 209f9e82a2
commit 1c5d399a38
5 changed files with 350 additions and 7 deletions
+26
View File
@@ -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(