23 #ifndef RDMNET_CPP_DEVICE_H_ 
   24 #define RDMNET_CPP_DEVICE_H_ 
   34 #include "rdm/cpp/uid.h" 
   75                         size_t              num_dynamic_responders = 0);
 
   78                         const rdm::Uid*     static_responders,
 
   79                         size_t              num_static_responders,
 
   81                         size_t              num_dynamic_responders = 0);
 
   83                         const std::vector<rdm::Uid>&     static_responders,
 
   84                         const std::vector<etcpal::Uuid>& dynamic_responders = std::vector<etcpal::Uuid>{});
 
   91   std::vector<EtcPalUuid>     dynamic_responders_;
 
   92   std::vector<RdmUid>         static_responders_;
 
  102                                                     size_t              num_dynamic_responders)
 
  103     : config_{id, nullptr, 0, nullptr, 0}
 
  105   if (dynamic_responders && num_dynamic_responders)
 
  107     std::transform(dynamic_responders, dynamic_responders + num_dynamic_responders,
 
  108                    std::back_inserter(dynamic_responders_), [](
const etcpal::Uuid& rid) { 
return rid.
get(); });
 
  117     : config_{id, nullptr, 0, nullptr, 0}
 
  119   if (!dynamic_responders.empty())
 
  121     std::transform(dynamic_responders.begin(), dynamic_responders.end(), std::back_inserter(dynamic_responders_),
 
  136                                                     const rdm::Uid*     static_responders,
 
  137                                                     size_t              num_static_responders,
 
  139                                                     size_t              num_dynamic_responders)
 
  140     : config_{id, nullptr, 0, nullptr, 0}
 
  142   if (static_responders && num_static_responders)
 
  144     std::transform(static_responders, static_responders + num_static_responders, std::back_inserter(static_responders_),
 
  145                    [](
const rdm::Uid& uid) { 
return uid.get(); });
 
  147   if (dynamic_responders && num_dynamic_responders)
 
  149     std::transform(dynamic_responders, dynamic_responders + num_dynamic_responders,
 
  150                    std::back_inserter(dynamic_responders_), [](
const etcpal::Uuid& rid) { 
return rid.
get(); });
 
  162                                                     const std::vector<rdm::Uid>&     static_responders,
 
  163                                                     const std::vector<etcpal::Uuid>& dynamic_responders)
 
  164     : config_{id, nullptr, 0, nullptr, 0}
 
  166   if (!static_responders.empty())
 
  168     std::transform(static_responders.begin(), static_responders.end(), std::back_inserter(static_responders_),
 
  169                    [](
const rdm::Uid& uid) { return uid.get(); });
 
  171   if (!dynamic_responders.empty())
 
  173     std::transform(dynamic_responders.begin(), dynamic_responders.end(), std::back_inserter(dynamic_responders_),
 
  186 inline void VirtualEndpointConfig::UpdateConfig()
 
  188   if (!static_responders_.empty())
 
  193   if (!dynamic_responders_.empty())
 
  206                                                 uint16_t control_field,
 
  207                                                 rdm::Uid binding_uid = rdm::Uid{});
 
  220                                                                                    uint16_t control_field,
 
  221                                                                                    rdm::Uid binding_uid)
 
  222     : responder_{uid.get(), control_field, binding_uid.get()}
 
  261   std::vector<RdmnetPhysicalEndpointResponder> responders_;
 
  271                                                       size_t                           num_responders)
 
  272     : config_{id, nullptr, 0}
 
  274   if (responders && num_responders)
 
  276     std::transform(responders, responders + num_responders, std::back_inserter(responders_),
 
  286                                                       const std::vector<PhysicalEndpointResponder>& responders)
 
  287     : config_{id, nullptr, 0}
 
  289   if (!responders.empty())
 
  291     std::transform(responders.begin(), responders.end(), std::back_inserter(responders_),
 
  304 inline void PhysicalEndpointConfig::UpdateConfig()
 
  370       ETCPAL_UNUSED_ARG(
handle);
 
  371       ETCPAL_UNUSED_ARG(list);
 
  414                         const Settings&         settings,
 
  415                         const char*             scope_id_str,
 
  427                            const uint8_t*         response_data = 
nullptr,
 
  428                            size_t                 response_data_len = 0);
 
  434                               const uint8_t* data = 
nullptr,
 
  435                               size_t         data_len = 0);
 
  438                               const uint8_t*    data = 
nullptr,
 
  439                               size_t            data_len = 0);
 
  442                               const char*            status_string = 
nullptr);
 
  445                             const uint8_t*               response_data = 
nullptr,
 
  446                             uint8_t                      response_data_len = 0);
 
  462                                      const rdm::Uid& responder_uid,
 
  463                                      uint16_t        control_field,
 
  464                                      const rdm::Uid& binding_uid = rdm::Uid{});
 
  479   class TranslatedConfig
 
  482     TranslatedConfig(
const Settings&         settings,
 
  495   NotifyHandler* notify_{
nullptr};
 
  509     static_cast<Device::NotifyHandler*
>(context)->HandleConnectedToBroker(
handle, *info);
 
  519     static_cast<Device::NotifyHandler*
>(context)->HandleBrokerConnectFailed(
handle, *info);
 
  529     static_cast<Device::NotifyHandler*
>(context)->HandleDisconnectedFromBroker(
handle, *info);
 
  540     *response = 
static_cast<Device::NotifyHandler*
>(context)->HandleRdmCommand(
handle, *cmd).get();
 
  551     *response = 
static_cast<Device::NotifyHandler*
>(context)->HandleLlrpRdmCommand(
handle, *cmd).get();
 
  561     static_cast<Device::NotifyHandler*
>(context)->HandleDynamicUidStatus(
handle, *list);
 
  582     : cid(cid_in), uid(rdm::Uid::DynamicUidRequest(manufacturer_id))
 
  589   return (!cid.IsNull() && (uid.IsStatic() || uid.IsDynamicUidRequest()));
 
  610   TranslatedConfig config(settings, 
notify_handler, E133_DEFAULT_SCOPE, static_broker_addr);
 
  631                                      const char*             scope_id_str,
 
  634   TranslatedConfig config(settings, 
notify_handler, scope_id_str, static_broker_addr);
 
  736                                         const uint8_t*         response_data,
 
  737                                         size_t                 response_data_len)
 
  828                                            const char*            status_string)
 
  840                                          const uint8_t*               response_data,
 
  841                                          uint8_t                      response_data_len)
 
  890   if (endpoint_configs.empty())
 
  893   std::vector<RdmnetVirtualEndpointConfig> virtual_endpts;
 
  894   virtual_endpts.reserve(endpoint_configs.size());
 
  895   std::transform(endpoint_configs.begin(), endpoint_configs.end(), std::back_inserter(virtual_endpts),
 
  924   if (endpoint_configs.empty())
 
  927   std::vector<RdmnetPhysicalEndpointConfig> physical_endpts;
 
  928   physical_endpts.reserve(endpoint_configs.size());
 
  929   std::transform(endpoint_configs.begin(), endpoint_configs.end(), std::back_inserter(physical_endpts),
 
  959   if (endpoint_ids.empty())
 
 1019   if (responder_ids.empty())
 
 1022   std::vector<EtcPalUuid> ids;
 
 1023   ids.reserve(responder_ids.size());
 
 1024   std::transform(responder_ids.begin(), responder_ids.end(), std::back_inserter(ids),
 
 1043                                                   const std::vector<rdm::Uid>& responder_static_uids)
 
 1045   if (responder_static_uids.empty())
 
 1048   std::vector<RdmUid> uids;
 
 1049   uids.reserve(responder_static_uids.size());
 
 1050   std::transform(responder_static_uids.begin(), responder_static_uids.end(), std::back_inserter(uids),
 
 1051                  [](
const rdm::Uid& uid) { return uid.get(); });
 
 1071                                                   const rdm::Uid& responder_uid,
 
 1072                                                   uint16_t        control_field,
 
 1073                                                   const rdm::Uid& binding_uid)
 
 1109                                                    const std::vector<PhysicalEndpointResponder>& responders)
 
 1111   if (responders.empty())
 
 1114   std::vector<RdmnetPhysicalEndpointResponder> resps;
 
 1115   resps.reserve(responders.size());
 
 1116   std::transform(responders.begin(), responders.end(), std::back_inserter(resps),
 
 1172                                                      const std::vector<etcpal::Uuid>& responder_ids)
 
 1174   if (responder_ids.empty())
 
 1177   std::vector<EtcPalUuid> ids;
 
 1178   ids.reserve(responder_ids.size());
 
 1179   std::transform(responder_ids.begin(), responder_ids.end(), std::back_inserter(ids),
 
 1199                                                      const std::vector<rdm::Uid>& responder_static_uids)
 
 1201   if (responder_static_uids.empty())
 
 1204   std::vector<RdmUid> uids;
 
 1205   uids.reserve(responder_static_uids.size());
 
 1206   std::transform(responder_static_uids.begin(), responder_static_uids.end(), std::back_inserter(uids),
 
 1207                  [](
const rdm::Uid& uid) { return uid.get(); });
 
 1245   if (responder_uids.empty())
 
 1248   std::vector<RdmUid> uids;
 
 1249   uids.reserve(responder_uids.size());
 
 1250   std::transform(responder_uids.begin(), responder_uids.end(), std::back_inserter(uids),
 
 1251                  [](
const rdm::Uid& uid) { return uid.get(); });
 
 1274   std::string    scope_id(E133_SCOPE_STRING_PADDED_LENGTH, 0);
 
 1278     return Scope(scope_id, static_broker_addr);
 
 1285   if (!physical_endpoints_.empty())
 
 1288     config_.num_physical_endpoints = physical_endpoints_.size();
 
 1290   if (!virtual_endpoints_.empty())
 
 1292     config_.virtual_endpoints = virtual_endpoints_.data();
 
 1293     config_.num_virtual_endpoints = virtual_endpoints_.size();
 
 1299 inline Device::TranslatedConfig::TranslatedConfig(
const Settings&         settings,
 
 1306         ::rdmnet::internal::DeviceLibCbConnected,
 
 1307         ::rdmnet::internal::DeviceLibCbConnectFailed,
 
 1308         ::rdmnet::internal::DeviceLibCbDisconnected,
 
 1309         ::rdmnet::internal::DeviceLibCbRdmCommandReceived,
 
 1310         ::rdmnet::internal::DeviceLibCbLlrpRdmCommandReceived,
 
 1311         ::rdmnet::internal::DeviceLibCbDynamicUidStatus,
 
 1314       settings.response_buf,
 
 1317         static_broker_addr.get()
 
 1320       settings.search_domain.c_str(),
 
 1332   if (!settings.physical_endpoints.empty())
 
 1334     physical_endpoints_.reserve(settings.physical_endpoints.size());
 
 1335     std::transform(settings.physical_endpoints.begin(), settings.physical_endpoints.end(),
 
 1336                    std::back_inserter(physical_endpoints_),
 
 1337                    [](
const PhysicalEndpointConfig& config) { return config.get(); });
 
 1341   if (!settings.virtual_endpoints.empty())
 
 1343     virtual_endpoints_.reserve(settings.virtual_endpoints.size());
 
 1344     std::transform(settings.virtual_endpoints.begin(), settings.virtual_endpoints.end(),
 
 1345                    std::back_inserter(virtual_endpoints_),
 
 1346                    [](
const VirtualEndpointConfig& config) { return config.get(); });
 
 1350   if (!settings.llrp_netints.empty())
 
 1352     config_.llrp_netints = settings.llrp_netints.data();
 
 1353     config_.num_llrp_netints = settings.llrp_netints.size();
 
constexpr const EtcPalSockAddr & get() const noexcept
 
constexpr const EtcPalUuid & get() const noexcept
 
Information about a failed connection to a broker delivered to an RDMnet callback function.
Definition: client.h:219
 
Information about a successful connection to a broker delivered to an RDMnet callback function.
Definition: client.h:149
 
Information about a disconnect event from a broker delivered to an RDMnet callback function.
Definition: client.h:337
 
A base class for a class that receives notification callbacks from a device.
Definition: device.h:327
 
virtual void HandleBrokerConnectFailed(Handle handle, const ClientConnectFailedInfo &info)=0
A connection attempt failed between a device and a broker.
 
virtual void HandleConnectedToBroker(Handle handle, const ClientConnectedInfo &info)=0
A device has successfully connected to a broker.
 
virtual void HandleDisconnectedFromBroker(Handle handle, const ClientDisconnectedInfo &info)=0
A device which was previously connected to a broker has disconnected.
 
virtual void HandleDynamicUidStatus(Handle handle, const DynamicUidAssignmentList &list)
The dynamic UID assignment status for a set of virtual responders has been received.
Definition: device.h:368
 
virtual RdmResponseAction HandleLlrpRdmCommand(Handle handle, const llrp::RdmCommand &cmd)=0
An RDM command has been received over LLRP, addressed to a device.
 
virtual RdmResponseAction HandleRdmCommand(Handle handle, const RdmCommand &cmd)=0
An RDM command has been received addressed to a device.
 
An instance of RDMnet device functionality.
Definition: device.h:315
 
etcpal::Error RemoveEndpoints(const std::vector< uint16_t > &endpoint_ids)
Remove multiple endpoints from a device.
Definition: device.h:957
 
etcpal::Error RemoveEndpoint(uint16_t endpoint_id)
Remove an endpoint from a device.
Definition: device.h:943
 
etcpal::Error AddPhysicalResponders(uint16_t endpoint_id, const std::vector< PhysicalEndpointResponder > &responders)
Add multiple responders to a physical endpoint.
Definition: device.h:1108
 
etcpal::Error RemovePhysicalResponders(uint16_t endpoint_id, const std::vector< rdm::Uid > &responder_uids)
Remove multiple responders from a physical endpoint.
Definition: device.h:1243
 
Device(Device &&other)=default
Move a device instance.
 
etcpal::Error AddPhysicalEndpoints(const std::vector< PhysicalEndpointConfig > &endpoint_configs)
Add multiple physical endpoints to a device.
Definition: device.h:922
 
etcpal::Error RemoveVirtualResponder(uint16_t endpoint_id, const etcpal::Uuid &responder_id)
Remove a responder with a dynamic UID from a virtual endpoint.
Definition: device.h:1135
 
Device & operator=(Device &&other)=default
Move a device instance.
 
etcpal::Error RemovePhysicalResponder(uint16_t endpoint_id, const rdm::Uid &responder_uid)
Remove a responder from a physical endpoint.
Definition: device.h:1225
 
etcpal::Expected< Scope > scope() const
Retrieve the scope configuration associated with a device instance.
Definition: device.h:1272
 
etcpal::Error SendLlrpNack(const llrp::SavedRdmCommand &received_cmd, rdm_nack_reason_t nack_reason)
Send a negative acknowledge (NACK) response to an RDM command received by a device over LLRP.
Definition: device.h:851
 
etcpal::Error SendRdmAck(const SavedRdmCommand &received_cmd, const uint8_t *response_data=nullptr, size_t response_data_len=0)
Send an acknowledge (ACK) response to an RDM command received by a device.
Definition: device.h:735
 
etcpal::Error AddVirtualResponder(uint16_t endpoint_id, const etcpal::Uuid &responder_id)
Add a responder with a dynamic UID to a virtual endpoint.
Definition: device.h:980
 
constexpr NotifyHandler * notify_handler() const
Retrieve the NotifyHandler reference that this device was configured with.
Definition: device.h:1263
 
rdmnet_device_t Handle
A handle type used by the RDMnet library to identify device instances.
Definition: device.h:318
 
etcpal::Error ChangeSearchDomain(const char *new_search_domain, rdmnet_disconnect_reason_t disconnect_reason)
Change the device's DNS search domain.
Definition: device.h:723
 
void Shutdown(rdmnet_disconnect_reason_t disconnect_reason=kRdmnetDisconnectShutdown)
Shut down this device and deallocate resources.
Definition: device.h:664
 
etcpal::Error AddPhysicalEndpoint(const PhysicalEndpointConfig &physical_config)
Add a physical endpoint to a device.
Definition: device.h:909
 
constexpr Handle handle() const
Retrieve the handle of a device instance.
Definition: device.h:1257
 
etcpal::Error AddVirtualEndpoint(const VirtualEndpointConfig &endpoint_config)
Add a virtual endpoint to a device.
Definition: device.h:875
 
etcpal::Error ChangeScope(const char *new_scope_id_str, rdmnet_disconnect_reason_t disconnect_reason, const etcpal::SockAddr &static_broker_addr=etcpal::SockAddr{})
Change the device's RDMnet scope.
Definition: device.h:683
 
etcpal::Error AddVirtualEndpoints(const std::vector< VirtualEndpointConfig > &endpoint_configs)
Add multiple virtual endpoints to a device.
Definition: device.h:888
 
etcpal::Error RemoveVirtualResponders(uint16_t endpoint_id, const std::vector< etcpal::Uuid > &responder_ids)
Remove multiple responder with dynamic UIDs from a virtual endpoint.
Definition: device.h:1171
 
etcpal::Error AddPhysicalResponder(uint16_t endpoint_id, const rdm::Uid &responder_uid, uint16_t control_field, const rdm::Uid &binding_uid=rdm::Uid{})
Add a responder to a physical endpoint.
Definition: device.h:1070
 
etcpal::Error SendLlrpAck(const llrp::SavedRdmCommand &received_cmd, const uint8_t *response_data=nullptr, uint8_t response_data_len=0)
Send an acknowledge (ACK) response to an RDM command received by a device over LLRP.
Definition: device.h:839
 
etcpal::Error Startup(NotifyHandler ¬ify_handler, const Settings &settings, const char *scope_id_str, const etcpal::SockAddr &static_broker_addr=etcpal::SockAddr{})
Allocate resources and start up this device with the given configuration on the given RDMnet scope.
Definition: device.h:629
 
etcpal::Error AddVirtualResponders(uint16_t endpoint_id, const std::vector< etcpal::Uuid > &responder_ids)
Add multiple responders with dynamic UIDs to a virtual endpoint.
Definition: device.h:1017
 
etcpal::Error SendRptStatus(const SavedRdmCommand &received_cmd, rpt_status_code_t status_code, const char *status_string=nullptr)
Send an RPT status message from a device.
Definition: device.h:826
 
static constexpr Handle kInvalidHandle
An invalid Handle value.
Definition: device.h:320
 
etcpal::Error SendRdmNack(const SavedRdmCommand &received_cmd, rdm_nack_reason_t nack_reason)
Send a negative acknowledge (NACK) response to an RDM command received by a device.
Definition: device.h:747
 
etcpal::Error SendRdmUpdate(uint16_t param_id, const uint8_t *data=nullptr, size_t data_len=0)
Send an asynchronous RDM GET response to update the value of a local parameter.
Definition: device.h:773
 
etcpal::Error StartupWithDefaultScope(NotifyHandler ¬ify_handler, const Settings &settings, const etcpal::SockAddr &static_broker_addr=etcpal::SockAddr{})
Allocate resources and start up this device with the given configuration on the default RDMnet scope.
Definition: device.h:606
 
A list of mappings from dynamic UIDs to responder IDs received from an RDMnet broker.
Definition: dynamic_uid.h:98
 
Configuration information for a physical endpoint on a device.
Definition: device.h:251
 
const RdmnetPhysicalEndpointConfig & get() const noexcept
Get a const reference to the underlying C type.
Definition: device.h:298
 
PhysicalEndpointConfig(uint16_t id, const PhysicalEndpointResponder *responders=nullptr, size_t num_responders=0)
Create a physical endpoint configuration with an optional set of RDM responders.
Definition: device.h:269
 
Identifying information for a physical RDM responder connected to an RDMnet gateway.
Definition: device.h:203
 
ETCPAL_CONSTEXPR_14 PhysicalEndpointResponder(rdm::Uid uid, uint16_t control_field, rdm::Uid binding_uid=rdm::Uid{})
Create a physical endpoint responder from its identifying information.
Definition: device.h:219
 
ETCPAL_CONSTEXPR_14 const RdmnetPhysicalEndpointResponder & get() const noexcept
Get a const reference to the underlying C type.
Definition: device.h:227
 
An RDM command received over RDMnet and delivered to an RDMnet callback function.
Definition: rdm_command.h:43
 
A class representing a synchronous action to take in response to a received RDM command.
Definition: common.h:106
 
An RDM command received over RDMnet by a local component and saved for a later response.
Definition: rdm_command.h:87
 
ETCPAL_CONSTEXPR_14 RdmnetSavedRdmCommand & get() noexcept
Get a mutable reference to the underlying C type.
Definition: rdm_command.h:374
 
An RDMnet scope configuration.
Definition: client.h:460
 
const etcpal::SockAddr & static_broker_addr() const noexcept
The static broker address associated with this scope.
Definition: client.h:515
 
const std::string & id_string() const noexcept
The ID string of this scope.
Definition: client.h:506
 
The source address for an unsolicited RDM response generated by a local component.
Definition: client.h:39
 
constexpr const RdmnetSourceAddr & get() const noexcept
Get a const reference to the underlying C type.
Definition: client.h:52
 
Configuration information for a virtual endpoint on a device.
Definition: device.h:71
 
const RdmnetVirtualEndpointConfig & get() const noexcept
Get a const reference to the underlying C type.
Definition: device.h:180
 
VirtualEndpointConfig(uint16_t id, const etcpal::Uuid *dynamic_responders=nullptr, size_t num_dynamic_responders=0)
Create a virtual endpoint configuration with an optional set of virtual responders with dynamic UIDs.
Definition: device.h:100
 
An RDM command received over LLRP and delivered to an RDMnet callback function.
Definition: llrp_rdm_command.h:46
 
An RDM command received over LLRP by a local component and saved for a later response.
Definition: llrp_rdm_command.h:91
 
ETCPAL_CONSTEXPR_14 LlrpSavedRdmCommand & get() noexcept
Get a mutable reference to the underlying C type.
Definition: llrp_rdm_command.h:391
 
C++ wrapper for RDMnet client API definitions.
 
C++ wrapper for the RDMnet init/deinit functions.
 
RDMnet C++ message type definitions.
 
Definitions for the RDMnet Device API.
 
#define ETCPAL_CONSTEXPR_14
 
#define ETCPAL_CONSTEXPR_14_OR_INLINE
 
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
 
@ kRdmnetDisconnectShutdown
The remote component is shutting down.
Definition: common.h:87
 
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
 
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
 
#define RDMNET_DEVICE_INVALID
An invalid RDMnet device handle value.
Definition: device.h:55
 
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
 
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
 
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
 
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
 
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
 
int rdmnet_device_t
A handle to an RDMnet device.
Definition: device.h:53
 
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
 
A namespace which contains all C++ language definitions in the RDMnet library.
Definition: broker.h:45
 
An RDM command received from a remote LLRP Manager.
Definition: message.h:439
 
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 information that defines the startup parameters of an RDMnet Device.
Definition: device.h:227
 
const RdmnetPhysicalEndpointConfig * physical_endpoints
An array of initial physical endpoints that the device uses.
Definition: device.h:267
 
A list of mappings from dynamic UIDs to responder IDs received from an RDMnet broker.
Definition: message.h:245
 
Configuration information for a physical endpoint on a device.
Definition: device.h:198
 
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
 
An RDMnet RDM command received by this component.
Definition: message.h:53
 
A set of configuration information for a single scope in which an RDMnet client is participating.
Definition: client.h:224
 
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
 
A set of configuration settings that a device needs to initialize.
Definition: device.h:378
 
uint8_t * response_buf
A data buffer to be used to respond synchronously to RDM commands.
Definition: device.h:385
 
bool IsValid() const
Determine whether a device Settings instance contains valid data for RDMnet operation.
Definition: device.h:587
 
std::vector< RdmnetMcastNetintId > llrp_netints
(optional) A set of network interfaces to use for the LLRP target associated with this device.
Definition: device.h:394
 
rdm::Uid uid
The device's RDM UID. For a dynamic UID, use rdm::Uid::DynamicUidRequest().
Definition: device.h:380
 
std::string search_domain
The device's search domain for discovering brokers.
Definition: device.h:381
 
etcpal::Uuid cid
The device's Component Identifier (CID).
Definition: device.h:379
 
Settings()=default
Create an empty, invalid data structure by default.
 
std::vector< VirtualEndpointConfig > virtual_endpoints
Array of configurations for virtual endpoints that are present on the device at startup.
Definition: device.h:388
 
std::vector< PhysicalEndpointConfig > physical_endpoints
Array of configurations for physical endpoints that are present on the device at startup.
Definition: device.h:390