27 #include "lwpa_bool.h"
66 #define cidcmp(cid1ptr, cid2ptr) memcmp((cid1ptr)->data, (cid2ptr)->data, CID_BYTES)
78 #define cid_isnull(cidptr) (memcmp((cidptr)->data, NULL_CID.data, CID_BYTES) == 0)
82 #define CID_STRING_BYTES 37
89 void generate_cid(
LwpaCid *cid,
const char *devstr,
const uint8_t *macaddr, uint32_t cidnum);
bool string_to_cid(LwpaCid *cid, const char *buf, size_t buflen)
Create a CID from a string representation.
Definition: lwpa_cid.c:63
const LwpaCid NULL_CID
A null (all 0's) CID, used by cid_isnull() for comparison.
Definition: lwpa_cid.c:31
void generate_cid(LwpaCid *cid, const char *devstr, const uint8_t *macaddr, uint32_t cidnum)
Generate a CID from a combination of a custom string and MAC address.
Definition: lwpa_cid.c:141
void generate_rdm_cid(LwpaCid *cid, const uint8_t *rdmuid)
Generate a CID from an RDM UID.
Definition: lwpa_cid.c:182
void cid_to_string(char *buf, const LwpaCid *cid)
Create a string representation of a CID.
Definition: lwpa_cid.c:44
#define CID_BYTES
The number of bytes that make up a CID.
Definition: lwpa_cid.h:50
struct LwpaCid LwpaCid
The CID type.
The CID type.
Definition: lwpa_cid.h:55