RDMnet
0.3.0
Implementation of ANSI E1.33 (RDMnet)
|
View other versions:
|
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. | |
#define RDMNET_ADDR_TO_DEFAULT_RESPONDER | ( | manu_id, | |
dev_id | |||
) |
Initialize an RdmnetDestinationAddr with a default responder address.
manu_id | The manufacturer ID portion of the default responder's UID. |
dev_id | The device ID portion of the default responder's UID. |
#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.
manu_id | The manufacturer ID portion of the default responder's UID. |
dev_id | The device ID portion of the default responder's UID. |
subdevice | The subdevice to address. |
#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.
rdmnet_manu | The manufacturer ID portion of the RDMnet component's UID. |
rdmnet_dev | The device ID portion of the RDMnet component's UID. |
endpoint | The endpoint the sub-responder is associated with. |
rdm_manu | The manufacturer ID portion of the sub-responder's RDM UID. |
rdm_dev | The device ID portion of the sub-responder's RDM UID. |
#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.
rdmnet_manu | The manufacturer ID portion of the RDMnet component's UID. |
rdmnet_dev | The device ID portion of the RDMnet component's UID. |
endpoint | The endpoint the sub-responder is associated with. |
rdm_manu | The manufacturer ID portion of the sub-responder's RDM UID. |
rdm_dev | The device ID portion of the sub-responder's RDM UID. |
subdevice | The subdevice to address. |
#define RDMNET_CLIENT_SET_DEFAULT_SCOPE | ( | configptr | ) |
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().
configptr | Pointer to RdmnetScopeConfig. |
#define RDMNET_CLIENT_SET_SCOPE | ( | configptr, | |
scope_str | |||
) |
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().
configptr | Pointer to RdmnetScopeConfig. |
scope_str | UTF-8 scope string (const char *), must remain valid for as long as this scope config exists. |
#define RDMNET_CLIENT_SET_STATIC_DEFAULT_SCOPE | ( | configptr, | |
broker_addr | |||
) |
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.
configptr | Pointer to RdmnetScopeConfig. |
broker_addr | Address and port for a static broker (EtcPalSockAddr) |
#define RDMNET_CLIENT_SET_STATIC_SCOPE | ( | configptr, | |
scope_str, | |||
broker_addr | |||
) |
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.
configptr | Pointer to RdmnetScopeConfig. |
scope_str | UTF-8 scope string (const char *), must remain valid for as long as this scope config exists. |
broker_addr | Address and port for a static broker (EtcPalSockAddr). |
#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.
resp | Pointer to RdmnetRdmResponse or RdmnetSavedRdmResponse to inspect. |
#define RDMNET_SCOPE_CONFIG_DEFAULT_INIT |
A default-value initializer for an RdmnetScopeConfig struct.
Usage:
#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.
response_ptr | Pointer to RdmnetSyncEptResponse in which to set data. |
#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.
response_ptr | Pointer to RdmnetSyncRdmResponse in which to set data. |
#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.
Data must be copied to the buffer provided at initialization time before the callback returns.
response_ptr | Pointer to RdmnetSyncEptResponse in which to set data. |
response_data_len_in | Length of the EPT response data provided - must be nonzero. |
#define RDMNET_SYNC_SEND_EPT_STATUS | ( | response_ptr, | |
status_code_in | |||
) |
Indicate that an EPT status message should be sent when this callback returns.
response_ptr | Pointer to RdmnetSyncEptResponse in which to set data. |
status_code_in | EPT status code to send with the response. |
#define RDMNET_SYNC_SEND_RDM_ACK | ( | response_ptr, | |
response_data_len_in | |||
) |
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.
response_ptr | Pointer to RdmnetSyncRdmResponse in which to set data. |
response_data_len_in | Length of the RDM response parameter data provided. |
#define RDMNET_SYNC_SEND_RDM_NACK | ( | response_ptr, | |
nack_reason_in | |||
) |
Indicate that an RDM NACK should be sent when this callback returns.
response_ptr | Pointer to RdmnetSyncRdmResponse in which to set data. |
nack_reason_in | RDM NACK reason code to send with the NACK response. |
typedef struct LlrpDestinationAddr LlrpDestinationAddr |
A destination address for an RDM command in LLRP.
See Low-Level Recovery Protocol (LLRP) for more information.
typedef struct RdmnetDestinationAddr RdmnetDestinationAddr |
A destination address for an RDM command in RDMnet's RPT protocol.
See Roles and Addressing and Devices and Gateways for more information.
typedef struct RdmnetEptSubProtocol 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.
typedef struct RdmnetMcastNetintId 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.
typedef struct RdmnetNetintConfig 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.
typedef struct RdmnetSavedEptData 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.
typedef struct RdmnetSavedEptStatus 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.
typedef struct RdmnetSavedRdmResponse 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.
typedef struct RdmnetSavedRptStatus 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.
typedef struct RdmnetSourceAddr 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.
typedef struct RdmnetSyncEptResponse 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.
typedef struct RdmnetSyncRdmResponse 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.
enum client_list_action_t |
How to apply the client entries to the existing client list in a client_list_update_received callback.
enum ept_status_code_t |
enum llrp_component_t |
Identifies the type of RPT Component with which an LLRP Target is associated.
A high-level reason for RDMnet connection failure.
Connect status defines for the BrokerConnectReplyMsg.
A high-level reason for RDMnet connection to be disconnected after successful connection.
Disconnect reason defines for the BrokerDisconnectMsg.
Dynamic UID Status Codes for the BrokerDynamicUidMapping struct.
Enumeration representing an action to take after an "EPT data received" callback completes.
Enumeration representing an action to take after an "RDM command received" callback completes.
enum rpt_client_type_t |
enum rpt_status_code_t |
RPT status code definitions.
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.
type | Type code. |
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.
[in] | new_response | The new response that has just been received. |
[in,out] | previously_saved_response | The previously saved response to which to append data. |
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.
event | Event code. |
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.
code | Connect status code. |
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.
[in] | saved_data_old | Saved data message to copy from. |
[out] | saved_data_new | Saved data message to copy to. |
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.
[in] | saved_status_old | Saved status message to copy from. |
[out] | saved_status_new | Saved status message to copy to. |
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.
[in] | saved_resp_old | Saved response to copy from. |
[out] | saved_resp_new | Saved response to copy to. |
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.
[in] | saved_resp_old | Saved response to copy from. |
[out] | saved_resp_new | Saved response to copy to. |
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.
[in] | saved_status_old | Saved status message to copy from. |
[out] | saved_status_new | Saved status message to copy to. |
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.
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.
event | Event code. |
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.
code | Disconnect reason code. |
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.
code | Dynamic UID status code. |
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.
[in] | saved_data | Data message for which to free resources. |
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.
[in] | saved_status | Status message for which to free resources. |
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.
[in] | saved_response | Response for which to free resources. |
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.
[in] | saved_status | Status message for which to free resources. |
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.
[in] | log_params | Optional: log parameters for the RDMnet library to use to log messages. If NULL, no logging will be performed. |
[in] | netint_config | Optional: a set of network interfaces to which to restrict multicast operation. |
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.
type | Type code. |
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.
[in] | data | Data message to save. |
[out] | saved_data | Message structure with copied and saved data. |
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.
[in] | status | Status message to save. |
[out] | saved_status | Status with copied and saved data. |
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.
[in] | command | Command to save. |
[out] | saved_command | Command with copied and saved data. |
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.
[in] | response | Response to save. |
[out] | saved_response | Response with copied and saved data. |
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.
[in] | command | Command to save. |
[out] | saved_command | Command with copied and saved data. |
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.
[in] | response | Response to save. |
[out] | saved_response | Response with copied and saved data. |
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.
[in] | status | Status message to save. |
[out] | saved_status | Status with copied and saved data. |