RDMnet  0.3.0
Implementation of ANSI E1.33 (RDMnet)
View other versions:
device.h File Reference

Overview

Definitions for the RDMnet Device API.

#include <stdbool.h>
#include "etcpal/uuid.h"
#include "rdm/uid.h"
#include "rdmnet/client.h"
#include "rdmnet/message.h"

Go to the source code of this file.

Data Structures

struct  RdmnetDeviceCallbacks
 A set of notification callbacks received about a device. More...
 
struct  RdmnetVirtualEndpointConfig
 Configuration information for a virtual endpoint on a device. More...
 
struct  RdmnetPhysicalEndpointResponder
 Identifying information for a physical RDM responder connected to an RDMnet gateway. More...
 
struct  RdmnetPhysicalEndpointConfig
 Configuration information for a physical endpoint on a device. More...
 
struct  RdmnetDeviceConfig
 A set of information that defines the startup parameters of an RDMnet Device. More...
 

Macros

#define RDMNET_DEVICE_INVALID   -1
 An invalid RDMnet device handle value.
 
#define RDMNET_VIRTUAL_ENDPOINT_INIT(endpoint_num)
 An initializer for an RdmnetVirtualEndpointConfig instance. More...
 
#define RDMNET_PHYSICAL_ENDPOINT_INIT(endpoint_num)
 An initializer for an RdmnetPhysicalEndpointConfig instance. More...
 
#define RDMNET_DEVICE_CONFIG_DEFAULT_INIT(manu_id)
 A default-value initializer for an RdmnetDeviceConfig struct. More...
 

Typedefs

typedef int rdmnet_device_t
 A handle to an RDMnet device.
 
typedef void(* RdmnetDeviceConnectedCallback) (rdmnet_device_t handle, const RdmnetClientConnectedInfo *info, void *context)
 A device has successfully connected to a broker. More...
 
typedef void(* RdmnetDeviceConnectFailedCallback) (rdmnet_device_t handle, const RdmnetClientConnectFailedInfo *info, void *context)
 A connection attempt failed between a device and a broker. More...
 
typedef void(* RdmnetDeviceDisconnectedCallback) (rdmnet_device_t handle, const RdmnetClientDisconnectedInfo *info, void *context)
 A device which was previously connected to a broker has disconnected. More...
 
typedef void(* RdmnetDeviceRdmCommandReceivedCallback) (rdmnet_device_t handle, const RdmnetRdmCommand *cmd, RdmnetSyncRdmResponse *response, void *context)
 An RDM command has been received addressed to a device. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef struct RdmnetDeviceCallbacks RdmnetDeviceCallbacks
 A set of notification callbacks received about a device.
 
typedef struct RdmnetVirtualEndpointConfig RdmnetVirtualEndpointConfig
 Configuration information for a virtual endpoint on a device. More...
 
typedef struct RdmnetPhysicalEndpointResponder RdmnetPhysicalEndpointResponder
 Identifying information for a physical RDM responder connected to an RDMnet gateway.
 
typedef struct RdmnetPhysicalEndpointConfig RdmnetPhysicalEndpointConfig
 Configuration information for a physical endpoint on a device. More...
 
typedef struct RdmnetDeviceConfig RdmnetDeviceConfig
 A set of information that defines the startup parameters of an RDMnet Device.
 

Functions

void rdmnet_device_config_init (RdmnetDeviceConfig *config, uint16_t manufacturer_id)
 Initialize an RDMnet Device Config with default values for the optional config options. More...
 
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. More...
 
etcpal_error_t rdmnet_device_create (const RdmnetDeviceConfig *config, rdmnet_device_t *handle)
 Create a new instance of RDMnet device functionality. More...
 
etcpal_error_t rdmnet_device_destroy (rdmnet_device_t handle, rdmnet_disconnect_reason_t disconnect_reason)
 Destroy a device instance. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
etcpal_error_t rdmnet_device_add_physical_endpoint (rdmnet_device_t handle, const RdmnetPhysicalEndpointConfig *endpoint_config)
 Add a physical endpoint to a device. More...
 
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. More...
 
etcpal_error_t rdmnet_device_add_virtual_endpoint (rdmnet_device_t handle, const RdmnetVirtualEndpointConfig *endpoint_config)
 Add a virtual endpoint to a device. More...
 
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. More...
 
etcpal_error_t rdmnet_device_remove_endpoint (rdmnet_device_t handle, uint16_t endpoint_id)
 Remove an endpoint from a device. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...