30 #ifndef FIRMWARE_SRC_RDM_UTIL_H_
31 #define FIRMWARE_SRC_RDM_UTIL_H_
51 return memcmp(uid1, uid2, UID_LENGTH);
66 const uint8_t uid[UID_LENGTH]);
76 bool RDMUtil_IsUnicast(
const uint8_t uid[UID_LENGTH]);
110 const char *src,
unsigned int max_size);
142 #endif // FIRMWARE_SRC_RDM_UTIL_H_
unsigned int RDMUtil_SafeStringLength(const char *str, unsigned int max_size)
Calculate the size of the string, but never scan beyond max_size.
bool RDMUtil_VerifyChecksum(const uint8_t *frame, unsigned int size)
Verify the checksum of an RDM frame.
Remote Device Management.
void RDMUtil_UpdateSensor(SensorData *sensor, uint8_t recorded_value_support, int16_t new_value)
Update the value of a sensor, setting the lowest / highest values if appropriate. ...
Data for an RDM Sensor.
Definition: rdm_responder.h:213
static int RDMUtil_UIDCompare(const uint8_t *uid1, const uint8_t *uid2)
Compare two UIDs.
Definition: rdm_util.h:50
unsigned int RDMUtil_StringCopy(char *dst, unsigned int dest_size, const char *src, unsigned int max_size)
Copy a string from one location to another.
int RDMUtil_AppendChecksum(uint8_t *frame)
Append the RDM checksum for a frame.
bool RDMUtil_RequiresAction(const uint8_t our_uid[UID_LENGTH], const uint8_t uid[UID_LENGTH])
Check if a RDM request sent to a UID requires us to take action.