RDMnet  0.3.0
Implementation of ANSI E1.33 (RDMnet)
View other versions:
Common Definitions

Overview

Definitions shared by other APIs in this module.

Data Structures

struct  RdmnetSourceAddr
 The source address for an unsolicited RDM response generated by a local component. More...
 
struct  RdmnetDestinationAddr
 A destination address for an RDM command in RDMnet's RPT protocol. More...
 
struct  RdmnetClientConnectedInfo
 Information provided by the library about a successful RDMnet client connection. More...
 
struct  RdmnetClientConnectFailedInfo
 Information provided by the library about an unsuccessful RDMnet client connection. More...
 
struct  RdmnetClientDisconnectedInfo
 Information provided by the library about an RDMnet client connection that disconnected after a successful connection. More...
 
struct  RdmnetScopeConfig
 A set of configuration information for a single scope in which an RDMnet client is participating. More...
 
struct  RdmnetSyncRdmResponse
 This structure should not be manipulated directly - use the macros to access it: More...
 
struct  RdmnetSyncEptResponse
 This structure should not be manipulated directly - use the macros to access it: More...
 
struct  RdmnetMcastNetintId
 A set of identifying information for a network interface, for multicast purposes. More...
 
struct  RdmnetNetintConfig
 Network interface configuration information to give the RDMnet library at initialization. More...
 
struct  LlrpDestinationAddr
 A destination address for an RDM command in LLRP. More...
 
struct  LlrpDiscoveredTarget
 A set of information associated with an LLRP Target. More...
 
struct  RdmnetRdmCommand
 An RDMnet RDM command received by this component. More...
 
struct  RdmnetSavedRdmCommand
 An RDM command received by this component and saved for a later response. More...
 
struct  RdmnetRdmResponse
 An RDMnet RDM response received by a local component. More...
 
struct  RdmnetSavedRdmResponse
 An RDM response received over RDMnet and saved for later processing. More...
 
struct  RdmnetRptStatus
 An RDMnet RPT status message received by a local component. More...
 
struct  RdmnetSavedRptStatus
 An RPT status received over RDMnet and saved for later processing. More...
 
struct  RdmnetDynamicUidMapping
 A mapping from a dynamic UID to a responder ID (RID). More...
 
struct  RdmnetDynamicUidAssignmentList
 A list of mappings from dynamic UIDs to responder IDs received from an RDMnet broker. More...
 
struct  RdmnetEptData
 An RDMnet EPT data message received by a local component. More...
 
struct  RdmnetSavedEptData
 An EPT data message received over RDMnet and saved for later processing. More...
 
struct  RdmnetEptStatus
 An RDMnet EPT status message received by a local component. More...
 
struct  RdmnetSavedEptStatus
 An EPT status received over RDMnet and saved for later processing. More...
 
struct  RdmnetRptClientEntry
 A descriptive structure for an RPT client. More...
 
struct  RdmnetEptSubProtocol
 A description of an EPT sub-protocol. More...
 
struct  RdmnetEptClientEntry
 A descriptive structure for an EPT client. More...
 
struct  RdmnetRptClientList
 A structure that represents a list of RPT Client Entries. More...
 
struct  RdmnetEptClientList
 A structure that represents a list of EPT Client Entries. More...
 
struct  LlrpRdmCommand
 An RDM command received from a remote LLRP Manager. More...
 
struct  LlrpSavedRdmCommand
 An RDM command received from a remote LLRP Manager. More...
 
struct  LlrpRdmResponse
 An RDM response received from a remote LLRP Target. More...
 
struct  LlrpSavedRdmResponse
 An RDM command received from a remote LLRP Manager. More...
 

Macros

#define RDMNET_CLIENT_SCOPE_INVALID   -1
 An invalid RDMnet client scope handle value.
 
#define RDMNET_ADDR_TO_DEFAULT_RESPONDER(manu_id, dev_id)
 Initialize an RdmnetDestinationAddr with a default responder address. More...
 
#define RDMNET_ADDR_TO_DEFAULT_RESPONDER_SUBDEV(manu_id, dev_id, subdevice)
 Initialize an RdmnetDestinationAddr with the address of a subdevice on a default responder. More...
 
#define RDMNET_ADDR_TO_SUB_RESPONDER(rdmnet_manu, rdmnet_dev, endpoint, rdm_manu, rdm_dev)
 Initialize an RdmnetDestinationAddr with the address of a sub-responder on a component. More...
 
#define RDMNET_ADDR_TO_SUB_RESPONDER_SUBDEV(rdmnet_manu, rdmnet_dev, endpoint, rdm_manu, rdm_dev, subdevice)
 Initialize an RdmnetDestinationAddr with the address of a subdevice on a sub-responder. More...
 
#define RDMNET_SCOPE_CONFIG_DEFAULT_INIT
 A default-value initializer for an RdmnetScopeConfig struct. More...
 
#define RDMNET_CLIENT_SET_SCOPE(configptr, scope_str)
 Initialize an RdmnetScopeConfig struct with a scope string. More...
 
#define RDMNET_CLIENT_SET_DEFAULT_SCOPE(configptr)
 Initialize an RdmnetScopeConfig struct with the default RDMnet scope. More...
 
#define RDMNET_CLIENT_SET_STATIC_SCOPE(configptr, scope_str, broker_addr)
 Initialize an RdmnetScopeConfig struct with a scope string and static broker address. More...
 
#define RDMNET_CLIENT_SET_STATIC_DEFAULT_SCOPE(configptr, broker_addr)
 Initialize an RdmnetScopeConfig struct with the default RDMnet scope and a static broker address. More...
 
#define RDMNET_SYNC_SEND_RDM_ACK(response_ptr, response_data_len_in)
 Indicate that an RDM ACK should be sent when this callback returns. More...
 
#define RDMNET_SYNC_SEND_RDM_NACK(response_ptr, nack_reason_in)
 Indicate that an RDM NACK should be sent when this callback returns. More...
 
#define RDMNET_SYNC_DEFER_RDM_RESPONSE(response_ptr)   ((response_ptr)->response_action = kRdmnetRdmResponseActionDefer)
 Defer the RDM response to be sent later from another context. More...
 
#define RDMNET_SYNC_SEND_EPT_DATA(response_ptr, response_data_len_in)
 Indicate that an EPT data message should be sent when this callback returns. More...
 
#define RDMNET_SYNC_SEND_EPT_STATUS(response_ptr, status_code_in)
 Indicate that an EPT status message should be sent when this callback returns. More...
 
#define RDMNET_SYNC_DEFER_EPT_RESPONSE(response_ptr)   ((response_ptr)->response_action = kRdmnetEptResponseActionDefer)
 Defer the response to the EPT message, either to be sent later or because no response is necessary. More...
 

Typedefs

typedef int rdmnet_client_scope_t
 A handle to a scope that an RDMnet client participates in.
 
typedef struct RdmnetSourceAddr RdmnetSourceAddr
 The source address for an unsolicited RDM response generated by a local component. More...
 
typedef struct RdmnetDestinationAddr RdmnetDestinationAddr
 A destination address for an RDM command in RDMnet's RPT protocol. More...
 
typedef struct RdmnetClientConnectedInfo RdmnetClientConnectedInfo
 Information provided by the library about a successful RDMnet client connection.
 
typedef struct RdmnetClientConnectFailedInfo RdmnetClientConnectFailedInfo
 Information provided by the library about an unsuccessful RDMnet client connection.
 
typedef struct RdmnetClientDisconnectedInfo RdmnetClientDisconnectedInfo
 Information provided by the library about an RDMnet client connection that disconnected after a successful connection.
 
typedef struct RdmnetScopeConfig RdmnetScopeConfig
 A set of configuration information for a single scope in which an RDMnet client is participating.
 
typedef struct RdmnetSyncRdmResponse RdmnetSyncRdmResponse
 This structure should not be manipulated directly - use the macros to access it: More...
 
typedef struct RdmnetSyncEptResponse RdmnetSyncEptResponse
 This structure should not be manipulated directly - use the macros to access it: More...
 
typedef struct RdmnetMcastNetintId RdmnetMcastNetintId
 A set of identifying information for a network interface, for multicast purposes. More...
 
typedef struct RdmnetNetintConfig RdmnetNetintConfig
 Network interface configuration information to give the RDMnet library at initialization. More...
 
typedef struct LlrpDestinationAddr LlrpDestinationAddr
 A destination address for an RDM command in LLRP. More...
 
typedef struct LlrpDiscoveredTarget LlrpDiscoveredTarget
 A set of information associated with an LLRP Target.
 

Enumerations

enum  client_list_action_t {
  kRdmnetClientListAppend = VECTOR_BROKER_CLIENT_ADD ,
  kRdmnetClientListRemove = VECTOR_BROKER_CLIENT_REMOVE ,
  kRdmnetClientListUpdate = VECTOR_BROKER_CLIENT_ENTRY_CHANGE ,
  kRdmnetClientListReplace = VECTOR_BROKER_CONNECTED_CLIENT_LIST
}
 How to apply the client entries to the existing client list in a client_list_update_received callback. More...
 
enum  rpt_status_code_t {
  kRptStatusUnknownRptUid = VECTOR_RPT_STATUS_UNKNOWN_RPT_UID ,
  kRptStatusRdmTimeout = VECTOR_RPT_STATUS_RDM_TIMEOUT ,
  kRptStatusInvalidRdmResponse = VECTOR_RPT_STATUS_RDM_INVALID_RESPONSE ,
  kRptStatusUnknownRdmUid = VECTOR_RPT_STATUS_UNKNOWN_RDM_UID ,
  kRptStatusUnknownEndpoint = VECTOR_RPT_STATUS_UNKNOWN_ENDPOINT ,
  kRptStatusBroadcastComplete = VECTOR_RPT_STATUS_BROADCAST_COMPLETE ,
  kRptStatusUnknownVector = VECTOR_RPT_STATUS_UNKNOWN_VECTOR ,
  kRptStatusInvalidMessage = VECTOR_RPT_STATUS_INVALID_MESSAGE ,
  kRptStatusInvalidCommandClass = VECTOR_RPT_STATUS_INVALID_COMMAND_CLASS
}
 RPT status code definitions. More...
 
enum  ept_status_code_t {
  kEptStatusUnknownCid = VECTOR_EPT_STATUS_UNKNOWN_CID ,
  kEptStatusUnknownVector = VECTOR_EPT_STATUS_UNKNOWN_VECTOR
}
 EPT status code definitions. More...
 
enum  rdmnet_disconnect_reason_t {
  kRdmnetDisconnectShutdown = E133_DISCONNECT_SHUTDOWN ,
  kRdmnetDisconnectCapacityExhausted = E133_DISCONNECT_CAPACITY_EXHAUSTED ,
  kRdmnetDisconnectHardwareFault = E133_DISCONNECT_HARDWARE_FAULT ,
  kRdmnetDisconnectSoftwareFault = E133_DISCONNECT_SOFTWARE_FAULT ,
  kRdmnetDisconnectSoftwareReset = E133_DISCONNECT_SOFTWARE_RESET ,
  kRdmnetDisconnectIncorrectScope = E133_DISCONNECT_INCORRECT_SCOPE ,
  kRdmnetDisconnectRptReconfigure = E133_DISCONNECT_RPT_RECONFIGURE ,
  kRdmnetDisconnectLlrpReconfigure = E133_DISCONNECT_LLRP_RECONFIGURE ,
  kRdmnetDisconnectUserReconfigure = E133_DISCONNECT_USER_RECONFIGURE
}
 Disconnect reason defines for the BrokerDisconnectMsg. More...
 
enum  rdmnet_connect_status_t {
  kRdmnetConnectOk = E133_CONNECT_OK ,
  kRdmnetConnectScopeMismatch = E133_CONNECT_SCOPE_MISMATCH ,
  kRdmnetConnectCapacityExceeded = E133_CONNECT_CAPACITY_EXCEEDED ,
  kRdmnetConnectDuplicateUid = E133_CONNECT_DUPLICATE_UID ,
  kRdmnetConnectInvalidClientEntry = E133_CONNECT_INVALID_CLIENT_ENTRY ,
  kRdmnetConnectInvalidUid = E133_CONNECT_INVALID_UID
}
 Connect status defines for the BrokerConnectReplyMsg. More...
 
enum  rdmnet_dynamic_uid_status_t {
  kRdmnetDynamicUidStatusOk = E133_DYNAMIC_UID_STATUS_OK ,
  kRdmnetDynamicUidStatusInvalidRequest = E133_DYNAMIC_UID_STATUS_INVALID_REQUEST ,
  kRdmnetDynamicUidStatusUidNotFound = E133_DYNAMIC_UID_STATUS_UID_NOT_FOUND ,
  kRdmnetDynamicUidStatusDuplicateRid = E133_DYNAMIC_UID_STATUS_DUPLICATE_RID ,
  kRdmnetDynamicUidStatusCapacityExhausted = E133_DYNAMIC_UID_STATUS_CAPACITY_EXHAUSTED
}
 Dynamic UID Status Codes for the BrokerDynamicUidMapping struct. More...
 
enum  rdmnet_connect_fail_event_t {
  kRdmnetConnectFailSocketFailure ,
  kRdmnetConnectFailTcpLevel ,
  kRdmnetConnectFailNoReply ,
  kRdmnetConnectFailRejected
}
 A high-level reason for RDMnet connection failure. More...
 
enum  rdmnet_disconnect_event_t {
  kRdmnetDisconnectAbruptClose ,
  kRdmnetDisconnectNoHeartbeat ,
  kRdmnetDisconnectRedirected ,
  kRdmnetDisconnectGracefulRemoteInitiated ,
  kRdmnetDisconnectGracefulLocalInitiated
}
 A high-level reason for RDMnet connection to be disconnected after successful connection. More...
 
enum  rdmnet_rdm_response_action_t {
  kRdmnetRdmResponseActionSendAck ,
  kRdmnetRdmResponseActionSendNack ,
  kRdmnetRdmResponseActionDefer
}
 Enumeration representing an action to take after an "RDM command received" callback completes. More...
 
enum  rdmnet_ept_response_action_t {
  kRdmnetEptResponseActionSendData ,
  kRdmnetEptResponseActionSendStatus ,
  kRdmnetEptResponseActionDefer
}
 Enumeration representing an action to take after an "EPT data received" callback completes. More...
 
enum  rdmnet_command_class_t {
  kRdmnetCCGetCommand = 0x20 ,
  kRdmnetCCSetCommand = 0x30
}
 An RDM command class, for RDMnet purposes. More...
 
enum  llrp_component_t {
  kLlrpCompRptDevice = LLRP_COMPONENT_TYPE_RPT_DEVICE ,
  kLlrpCompRptController = LLRP_COMPONENT_TYPE_RPT_CONTROLLER ,
  kLlrpCompBroker = LLRP_COMPONENT_TYPE_BROKER ,
  kLlrpCompNonRdmnet = LLRP_COMPONENT_TYPE_NONRDMNET
}
 Identifies the type of RPT Component with which an LLRP Target is associated. More...
 

Functions

etcpal_error_t rdmnet_init (const EtcPalLogParams *log_params, const RdmnetNetintConfig *netint_config)
 Initialize the RDMnet library. More...
 
void rdmnet_deinit (void)
 Deinitialize the RDMnet library. More...
 
const char * rdmnet_rpt_status_code_to_string (rpt_status_code_t code)
 Get a string representation of an RPT status code.
 
const char * rdmnet_ept_status_code_to_string (ept_status_code_t code)
 Get a string representation of an EPT status code.
 
const char * rdmnet_connect_fail_event_to_string (rdmnet_connect_fail_event_t event)
 Get a string description of an RDMnet connection failure event. More...
 
const char * rdmnet_disconnect_event_to_string (rdmnet_disconnect_event_t event)
 Get a string description of an RDMnet disconnect event. More...
 
const char * rdmnet_connect_status_to_string (rdmnet_connect_status_t code)
 Get a string description of an RDMnet connect status code. More...
 
const char * rdmnet_disconnect_reason_to_string (rdmnet_disconnect_reason_t code)
 Get a string description of an RDMnet disconnect reason code. More...
 
const char * rdmnet_dynamic_uid_status_to_string (rdmnet_dynamic_uid_status_t code)
 Get a string description of an RDMnet Dynamic UID status code. More...
 
const char * llrp_component_type_to_string (llrp_component_t type)
 Get a string description of an LLRP component type. More...
 
const char * rdmnet_rpt_client_type_to_string (rpt_client_type_t client_type)
 Get a string description of an RPT client type. More...
 
etcpal_error_t rdmnet_save_rdm_command (const RdmnetRdmCommand *command, RdmnetSavedRdmCommand *saved_command)
 Save the data in a received RDM command for later use with API functions from a different context. More...
 
etcpal_error_t rdmnet_save_rdm_response (const RdmnetRdmResponse *response, RdmnetSavedRdmResponse *saved_response)
 Save the data in a received RDM response for later use from a different context. More...
 
etcpal_error_t rdmnet_append_to_saved_rdm_response (const RdmnetRdmResponse *new_response, RdmnetSavedRdmResponse *previously_saved_response)
 Append more data to a SavedRdmResponse's parameter data. More...
 
etcpal_error_t rdmnet_save_rpt_status (const RdmnetRptStatus *status, RdmnetSavedRptStatus *saved_status)
 Save the data in a received RPT status message for later use from a different context. More...
 
etcpal_error_t rdmnet_copy_saved_rdm_response (const RdmnetSavedRdmResponse *saved_resp_old, RdmnetSavedRdmResponse *saved_resp_new)
 Copy the data from a saved RDM response to a different saved RDM response. More...
 
etcpal_error_t rdmnet_copy_saved_rpt_status (const RdmnetSavedRptStatus *saved_status_old, RdmnetSavedRptStatus *saved_status_new)
 Copy the data from a saved RPT status message to a different saved RPT status message. More...
 
etcpal_error_t rdmnet_free_saved_rdm_response (RdmnetSavedRdmResponse *saved_response)
 Free the memory owned by a saved RDM response. More...
 
etcpal_error_t rdmnet_free_saved_rpt_status (RdmnetSavedRptStatus *saved_status)
 Free the memory owned by a saved RPT status message. More...
 
etcpal_error_t rdmnet_save_ept_data (const RdmnetEptData *data, RdmnetSavedEptData *saved_data)
 Save the data in a received EPT data message for later use from a different context. More...
 
etcpal_error_t rdmnet_save_ept_status (const RdmnetEptStatus *status, RdmnetSavedEptStatus *saved_status)
 Save the data in a received EPT status message for later use from a different context. More...
 
etcpal_error_t rdmnet_copy_saved_ept_data (const RdmnetSavedEptData *saved_data_old, RdmnetSavedEptData *saved_data_new)
 Copy the data from a saved EPT data message to a different saved EPT data message. More...
 
etcpal_error_t rdmnet_copy_saved_ept_status (const RdmnetSavedEptStatus *saved_status_old, RdmnetSavedEptStatus *saved_status_new)
 Copy the data from a saved EPT status message to a different saved EPT status message. More...
 
etcpal_error_t rdmnet_free_saved_ept_data (RdmnetSavedEptData *saved_data)
 Free the memory owned by a saved EPT data message. More...
 
etcpal_error_t rdmnet_free_saved_ept_status (RdmnetSavedEptStatus *saved_status)
 Free the memory owned by a saved EPT status message. More...
 
etcpal_error_t rdmnet_save_llrp_rdm_command (const LlrpRdmCommand *command, LlrpSavedRdmCommand *saved_command)
 Save the data in a received LLRP RDM command for later use with API functions from a different context. More...
 
etcpal_error_t rdmnet_save_llrp_rdm_response (const LlrpRdmResponse *response, LlrpSavedRdmResponse *saved_response)
 Save the data in a received LLRP RDM response for later use from a different context. More...
 
etcpal_error_t rdmnet_copy_saved_llrp_rdm_response (const LlrpSavedRdmResponse *saved_resp_old, LlrpSavedRdmResponse *saved_resp_new)
 Copy the data from a saved LLRP RDM response to a different saved LLRP RDM response. More...
 

Client list messages

enum  rpt_client_type_t {
  kRPTClientTypeDevice = E133_RPT_CLIENT_TYPE_DEVICE ,
  kRPTClientTypeController = E133_RPT_CLIENT_TYPE_CONTROLLER ,
  kRPTClientTypeUnknown = 0xffffffff
}
 An RPT client type. More...
 
typedef struct RdmnetRptClientEntry RdmnetRptClientEntry
 A descriptive structure for an RPT client.
 
typedef struct RdmnetEptSubProtocol RdmnetEptSubProtocol
 A description of an EPT sub-protocol. More...
 
typedef struct RdmnetEptClientEntry RdmnetEptClientEntry
 A descriptive structure for an EPT client.
 
typedef struct RdmnetRptClientList RdmnetRptClientList
 A structure that represents a list of RPT Client Entries.
 
typedef struct RdmnetEptClientList RdmnetEptClientList
 A structure that represents a list of EPT Client Entries.
 
#define EPT_PROTOCOL_STRING_PADDED_LENGTH   32
 The maximum length of an EPT sub-protocol string, including the null terminator.
 

RDM commands and responses

typedef struct RdmnetRdmCommand RdmnetRdmCommand
 An RDMnet RDM command received by this component.
 
typedef struct RdmnetSavedRdmCommand RdmnetSavedRdmCommand
 An RDM command received by this component and saved for a later response.
 
typedef struct RdmnetRdmResponse RdmnetRdmResponse
 An RDMnet RDM response received by a local component.
 
typedef struct RdmnetSavedRdmResponse RdmnetSavedRdmResponse
 An RDM response received over RDMnet and saved for later processing. More...
 
#define RDMNET_COMMAND_IS_TO_DEFAULT_RESPONDER(cmd_ptr)   ((cmd_ptr)->dest_endpoint == E133_NULL_ENDPOINT)
 Whether an RdmnetRdmCommand is addressed to the default responder.
 
#define RDMNET_RESP_ORIGINAL_COMMAND_INCLUDED(resp)   ((resp)->seq_num == 0)
 Whether the original command is included in an RdmnetRdmResponse or RdmnetSavedRdmResponse. More...
 

Other RPT messages

typedef struct RdmnetRptStatus RdmnetRptStatus
 An RDMnet RPT status message received by a local component.
 
typedef struct RdmnetSavedRptStatus RdmnetSavedRptStatus
 An RPT status received over RDMnet and saved for later processing. More...
 
typedef struct RdmnetDynamicUidMapping RdmnetDynamicUidMapping
 A mapping from a dynamic UID to a responder ID (RID).
 
typedef struct RdmnetDynamicUidAssignmentList RdmnetDynamicUidAssignmentList
 A list of mappings from dynamic UIDs to responder IDs received from an RDMnet broker.
 

EPT messages

typedef struct RdmnetEptData RdmnetEptData
 An RDMnet EPT data message received by a local component.
 
typedef struct RdmnetSavedEptData RdmnetSavedEptData
 An EPT data message received over RDMnet and saved for later processing. More...
 
typedef struct RdmnetEptStatus RdmnetEptStatus
 An RDMnet EPT status message received by a local component.
 
typedef struct RdmnetSavedEptStatus RdmnetSavedEptStatus
 An EPT status received over RDMnet and saved for later processing. More...
 

LLRP messages

typedef struct LlrpRdmCommand LlrpRdmCommand
 An RDM command received from a remote LLRP Manager.
 
typedef struct LlrpSavedRdmCommand LlrpSavedRdmCommand
 An RDM command received from a remote LLRP Manager.
 
typedef struct LlrpRdmResponse LlrpRdmResponse
 An RDM response received from a remote LLRP Target.
 
typedef struct LlrpSavedRdmResponse LlrpSavedRdmResponse
 An RDM command received from a remote LLRP Manager.
 

RDMnet version numbers

#define RDMNET_VERSION_MAJOR   0
 The major version.
 
#define RDMNET_VERSION_MINOR   3
 The minor version.
 
#define RDMNET_VERSION_PATCH   0
 The patch version.
 
#define RDMNET_VERSION_BUILD   13
 The build number.
 

RDMnet version strings

#define RDMNET_VERSION_STRING   "0.3.0.13"
 
#define RDMNET_VERSION_DATESTR   "19.Aug.2020"
 
#define RDMNET_VERSION_COPYRIGHT   "Copyright 2020 ETC Inc."
 
#define RDMNET_VERSION_PRODUCTNAME   "RDMnet"
 

Macro Definition Documentation

◆ RDMNET_ADDR_TO_DEFAULT_RESPONDER

#define RDMNET_ADDR_TO_DEFAULT_RESPONDER (   manu_id,
  dev_id 
)
Value:
{ \
{(manu_id), (dev_id)}, E133_NULL_ENDPOINT, {(manu_id), (dev_id)}, 0 \
}

Initialize an RdmnetDestinationAddr with a default responder address.

Parameters
manu_idThe manufacturer ID portion of the default responder's UID.
dev_idThe device ID portion of the default responder's UID.

◆ RDMNET_ADDR_TO_DEFAULT_RESPONDER_SUBDEV

#define RDMNET_ADDR_TO_DEFAULT_RESPONDER_SUBDEV (   manu_id,
  dev_id,
  subdevice 
)
Value:
{ \
{(manu_id), (dev_id)}, E133_NULL_ENDPOINT, {(manu_id), (dev_id)}, (subdevice) \
}

Initialize an RdmnetDestinationAddr with the address of a subdevice on a default responder.

Parameters
manu_idThe manufacturer ID portion of the default responder's UID.
dev_idThe device ID portion of the default responder's UID.
subdeviceThe subdevice to address.

◆ RDMNET_ADDR_TO_SUB_RESPONDER

#define RDMNET_ADDR_TO_SUB_RESPONDER (   rdmnet_manu,
  rdmnet_dev,
  endpoint,
  rdm_manu,
  rdm_dev 
)
Value:
{ \
{(rdmnet_manu), (rdmnet_dev)}, (endpoint), {(rdm_manu), (rdm_dev)}, 0 \
}

Initialize an RdmnetDestinationAddr with the address of a sub-responder on a component.

Parameters
rdmnet_manuThe manufacturer ID portion of the RDMnet component's UID.
rdmnet_devThe device ID portion of the RDMnet component's UID.
endpointThe endpoint the sub-responder is associated with.
rdm_manuThe manufacturer ID portion of the sub-responder's RDM UID.
rdm_devThe device ID portion of the sub-responder's RDM UID.

◆ RDMNET_ADDR_TO_SUB_RESPONDER_SUBDEV

#define RDMNET_ADDR_TO_SUB_RESPONDER_SUBDEV (   rdmnet_manu,
  rdmnet_dev,
  endpoint,
  rdm_manu,
  rdm_dev,
  subdevice 
)
Value:
{ \
{(rdmnet_manu), (rdmnet_dev)}, (endpoint), {(rdm_manu), (rdm_dev)}, (subdevice) \
}

Initialize an RdmnetDestinationAddr with the address of a subdevice on a sub-responder.

Parameters
rdmnet_manuThe manufacturer ID portion of the RDMnet component's UID.
rdmnet_devThe device ID portion of the RDMnet component's UID.
endpointThe endpoint the sub-responder is associated with.
rdm_manuThe manufacturer ID portion of the sub-responder's RDM UID.
rdm_devThe device ID portion of the sub-responder's RDM UID.
subdeviceThe subdevice to address.

◆ RDMNET_CLIENT_SET_DEFAULT_SCOPE

#define RDMNET_CLIENT_SET_DEFAULT_SCOPE (   configptr)
Value:
do \
{ \
(configptr)->scope = E133_DEFAULT_SCOPE; \
ETCPAL_IP_SET_INVALID(&(configptr)->static_broker_addr.ip); \
} while (0)

Initialize an RdmnetScopeConfig struct with the default RDMnet scope.

Scopes are resolved using RDMnet discovery (DNS-SD) by default; to override this behavior with a static broker address and port, use rdmnet_set_static_default_scope().

Parameters
configptrPointer to RdmnetScopeConfig.

◆ RDMNET_CLIENT_SET_SCOPE

#define RDMNET_CLIENT_SET_SCOPE (   configptr,
  scope_str 
)
Value:
do \
{ \
(configptr)->scope = scope_str; \
ETCPAL_IP_SET_INVALID(&(configptr)->static_broker_addr.ip); \
} while (0)

Initialize an RdmnetScopeConfig struct with a scope string.

Scopes are resolved using RDMnet discovery (DNS-SD) by default; to override this behavior with a static broker address and port, use rdmnet_set_static_scope().

Parameters
configptrPointer to RdmnetScopeConfig.
scope_strUTF-8 scope string (const char *), must remain valid for as long as this scope config exists.

◆ RDMNET_CLIENT_SET_STATIC_DEFAULT_SCOPE

#define RDMNET_CLIENT_SET_STATIC_DEFAULT_SCOPE (   configptr,
  broker_addr 
)
Value:
do \
{ \
(configptr)->scope = E133_DEFAULT_SCOPE; \
(configptr)->static_broker_addr = (broker_addr); \
} while (0)

Initialize an RdmnetScopeConfig struct with the default RDMnet scope and a static broker address.

DNS-SD discovery will be bypassed and broker connection will be attempted using the address and port given.

Parameters
configptrPointer to RdmnetScopeConfig.
broker_addrAddress and port for a static broker (EtcPalSockAddr)

◆ RDMNET_CLIENT_SET_STATIC_SCOPE

#define RDMNET_CLIENT_SET_STATIC_SCOPE (   configptr,
  scope_str,
  broker_addr 
)
Value:
do \
{ \
(configptr)->scope = (scope_str); \
(configptr)->static_broker_addr = (broker_addr); \
} while (0)

Initialize an RdmnetScopeConfig struct with a scope string and static broker address.

DNS-SD discovery will be bypassed and broker connection will be attempted using the address and port given.

Parameters
configptrPointer to RdmnetScopeConfig.
scope_strUTF-8 scope string (const char *), must remain valid for as long as this scope config exists.
broker_addrAddress and port for a static broker (EtcPalSockAddr).

◆ RDMNET_RESP_ORIGINAL_COMMAND_INCLUDED

#define RDMNET_RESP_ORIGINAL_COMMAND_INCLUDED (   resp)    ((resp)->seq_num == 0)

Whether the original command is included in an RdmnetRdmResponse or RdmnetSavedRdmResponse.

If this is true, the members original_cmd_header, original_cmd_data and original_cmd_data_len will be valid; otherwise, they contain unspecified values.

Parameters
respPointer to RdmnetRdmResponse or RdmnetSavedRdmResponse to inspect.

◆ RDMNET_SCOPE_CONFIG_DEFAULT_INIT

#define RDMNET_SCOPE_CONFIG_DEFAULT_INIT
Value:
{ \
E133_DEFAULT_SCOPE, { 0, ETCPAL_IP_INVALID_INIT } \
}
#define ETCPAL_IP_INVALID_INIT

A default-value initializer for an RdmnetScopeConfig struct.

Usage:

// scope_config holds the configuration for the default RDMnet scope with no statically-configured broker.
#define RDMNET_SCOPE_CONFIG_DEFAULT_INIT
A default-value initializer for an RdmnetScopeConfig struct.
Definition: client.h:247
A set of configuration information for a single scope in which an RDMnet client is participating.
Definition: client.h:224

◆ RDMNET_SYNC_DEFER_EPT_RESPONSE

#define RDMNET_SYNC_DEFER_EPT_RESPONSE (   response_ptr)    ((response_ptr)->response_action = kRdmnetEptResponseActionDefer)

Defer the response to the EPT message, either to be sent later or because no response is necessary.

Parameters
response_ptrPointer to RdmnetSyncEptResponse in which to set data.

◆ RDMNET_SYNC_DEFER_RDM_RESPONSE

#define RDMNET_SYNC_DEFER_RDM_RESPONSE (   response_ptr)    ((response_ptr)->response_action = kRdmnetRdmResponseActionDefer)

Defer the RDM response to be sent later from another context.

Make sure to save any RDM command data for later processing using the appropriate API function.

Parameters
response_ptrPointer to RdmnetSyncRdmResponse in which to set data.

◆ RDMNET_SYNC_SEND_EPT_DATA

#define RDMNET_SYNC_SEND_EPT_DATA (   response_ptr,
  response_data_len_in 
)
Value:
do \
{ \
(response_ptr)->response_action = kRdmnetEptResponseActionSendData; \
(response_ptr)->response_data.response_data_len = (response_data_len_in); \
} while (0)
@ kRdmnetEptResponseActionSendData
Send an EPT data message to the originating EPT client.
Definition: common.h:272

Indicate that an EPT data message should be sent when this callback returns.

Data must be copied to the buffer provided at initialization time before the callback returns.

Parameters
response_ptrPointer to RdmnetSyncEptResponse in which to set data.
response_data_len_inLength of the EPT response data provided - must be nonzero.

◆ RDMNET_SYNC_SEND_EPT_STATUS

#define RDMNET_SYNC_SEND_EPT_STATUS (   response_ptr,
  status_code_in 
)
Value:
do \
{ \
(response_ptr)->response_action = kRdmnetEptResponseActionSendStatus; \
(response_ptr)->response_data.status_code = (status_code_in); \
} while (0)
@ kRdmnetEptResponseActionSendStatus
Send an EPT status message to the originating EPT client.
Definition: common.h:274

Indicate that an EPT status message should be sent when this callback returns.

Parameters
response_ptrPointer to RdmnetSyncEptResponse in which to set data.
status_code_inEPT status code to send with the response.

◆ RDMNET_SYNC_SEND_RDM_ACK

#define RDMNET_SYNC_SEND_RDM_ACK (   response_ptr,
  response_data_len_in 
)
Value:
do \
{ \
(response_ptr)->response_action = kRdmnetRdmResponseActionSendAck; \
(response_ptr)->response_data.response_data_len = (response_data_len_in); \
} while (0)
@ kRdmnetRdmResponseActionSendAck
Send an RDM ACK to the originating controller.
Definition: common.h:196

Indicate that an RDM ACK should be sent when this callback returns.

If response_data_len_in != 0, data must be copied to the buffer provided at initialization time before the callback returns.

Parameters
response_ptrPointer to RdmnetSyncRdmResponse in which to set data.
response_data_len_inLength of the RDM response parameter data provided.

◆ RDMNET_SYNC_SEND_RDM_NACK

#define RDMNET_SYNC_SEND_RDM_NACK (   response_ptr,
  nack_reason_in 
)
Value:
do \
{ \
(response_ptr)->response_action = kRdmnetRdmResponseActionSendNack; \
(response_ptr)->response_data.nack_reason = (nack_reason_in); \
} while (0)
@ kRdmnetRdmResponseActionSendNack
Send an RDM NACK with reason to the originating controller.
Definition: common.h:198

Indicate that an RDM NACK should be sent when this callback returns.

Parameters
response_ptrPointer to RdmnetSyncRdmResponse in which to set data.
nack_reason_inRDM NACK reason code to send with the NACK response.

Typedef Documentation

◆ LlrpDestinationAddr

A destination address for an RDM command in LLRP.

See Low-Level Recovery Protocol (LLRP) for more information.

◆ RdmnetDestinationAddr

◆ RdmnetEptSubProtocol

A description of an EPT sub-protocol.

EPT clients can implement multiple protocols, each of which is identified by a two-part identifier including an ESTA manufacturer ID and a protocol ID.

◆ RdmnetMcastNetintId

A set of identifying information for a network interface, for multicast purposes.

RDMnet uses two multicast protocols, LLRP and mDNS. When creating sockets to use with these protocols, the interface IP addresses don't matter and the primary key for a network interface is simply a combination of the interface index and the IP protocol used.

◆ RdmnetNetintConfig

Network interface configuration information to give the RDMnet library at initialization.

LLRP multicast and discovery traffic will be restricted to the network interfaces given.

◆ RdmnetSavedEptData

An EPT data message received over RDMnet and saved for later processing.

This type is not used by the library API, but can come in handy if an application wants to queue or copy EPT data messages before acting on them. The data member is heap-allocated and owned; be sure to call rdmnet_free_saved_ept_data() to free this data before disposing of an instance.

◆ RdmnetSavedEptStatus

An EPT status received over RDMnet and saved for later processing.

This type is not used by the library API, but can come in handy if an application wants to queue or copy EPT status messages before acting on them. The status_string member is heap-allocated and owned; be sure to call rdmnet_free_saved_ept_status() to free this data before disposing of an instance.

◆ RdmnetSavedRdmResponse

An RDM response received over RDMnet and saved for later processing.

This type is not used by the library API, but can come in handy if an application wants to queue or copy RDM responses before acting on them. The rdm_data member is heap-allocated and owned; be sure to call rdmnet_free_saved_rdm_response() to free this data before disposing of an instance.

◆ RdmnetSavedRptStatus

An RPT status received over RDMnet and saved for later processing.

This type is not used by the library API, but can come in handy if an application wants to queue or copy RPT status messages before acting on them. The status_string member is heap-allocated and owned; be sure to call rdmnet_free_saved_rpt_status() to free this data before disposing of an instance.

◆ RdmnetSourceAddr

The source address for an unsolicited RDM response generated by a local component.

See Roles and Addressing and Devices and Gateways for more information.

◆ RdmnetSyncEptResponse

This structure should not be manipulated directly - use the macros to access it:

Contains information about an RDMnet EPT response to be sent synchronously from an RDMnet callback.

◆ RdmnetSyncRdmResponse

This structure should not be manipulated directly - use the macros to access it:

Contains information about an RDMnet RDM response to be sent synchronously from an RDMnet callback.

Enumeration Type Documentation

◆ client_list_action_t

How to apply the client entries to the existing client list in a client_list_update_received callback.

Enumerator
kRdmnetClientListAppend 

The client entries should be appended to the existing client list.

kRdmnetClientListRemove 

The client entries should be removed from the existing client list.

kRdmnetClientListUpdate 

The client entries should be updated in the existing client list.

kRdmnetClientListReplace 

The existing client list should be replaced wholesale with this one.

◆ ept_status_code_t

EPT status code definitions.

Enumerator
kEptStatusUnknownCid 

The destination CID in the EPT PDU could not be found.

kEptStatusUnknownVector 

An EPT PDU was received with an unsupported Vector.

◆ llrp_component_t

Identifies the type of RPT Component with which an LLRP Target is associated.

Enumerator
kLlrpCompRptDevice 

This LLRP Target is associated with an RPT Device.

kLlrpCompRptController 

This LLRP Target is associated with an RPT Controller.

kLlrpCompBroker 

This LLRP Target is associated with a Broker.

kLlrpCompNonRdmnet 

This LLRP Target does not implement any RDMnet protocol other than LLRP.

◆ rdmnet_command_class_t

An RDM command class, for RDMnet purposes.

RDMnet disallows some RDM command classes. This type is used only with RDMnet APIs that originate RDM commands.

Enumerator
kRdmnetCCGetCommand 

An RDMnet RDM GET command.

kRdmnetCCSetCommand 

An RDMnet RDM SET command.

◆ rdmnet_connect_fail_event_t

A high-level reason for RDMnet connection failure.

Enumerator
kRdmnetConnectFailSocketFailure 

The connection was unable to be started because of an error returned from the system during a lower-level socket call.

kRdmnetConnectFailTcpLevel 

The connection started but the TCP connection was never established.

This could be because of an incorrect address or port for the remote host or a network issue.

kRdmnetConnectFailNoReply 

The TCP connection was established, but no reply was received from the RDMnet protocol handshake.

This probably indicates an error in the remote broker.

kRdmnetConnectFailRejected 

The remote broker rejected the connection at the RDMnet protocol level.

A reason is provided in the form of an rdmnet_connect_status_t.

◆ rdmnet_connect_status_t

Connect status defines for the BrokerConnectReplyMsg.

Enumerator
kRdmnetConnectOk 

Connection completed successfully.

kRdmnetConnectScopeMismatch 

The client's scope does not match the broker's scope.

kRdmnetConnectCapacityExceeded 

The broker has no further capacity for new clients.

kRdmnetConnectDuplicateUid 

The client's static UID matches another connected client's static UID.

kRdmnetConnectInvalidClientEntry 

The client's Client Entry is invalid.

kRdmnetConnectInvalidUid 

The UID sent in the Client Entry PDU is malformed.

◆ rdmnet_disconnect_event_t

A high-level reason for RDMnet connection to be disconnected after successful connection.

Enumerator
kRdmnetDisconnectAbruptClose 

The TCP connection was closed without an RDMnet disconnect message being sent.

kRdmnetDisconnectNoHeartbeat 

The TCP connection was deemed unhealthy due to no heartbeat message being received before the heartbeat timeout.

kRdmnetDisconnectRedirected 

The client was redirected to another broker address.

kRdmnetDisconnectGracefulRemoteInitiated 

The remote component sent an RDMnet disconnect message with a reason code.

kRdmnetDisconnectGracefulLocalInitiated 

A disconnect was requested locally.

◆ rdmnet_disconnect_reason_t

Disconnect reason defines for the BrokerDisconnectMsg.

Enumerator
kRdmnetDisconnectShutdown 

The remote component is shutting down.

kRdmnetDisconnectCapacityExhausted 

The remote component no longer has the ability to support this connection.

kRdmnetDisconnectHardwareFault 

The component must disconnect due to an internal hardware fault.

kRdmnetDisconnectSoftwareFault 

The component must disconnect due to a software fault.

kRdmnetDisconnectSoftwareReset 

The component must terminated because of a software reset.

kRdmnetDisconnectIncorrectScope 

Sent by brokers that are not on the desired Scope.

kRdmnetDisconnectRptReconfigure 

The component was reconfigured using RPT, and the new configuration requires connection termination.

kRdmnetDisconnectLlrpReconfigure 

The component was reconfigured using LLRP, and the new configuration requires connection termination.

kRdmnetDisconnectUserReconfigure 

The component was reconfigured via some other means, and the new configuration requires connection termination.

◆ rdmnet_dynamic_uid_status_t

Dynamic UID Status Codes for the BrokerDynamicUidMapping struct.

Enumerator
kRdmnetDynamicUidStatusOk 

The Dynamic UID Mapping was fetched or assigned successfully.

kRdmnetDynamicUidStatusInvalidRequest 

The corresponding request contained a malformed UID value.

kRdmnetDynamicUidStatusUidNotFound 

The requested Dynamic UID was not found in the broker's Dynamic UID mapping table.

kRdmnetDynamicUidStatusDuplicateRid 

This RID has already been assigned a Dynamic UID by this broker.

kRdmnetDynamicUidStatusCapacityExhausted 

The broker has exhausted its capacity to generate Dynamic UIDs.

◆ rdmnet_ept_response_action_t

Enumeration representing an action to take after an "EPT data received" callback completes.

Enumerator
kRdmnetEptResponseActionSendData 

Send an EPT data message to the originating EPT client.

kRdmnetEptResponseActionSendStatus 

Send an EPT status message to the originating EPT client.

kRdmnetEptResponseActionDefer 

Do nothing; either the application will send the response later or no response is required.

If sending a respone later, be sure to save the data message.

◆ rdmnet_rdm_response_action_t

Enumeration representing an action to take after an "RDM command received" callback completes.

Enumerator
kRdmnetRdmResponseActionSendAck 

Send an RDM ACK to the originating controller.

kRdmnetRdmResponseActionSendNack 

Send an RDM NACK with reason to the originating controller.

kRdmnetRdmResponseActionDefer 

Do nothing; the application will send the response later.

Be sure to save the command.

◆ rpt_client_type_t

An RPT client type.

Enumerator
kRPTClientTypeDevice 

An RPT device receives RDM commands and sends responses.

kRPTClientTypeController 

An RPT controller originates RDM commands and receives responses.

kRPTClientTypeUnknown 

A placeholder for when a type has not been determined.

◆ rpt_status_code_t

RPT status code definitions.

Enumerator
kRptStatusUnknownRptUid 

The Destination UID in the RPT PDU could not be found.

kRptStatusRdmTimeout 

No RDM response was received from a Gateway's RDM responder.

kRptStatusInvalidRdmResponse 

An invalid RDM response was received from a Gateway's RDM responder.

kRptStatusUnknownRdmUid 

The Destination UID in an encapsulated RDM Command could not be found.

kRptStatusUnknownEndpoint 

The Destination Endpoint ID in the RPT PDU could not be found.

kRptStatusBroadcastComplete 

A Broadcasted RPT Request was sent to at least one Device.

kRptStatusUnknownVector 

An RPT PDU was received with an unsupported Vector.

kRptStatusInvalidMessage 

The inner PDU contained by the RPT PDU was malformed.

kRptStatusInvalidCommandClass 

The Command Class of an encapsulated RDM Command was invalid.

Function Documentation

◆ llrp_component_type_to_string()

const char* llrp_component_type_to_string ( llrp_component_t  type)

Get a string description of an LLRP component type.

LLRP component types describe the type of RDMnet component with which an LLRP target is associated.

Parameters
typeType code.
Returns
String, or NULL if type is invalid.

◆ rdmnet_append_to_saved_rdm_response()

etcpal_error_t rdmnet_append_to_saved_rdm_response ( const RdmnetRdmResponse new_response,
RdmnetSavedRdmResponse previously_saved_response 
)

Append more data to a SavedRdmResponse's parameter data.

This is useful after having previously saved an RdmnetRdmResponse with the more_coming flag set to true.

Parameters
[in]new_responseThe new response that has just been received.
[in,out]previously_saved_responseThe previously saved response to which to append data.
Returns
kEtcPalErrOk: Data appended successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for new response data.

◆ rdmnet_connect_fail_event_to_string()

const char* rdmnet_connect_fail_event_to_string ( rdmnet_connect_fail_event_t  event)

Get a string description of an RDMnet connection failure event.

An RDMnet connection failure event provides a high-level reason why an RDMnet connection failed.

Parameters
eventEvent code.
Returns
String, or a placeholder string if event is invalid.

◆ rdmnet_connect_status_to_string()

const char* rdmnet_connect_status_to_string ( rdmnet_connect_status_t  code)

Get a string description of an RDMnet connect status code.

Connect status codes are returned by a broker in a connect reply message after a client attempts to connect.

Parameters
codeConnect status code.
Returns
String, or NULL if code is invalid.

◆ rdmnet_copy_saved_ept_data()

etcpal_error_t rdmnet_copy_saved_ept_data ( const RdmnetSavedEptData saved_data_old,
RdmnetSavedEptData saved_data_new 
)

Copy the data from a saved EPT data message to a different saved EPT data message.

This function does heap allocation and gives the resulting RdmnetSavedEptData struct an owned data pointer.

Parameters
[in]saved_data_oldSaved data message to copy from.
[out]saved_data_newSaved data message to copy to.
Returns
kEtcPalErrOk: Data copied successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for data.

◆ rdmnet_copy_saved_ept_status()

etcpal_error_t rdmnet_copy_saved_ept_status ( const RdmnetSavedEptStatus saved_status_old,
RdmnetSavedEptStatus saved_status_new 
)

Copy the data from a saved EPT status message to a different saved EPT status message.

This function does heap allocation to copy the status string and gives the resulting RdmnetSavedEptStatus an owned status_string pointer.

Parameters
[in]saved_status_oldSaved status message to copy from.
[out]saved_status_newSaved status message to copy to.
Returns
kEtcPalErrOk: Status message copied successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for status string.

◆ rdmnet_copy_saved_llrp_rdm_response()

etcpal_error_t rdmnet_copy_saved_llrp_rdm_response ( const LlrpSavedRdmResponse saved_resp_old,
LlrpSavedRdmResponse saved_resp_new 
)

Copy the data from a saved LLRP RDM response to a different saved LLRP RDM response.

Parameters
[in]saved_resp_oldSaved response to copy from.
[out]saved_resp_newSaved response to copy to.
Returns
kEtcPalErrOk: Response copied successfully.
kEtcPalErrInvalid: Invalid argument.

◆ rdmnet_copy_saved_rdm_response()

etcpal_error_t rdmnet_copy_saved_rdm_response ( const RdmnetSavedRdmResponse saved_resp_old,
RdmnetSavedRdmResponse saved_resp_new 
)

Copy the data from a saved RDM response to a different saved RDM response.

The length of data contained in an RDMnet RDM response is technically unbounded (ACK_OVERFLOW responses are recombined by the library), so this function does heap allocation and gives the resulting RdmnetSavedRdmResponse struct an owned rdm_data pointer.

Parameters
[in]saved_resp_oldSaved response to copy from.
[out]saved_resp_newSaved response to copy to.
Returns
kEtcPalErrOk: Response copied successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for response data.

◆ rdmnet_copy_saved_rpt_status()

etcpal_error_t rdmnet_copy_saved_rpt_status ( const RdmnetSavedRptStatus saved_status_old,
RdmnetSavedRptStatus saved_status_new 
)

Copy the data from a saved RPT status message to a different saved RPT status message.

This function does heap allocation to copy the status string and gives the resulting RdmnetSavedRptStatus an owned status_string pointer.

Parameters
[in]saved_status_oldSaved status message to copy from.
[out]saved_status_newSaved status message to copy to.
Returns
kEtcPalErrOk: Status message copied successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for status string.

◆ rdmnet_deinit()

void rdmnet_deinit ( void  )

Deinitialize the RDMnet library.

Closes all connections, deallocates all resources and joins the background thread. No RDMnet API functions are usable after this function is called.

◆ rdmnet_disconnect_event_to_string()

const char* rdmnet_disconnect_event_to_string ( rdmnet_disconnect_event_t  event)

Get a string description of an RDMnet disconnect event.

An RDMnet disconnect event provides a high-level reason why an RDMnet connection was disconnected.

Parameters
eventEvent code.
Returns
String, or NULL if event is invalid.

◆ rdmnet_disconnect_reason_to_string()

const char* rdmnet_disconnect_reason_to_string ( rdmnet_disconnect_reason_t  code)

Get a string description of an RDMnet disconnect reason code.

Disconnect reason codes are sent by a broker or client that is disconnecting.

Parameters
codeDisconnect reason code.
Returns
String, or NULL if code is invalid.

◆ rdmnet_dynamic_uid_status_to_string()

const char* rdmnet_dynamic_uid_status_to_string ( rdmnet_dynamic_uid_status_t  code)

Get a string description of an RDMnet Dynamic UID status code.

Dynamic UID status codes are returned by a broker in response to a request for dynamic UIDs by a client.

Parameters
codeDynamic UID status code.
Returns
String, or NULL if code is invalid.

◆ rdmnet_free_saved_ept_data()

etcpal_error_t rdmnet_free_saved_ept_data ( RdmnetSavedEptData saved_data)

Free the memory owned by a saved EPT data message.

Frees the owned data members in the RdmnetSavedEptData struct. Make sure to do this before the struct goes out of scope.

Parameters
[in]saved_dataData message for which to free resources.
Returns
kEtcPalErrOk: Response freed successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.

◆ rdmnet_free_saved_ept_status()

etcpal_error_t rdmnet_free_saved_ept_status ( RdmnetSavedEptStatus saved_status)

Free the memory owned by a saved EPT status message.

Frees the owned data members in the RdmnetSavedEptStatus struct. Make sure to do this before the struct goes out of scope.

Parameters
[in]saved_statusStatus message for which to free resources.
Returns
kEtcPalErrOk: Status message freed successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.

◆ rdmnet_free_saved_rdm_response()

etcpal_error_t rdmnet_free_saved_rdm_response ( RdmnetSavedRdmResponse saved_response)

Free the memory owned by a saved RDM response.

Frees the owned data members in the RdmnetSavedRdmResponse struct. Make sure to do this before the struct goes out of scope.

Parameters
[in]saved_responseResponse for which to free resources.
Returns
kEtcPalErrOk: Response freed successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.

◆ rdmnet_free_saved_rpt_status()

etcpal_error_t rdmnet_free_saved_rpt_status ( RdmnetSavedRptStatus saved_status)

Free the memory owned by a saved RPT status message.

Frees the owned data members in the RdmnetSavedRptStatus struct. Make sure to do this before the struct goes out of scope.

Parameters
[in]saved_statusStatus message for which to free resources.
Returns
kEtcPalErrOk: Status message freed successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.

◆ rdmnet_init()

etcpal_error_t rdmnet_init ( const EtcPalLogParams log_params,
const RdmnetNetintConfig netint_config 
)

Initialize the RDMnet library.

Does all initialization required before the RDMnet API modules can be used. Starts the message dispatch thread.

Parameters
[in]log_paramsOptional: log parameters for the RDMnet library to use to log messages. If NULL, no logging will be performed.
[in]netint_configOptional: a set of network interfaces to which to restrict multicast operation.
Returns
kEtcPalErrOk: Initialization successful.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNoNetints: No network interfaces found on the system.
kEtcPalErrSys: An internal library or system call error occurred.
Other error codes are possible from the initialization of EtcPal.

◆ rdmnet_rpt_client_type_to_string()

const char* rdmnet_rpt_client_type_to_string ( rpt_client_type_t  type)

Get a string description of an RPT client type.

There are two types of RPT clients: controllers and devices.

Parameters
typeType code.
Returns
String, or NULL if type is invalid.

◆ rdmnet_save_ept_data()

etcpal_error_t rdmnet_save_ept_data ( const RdmnetEptData data,
RdmnetSavedEptData saved_data 
)

Save the data in a received EPT data message for later use from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if referencing an EPT data message after the callback has returned is desired, the data must be saved.

This function does heap allocation and gives the resulting RdmnetSavedEptData struct an owned data pointer.

Parameters
[in]dataData message to save.
[out]saved_dataMessage structure with copied and saved data.
Returns
kEtcPalErrOk: Data saved successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for data.

◆ rdmnet_save_ept_status()

etcpal_error_t rdmnet_save_ept_status ( const RdmnetEptStatus status,
RdmnetSavedEptStatus saved_status 
)

Save the data in a received EPT status message for later use from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if referencing an EPT status message after the callback has returned is desired, the data must be saved. This only applies to the optional EPT status string that accompanies a status message; an application that doesn't care about the status string need not use this function.

This function does heap allocation to copy the status string and gives the resulting RdmnetSavedEptStatus an owned status_string pointer.

Parameters
[in]statusStatus message to save.
[out]saved_statusStatus with copied and saved data.
Returns
kEtcPalErrOk: Status message saved successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for status string.

◆ rdmnet_save_llrp_rdm_command()

etcpal_error_t rdmnet_save_llrp_rdm_command ( const LlrpRdmCommand command,
LlrpSavedRdmCommand saved_command 
)

Save the data in a received LLRP RDM command for later use with API functions from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if not responding to a command synchronously, the command must be saved before exiting the callback. See Handling RDM Commands for more information.

Parameters
[in]commandCommand to save.
[out]saved_commandCommand with copied and saved data.
Returns
kEtcPalErrOk: Command saved successfully.
kEtcPalErrInvalid: Invalid argument.

◆ rdmnet_save_llrp_rdm_response()

etcpal_error_t rdmnet_save_llrp_rdm_response ( const LlrpRdmResponse response,
LlrpSavedRdmResponse saved_response 
)

Save the data in a received LLRP RDM response for later use from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if referencing an RDM response after the callback has returned is desired, the data must be saved.

Parameters
[in]responseResponse to save.
[out]saved_responseResponse with copied and saved data.
Returns
kEtcPalErrOk: Response saved successfully.
kEtcPalErrInvalid: Invalid argument.

◆ rdmnet_save_rdm_command()

etcpal_error_t rdmnet_save_rdm_command ( const RdmnetRdmCommand command,
RdmnetSavedRdmCommand saved_command 
)

Save the data in a received RDM command for later use with API functions from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if not responding to a command synchronously, the command must be saved before exiting the callback. See Handling RDM Commands for more information.

Parameters
[in]commandCommand to save.
[out]saved_commandCommand with copied and saved data.
Returns
kEtcPalErrOk: Command saved successfully.
kEtcPalErrInvalid: Invalid argument.

◆ rdmnet_save_rdm_response()

etcpal_error_t rdmnet_save_rdm_response ( const RdmnetRdmResponse response,
RdmnetSavedRdmResponse saved_response 
)

Save the data in a received RDM response for later use from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if referencing an RDM response after the callback has returned is desired, the data must be saved.

The length of data contained in an RDMnet RDM response is technically unbounded (ACK_OVERFLOW responses are recombined by the library), so this function does heap allocation and gives the resulting RdmnetSavedRdmResponse struct an owned rdm_data pointer.

Parameters
[in]responseResponse to save.
[out]saved_responseResponse with copied and saved data.
Returns
kEtcPalErrOk: Response saved successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for response data.

◆ rdmnet_save_rpt_status()

etcpal_error_t rdmnet_save_rpt_status ( const RdmnetRptStatus status,
RdmnetSavedRptStatus saved_status 
)

Save the data in a received RPT status message for later use from a different context.

RDMnet message types delivered to RDMnet callback functions do not own their data; if referencing an RPT status message after the callback has returned is desired, the data must be saved. This only applies to the optional RPT status string that accompanies a status message; an application that doesn't care about the status string need not use this function.

This function does heap allocation to copy the status string and gives the resulting RdmnetSavedRptStatus an owned status_string pointer.

Parameters
[in]statusStatus message to save.
[out]saved_statusStatus with copied and saved data.
Returns
kEtcPalErrOk: Status message saved successfully.
kEtcPalErrInvalid: Invalid argument.
kEtcPalErrNotImpl: RDMnet was compiled with RDMNET_DYNAMIC_MEM set to 0.
kEtcPalErrNoMem: Couldn't allocate memory for status string.