25 #ifndef RDMNET_DEVICE_H_ 
   26 #define RDMNET_DEVICE_H_ 
   29 #include "etcpal/uuid.h" 
   55 #define RDMNET_DEVICE_INVALID -1 
  174 #define RDMNET_VIRTUAL_ENDPOINT_INIT(endpoint_num) \ 
  176     (endpoint_num), NULL, 0, NULL, 0               \ 
  220 #define RDMNET_PHYSICAL_ENDPOINT_INIT(endpoint_num) \ 
  222     (endpoint_num), NULL, 0                         \ 
  297 #define RDMNET_DEVICE_CONFIG_DEFAULT_INIT(manu_id)                                             \ 
  299     {{0}}, {NULL, NULL, NULL, NULL, NULL, NULL, NULL}, NULL, RDMNET_SCOPE_CONFIG_DEFAULT_INIT, \ 
  300         {(0x8000 | manu_id), 0}, NULL, NULL, 0, NULL, 0, NULL, 0                               \ 
  318                                           const uint8_t*               response_data,
 
  319                                           size_t                       response_data_len);
 
  322                                            rdm_nack_reason_t            nack_reason);
 
  336                                          const char*                  status_string);
 
  340                                            const uint8_t*             response_data,
 
  341                                            uint8_t                    response_data_len);
 
  344                                             rdm_nack_reason_t          nack_reason);
 
  350                                                     size_t                              num_endpoints);
 
  355                                                    size_t                             num_endpoints);
 
  358                                               const uint16_t* endpoint_ids,
 
  359                                               size_t          num_endpoints);
 
  362                                                    uint16_t        endpoint_id,
 
  363                                                    const RdmUid*   responder_uids,
 
  364                                                    size_t          num_responders);
 
  366                                                     uint16_t          endpoint_id,
 
  368                                                     size_t            num_responders);
 
  370                                                      uint16_t                               endpoint_id,
 
  372                                                      size_t                                 num_responders);
 
  375                                                       uint16_t        endpoint_id,
 
  376                                                       const RdmUid*   responder_uids,
 
  377                                                       size_t          num_responders);
 
  379                                                        uint16_t          endpoint_id,
 
  381                                                        size_t            num_responders);
 
  383                                                         uint16_t        endpoint_id,
 
  384                                                         const RdmUid*   responder_uids,
 
  385                                                         size_t          num_responders);
 
  391                                                   const char*                new_search_domain,
 
API definitions used by RDMnet clients (controllers and devices)
 
rdmnet_disconnect_reason_t
Disconnect reason defines for the BrokerDisconnectMsg.
Definition: common.h:85
 
rpt_status_code_t
RPT status code definitions.
Definition: common.h:53
 
void(* RdmnetDeviceConnectFailedCallback)(rdmnet_device_t handle, const RdmnetClientConnectFailedInfo *info, void *context)
A connection attempt failed between a device and a broker.
Definition: device.h:73
 
etcpal_error_t rdmnet_device_remove_endpoint(rdmnet_device_t handle, uint16_t endpoint_id)
Remove an endpoint from a device.
Definition: device.c:656
 
etcpal_error_t rdmnet_device_add_static_responders(rdmnet_device_t handle, uint16_t endpoint_id, const RdmUid *responder_uids, size_t num_responders)
Add one or more responders with static UIDs to a virtual endpoint.
Definition: device.c:728
 
etcpal_error_t rdmnet_device_destroy(rdmnet_device_t handle, rdmnet_disconnect_reason_t disconnect_reason)
Destroy a device instance.
Definition: device.c:257
 
struct RdmnetVirtualEndpointConfig RdmnetVirtualEndpointConfig
Configuration information for a virtual endpoint on a device.
 
etcpal_error_t rdmnet_device_send_rdm_nack(rdmnet_device_t handle, const RdmnetSavedRdmCommand *received_cmd, rdm_nack_reason_t nack_reason)
Send an RDM NACK response from a device.
Definition: device.c:316
 
etcpal_error_t rdmnet_device_remove_physical_responders(rdmnet_device_t handle, uint16_t endpoint_id, const RdmUid *responder_uids, size_t num_responders)
Remove one or more responders from a physical endpoint.
Definition: device.c:1073
 
etcpal_error_t rdmnet_device_add_physical_responders(rdmnet_device_t handle, uint16_t endpoint_id, const RdmnetPhysicalEndpointResponder *responders, size_t num_responders)
Add one or more responders to a physical endpoint.
Definition: device.c:856
 
struct RdmnetPhysicalEndpointConfig RdmnetPhysicalEndpointConfig
Configuration information for a physical endpoint on a device.
 
struct RdmnetDeviceConfig RdmnetDeviceConfig
A set of information that defines the startup parameters of an RDMnet Device.
 
void rdmnet_device_set_callbacks(RdmnetDeviceConfig *config, RdmnetDeviceConnectedCallback connected, RdmnetDeviceConnectFailedCallback connect_failed, RdmnetDeviceDisconnectedCallback disconnected, RdmnetDeviceRdmCommandReceivedCallback rdm_command_received, RdmnetDeviceLlrpRdmCommandReceivedCallback llrp_rdm_command_received, RdmnetDeviceDynamicUidStatusCallback dynamic_uid_status_received, void *context)
Set the main callbacks in an RDMnet device configuration structure.
Definition: device.c:182
 
etcpal_error_t rdmnet_device_send_rdm_update_from_responder(rdmnet_device_t handle, const RdmnetSourceAddr *source_addr, uint16_t param_id, const uint8_t *data, size_t data_len)
Send an asynchronous RDM GET response to update the value of a parameter on a sub-responder.
Definition: device.c:386
 
struct RdmnetDeviceCallbacks RdmnetDeviceCallbacks
A set of notification callbacks received about a device.
 
etcpal_error_t rdmnet_device_change_scope(rdmnet_device_t handle, const RdmnetScopeConfig *new_scope_config, rdmnet_disconnect_reason_t disconnect_reason)
Change the device's scope.
Definition: device.c:1154
 
etcpal_error_t rdmnet_device_add_physical_endpoint(rdmnet_device_t handle, const RdmnetPhysicalEndpointConfig *endpoint_config)
Add a physical endpoint to a device.
Definition: device.c:512
 
void(* RdmnetDeviceLlrpRdmCommandReceivedCallback)(rdmnet_device_t handle, const LlrpRdmCommand *cmd, RdmnetSyncRdmResponse *response, void *context)
An RDM command has been received over LLRP, addressed to a device.
Definition: device.h:106
 
etcpal_error_t rdmnet_device_send_rdm_update(rdmnet_device_t handle, uint16_t subdevice, uint16_t param_id, const uint8_t *data, size_t data_len)
Send an asynchronous RDM GET response to update the value of a local parameter.
Definition: device.c:352
 
struct RdmnetPhysicalEndpointResponder RdmnetPhysicalEndpointResponder
Identifying information for a physical RDM responder connected to an RDMnet gateway.
 
etcpal_error_t rdmnet_device_add_physical_endpoints(rdmnet_device_t handle, const RdmnetPhysicalEndpointConfig *endpoint_configs, size_t num_endpoints)
Add multiple physical endpoints to a device.
Definition: device.c:548
 
etcpal_error_t rdmnet_device_remove_static_responders(rdmnet_device_t handle, uint16_t endpoint_id, const RdmUid *responder_uids, size_t num_responders)
Remove one or more responders with static UIDs from a virtual endpoint.
Definition: device.c:920
 
etcpal_error_t rdmnet_device_add_virtual_endpoints(rdmnet_device_t handle, const RdmnetVirtualEndpointConfig *endpoint_configs, size_t num_endpoints)
Add multiple virtual endpoints to a device.
Definition: device.c:620
 
etcpal_error_t rdmnet_device_add_virtual_endpoint(rdmnet_device_t handle, const RdmnetVirtualEndpointConfig *endpoint_config)
Add a virtual endpoint to a device.
Definition: device.c:584
 
etcpal_error_t rdmnet_device_send_llrp_nack(rdmnet_device_t handle, const LlrpSavedRdmCommand *received_cmd, rdm_nack_reason_t nack_reason)
Send an ACK response to an RDM command received over LLRP.
Definition: device.c:483
 
etcpal_error_t rdmnet_device_change_search_domain(rdmnet_device_t handle, const char *new_search_domain, rdmnet_disconnect_reason_t disconnect_reason)
Change the device's DNS search domain.
Definition: device.c:1189
 
void(* RdmnetDeviceConnectedCallback)(rdmnet_device_t handle, const RdmnetClientConnectedInfo *info, void *context)
A device has successfully connected to a broker.
Definition: device.h:63
 
etcpal_error_t rdmnet_device_send_llrp_ack(rdmnet_device_t handle, const LlrpSavedRdmCommand *received_cmd, const uint8_t *response_data, uint8_t response_data_len)
Send an ACK response to an RDM command received over LLRP.
Definition: device.c:453
 
etcpal_error_t rdmnet_device_add_dynamic_responders(rdmnet_device_t handle, uint16_t endpoint_id, const EtcPalUuid *responder_ids, size_t num_responders)
Add one or more responders with dynamic UIDs to a virtual endpoint.
Definition: device.c:792
 
etcpal_error_t rdmnet_device_send_rdm_ack(rdmnet_device_t handle, const RdmnetSavedRdmCommand *received_cmd, const uint8_t *response_data, size_t response_data_len)
Send an RDM ACK response from a device.
Definition: device.c:286
 
void(* RdmnetDeviceDisconnectedCallback)(rdmnet_device_t handle, const RdmnetClientDisconnectedInfo *info, void *context)
A device which was previously connected to a broker has disconnected.
Definition: device.h:83
 
void(* RdmnetDeviceRdmCommandReceivedCallback)(rdmnet_device_t handle, const RdmnetRdmCommand *cmd, RdmnetSyncRdmResponse *response, void *context)
An RDM command has been received addressed to a device.
Definition: device.h:94
 
int rdmnet_device_t
A handle to an RDMnet device.
Definition: device.h:53
 
void rdmnet_device_config_init(RdmnetDeviceConfig *config, uint16_t manufacturer_id)
Initialize an RDMnet Device Config with default values for the optional config options.
Definition: device.c:156
 
void(* RdmnetDeviceDynamicUidStatusCallback)(rdmnet_device_t handle, const RdmnetDynamicUidAssignmentList *list, void *context)
The dynamic UID assignment status for a set of virtual responders has been received.
Definition: device.h:124
 
etcpal_error_t rdmnet_device_get_scope(rdmnet_device_t handle, char *scope_str_buf, EtcPalSockAddr *static_broker_addr)
Retrieve the device's current scope configuration.
Definition: device.c:1222
 
etcpal_error_t rdmnet_device_create(const RdmnetDeviceConfig *config, rdmnet_device_t *handle)
Create a new instance of RDMnet device functionality.
Definition: device.c:219
 
etcpal_error_t rdmnet_device_remove_endpoints(rdmnet_device_t handle, const uint16_t *endpoint_ids, size_t num_endpoints)
Remove multiple endpoints from a device.
Definition: device.c:688
 
etcpal_error_t rdmnet_device_remove_dynamic_responders(rdmnet_device_t handle, uint16_t endpoint_id, const EtcPalUuid *responder_ids, size_t num_responders)
Remove one or more responders with dynamic UIDs from a virtual endpoint.
Definition: device.c:1002
 
etcpal_error_t rdmnet_device_send_status(rdmnet_device_t handle, const RdmnetSavedRdmCommand *received_cmd, rpt_status_code_t status_code, const char *status_string)
Send an RPT status message from a device.
Definition: device.c:422
 
Basic types for parsed RDMnet messages.
 
An RDM command received from a remote LLRP Manager.
Definition: message.h:439
 
An RDM command received from a remote LLRP Manager.
Definition: message.h:459
 
Information provided by the library about an unsuccessful RDMnet client connection.
Definition: client.h:164
 
Information provided by the library about a successful RDMnet client connection.
Definition: client.h:151
 
Information provided by the library about an RDMnet client connection that disconnected after a succe...
Definition: client.h:196
 
A set of notification callbacks received about a device.
Definition: device.h:130
 
RdmnetDeviceDisconnectedCallback disconnected
Required.
Definition: device.h:133
 
RdmnetDeviceDynamicUidStatusCallback dynamic_uid_status_received
Optional.
Definition: device.h:136
 
RdmnetDeviceRdmCommandReceivedCallback rdm_command_received
Required.
Definition: device.h:134
 
RdmnetDeviceLlrpRdmCommandReceivedCallback llrp_rdm_command_received
Required.
Definition: device.h:135
 
RdmnetDeviceConnectFailedCallback connect_failed
Required.
Definition: device.h:132
 
void * context
(optional) Pointer to opaque data passed back with each callback.
Definition: device.h:137
 
RdmnetDeviceConnectedCallback connected
Required.
Definition: device.h:131
 
A set of information that defines the startup parameters of an RDMnet Device.
Definition: device.h:227
 
const RdmnetMcastNetintId * llrp_netints
(optional) A set of network interfaces to use for the LLRP target associated with this device.
Definition: device.h:281
 
const RdmnetPhysicalEndpointConfig * physical_endpoints
An array of initial physical endpoints that the device uses.
Definition: device.h:267
 
const char * search_domain
(optional) The device's configured search domain for discovery.
Definition: device.h:264
 
RdmnetScopeConfig scope_config
(optional) The device's configured RDMnet scope.
Definition: device.h:251
 
const RdmnetVirtualEndpointConfig * virtual_endpoints
An array of initial virtual endpoints that the device uses.
Definition: device.h:272
 
size_t num_llrp_netints
(optional) The size of the llrp_netints array.
Definition: device.h:283
 
uint8_t * response_buf
(optional) A data buffer to be used to respond synchronously to RDM commands.
Definition: device.h:245
 
size_t num_virtual_endpoints
Size of the virtual_endpoints array.
Definition: device.h:274
 
RdmnetDeviceCallbacks callbacks
A set of callbacks for the device to receive RDMnet notifications.
Definition: device.h:235
 
size_t num_physical_endpoints
Size of the physical_endpoints array.
Definition: device.h:269
 
RdmUid uid
(optional) The device's UID.
Definition: device.h:258
 
EtcPalUuid cid
The device's CID.
Definition: device.h:233
 
A list of mappings from dynamic UIDs to responder IDs received from an RDMnet broker.
Definition: message.h:245
 
A set of identifying information for a network interface, for multicast purposes.
Definition: common.h:364
 
Configuration information for a physical endpoint on a device.
Definition: device.h:198
 
uint16_t endpoint_id
The endpoint identifier for this endpoint.
Definition: device.h:200
 
size_t num_responders
Size of the responders array.
Definition: device.h:204
 
const RdmnetPhysicalEndpointResponder * responders
An array of initial physical RDM responders on this endpoint, identified by static UID.
Definition: device.h:202
 
Identifying information for a physical RDM responder connected to an RDMnet gateway.
Definition: device.h:181
 
RdmUid uid
The responder's UID.
Definition: device.h:183
 
RdmUid binding_uid
The binding UID received in the DISC_MUTE message from this responder.
Definition: device.h:190
 
uint16_t control_field
The control field received in the DISC_MUTE message from this responder.
Definition: device.h:185
 
An RDMnet RDM command received by this component.
Definition: message.h:53
 
An RDM command received by this component and saved for a later response.
Definition: message.h:73
 
A set of configuration information for a single scope in which an RDMnet client is participating.
Definition: client.h:224
 
The source address for an unsolicited RDM response generated by a local component.
Definition: client.h:66
 
This structure should not be manipulated directly - use the macros to access it:
Definition: common.h:214
 
Configuration information for a virtual endpoint on a device.
Definition: device.h:145
 
const EtcPalUuid * dynamic_responders
An array of initial virtual RDM responders on this endpoint, identified by RID.
Definition: device.h:152
 
size_t num_static_responders
Size of the static_responders array.
Definition: device.h:158
 
size_t num_dynamic_responders
Size of the dynamic_responders array.
Definition: device.h:154
 
const RdmUid * static_responders
An array of initial virtual RDM responders on this endpoint, identified by static UID.
Definition: device.h:156
 
uint16_t endpoint_id
The endpoint identifier for this endpoint.
Definition: device.h:147