Refactored address decoding from demo command line function into address library.
This commit is contained in:
@@ -96,6 +96,15 @@ extern "C" {
|
||||
void address_cache_timer(
|
||||
uint16_t uSeconds);
|
||||
|
||||
void address_mac_init(
|
||||
BACNET_MAC_ADDRESS *mac,
|
||||
uint8_t *adr,
|
||||
uint8_t len);
|
||||
|
||||
bool address_mac_from_ascii(
|
||||
BACNET_MAC_ADDRESS *mac,
|
||||
char *arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -134,6 +134,12 @@ struct BACnet_Device_Address {
|
||||
uint8_t adr[MAX_MAC_LEN]; /* hwaddr (MAC) address */
|
||||
};
|
||||
typedef struct BACnet_Device_Address BACNET_ADDRESS;
|
||||
/* define a MAC address for manipulation */
|
||||
struct BACnet_MAC_Address {
|
||||
uint8_t len; /* length of MAC address */
|
||||
uint8_t adr[MAX_MAC_LEN];
|
||||
};
|
||||
typedef struct BACnet_MAC_Address BACNET_MAC_ADDRESS;
|
||||
|
||||
/* note: with microprocessors having lots more code space than memory,
|
||||
it might be better to have a packed encoding with a library to
|
||||
|
||||
Reference in New Issue
Block a user