RDMnet
0.3.0
Implementation of ANSI E1.33 (RDMnet)
|
View other versions:
|
Definitions for the RDMnet Controller API.
#include <stdbool.h>
#include "etcpal/uuid.h"
#include "etcpal/inet.h"
#include "rdm/uid.h"
#include "rdmnet/client.h"
#include "rdmnet/message.h"
Go to the source code of this file.
Data Structures | |
struct | RdmnetControllerCallbacks |
A set of notification callbacks received about a controller. More... | |
struct | RdmnetControllerRdmCmdHandler |
A buffer and set of callbacks which can be optionally provided to handle RDM commands addressed to a controller. More... | |
struct | RdmnetControllerRdmData |
A set of data for the controller library to use for handling RDM commands internally. More... | |
struct | RdmnetControllerConfig |
A set of information that defines the startup parameters of an RDMnet Controller. More... | |
Macros | |
#define | RDMNET_CONTROLLER_INVALID -1 |
An invalid RDMnet controller handle value. | |
#define | RDMNET_CONTROLLER_RDM_DATA_DEFAULT_INIT |
A default-value initializer for an RdmnetControllerRdmData struct. More... | |
#define | RDMNET_CONTROLLER_CONFIG_DEFAULT_INIT(manu_id) |
A default-value initializer for an RdmnetControllerConfig struct. More... | |
Typedefs | |
typedef int | rdmnet_controller_t |
A handle to an RDMnet controller. | |
typedef void(* | RdmnetControllerConnectedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetClientConnectedInfo *info, void *context) |
A controller has successfully connected to a broker. More... | |
typedef void(* | RdmnetControllerConnectFailedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetClientConnectFailedInfo *info, void *context) |
A connection attempt failed between a controller and a broker. More... | |
typedef void(* | RdmnetControllerDisconnectedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetClientDisconnectedInfo *info, void *context) |
A controller which was previously connected to a broker has disconnected. More... | |
typedef void(* | RdmnetControllerClientListUpdateReceivedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, client_list_action_t list_action, const RdmnetRptClientList *client_list, void *context) |
A client list update has been received from a broker. More... | |
typedef void(* | RdmnetControllerRdmResponseReceivedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetRdmResponse *resp, void *context) |
An RDM response has been received. More... | |
typedef void(* | RdmnetControllerStatusReceivedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetRptStatus *status, void *context) |
An RPT status message has been received in response to a previously-sent RDM command. More... | |
typedef void(* | RdmnetControllerResponderIdsReceivedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetDynamicUidAssignmentList *list, void *context) |
A set of previously-requested mappings of dynamic UIDs to responder IDs has been received. More... | |
typedef struct RdmnetControllerCallbacks | RdmnetControllerCallbacks |
A set of notification callbacks received about a controller. | |
typedef void(* | RdmnetControllerRdmCommandReceivedCallback) (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetRdmCommand *cmd, RdmnetSyncRdmResponse *response, void *context) |
An RDM command has been received addressed to a controller. More... | |
typedef void(* | RdmnetControllerLlrpRdmCommandReceivedCallback) (rdmnet_controller_t controller_handle, const LlrpRdmCommand *cmd, RdmnetSyncRdmResponse *response, void *context) |
An RDM command has been received over LLRP, addressed to a controller. More... | |
typedef struct RdmnetControllerRdmCmdHandler | RdmnetControllerRdmCmdHandler |
A buffer and set of callbacks which can be optionally provided to handle RDM commands addressed to a controller. More... | |
typedef struct RdmnetControllerRdmData | RdmnetControllerRdmData |
A set of data for the controller library to use for handling RDM commands internally. | |
typedef struct RdmnetControllerConfig | RdmnetControllerConfig |
A set of information that defines the startup parameters of an RDMnet Controller. | |
Functions | |
void | rdmnet_controller_config_init (RdmnetControllerConfig *config, uint16_t manufacturer_id) |
Initialize an RdmnetControllerConfig with default values for the optional config options. More... | |
void | rdmnet_controller_set_callbacks (RdmnetControllerConfig *config, RdmnetControllerConnectedCallback connected, RdmnetControllerConnectFailedCallback connect_failed, RdmnetControllerDisconnectedCallback disconnected, RdmnetControllerClientListUpdateReceivedCallback client_list_update_received, RdmnetControllerRdmResponseReceivedCallback rdm_response_received, RdmnetControllerStatusReceivedCallback status_received, RdmnetControllerResponderIdsReceivedCallback responder_ids_received, void *context) |
Set the main callbacks in an RDMnet controller configuration structure. More... | |
void | rdmnet_controller_set_rdm_cmd_callbacks (RdmnetControllerConfig *config, RdmnetControllerRdmCommandReceivedCallback rdm_command_received, RdmnetControllerLlrpRdmCommandReceivedCallback llrp_rdm_command_received, uint8_t *response_buf, void *context) |
Set callbacks to handle RDM commands in an RDMnet controller configuration structure. More... | |
etcpal_error_t | rdmnet_controller_create (const RdmnetControllerConfig *config, rdmnet_controller_t *handle) |
Create a new instance of RDMnet controller functionality. More... | |
etcpal_error_t | rdmnet_controller_destroy (rdmnet_controller_t controller_handle, rdmnet_disconnect_reason_t reason) |
Destroy a controller instance. More... | |
etcpal_error_t | rdmnet_controller_add_scope (rdmnet_controller_t controller_handle, const RdmnetScopeConfig *scope_config, rdmnet_client_scope_t *scope_handle) |
Add a new scope to a controller instance. More... | |
etcpal_error_t | rdmnet_controller_add_default_scope (rdmnet_controller_t controller_handle, rdmnet_client_scope_t *scope_handle) |
Add a new scope representing the default RDMnet scope to a controller instance. More... | |
etcpal_error_t | rdmnet_controller_remove_scope (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, rdmnet_disconnect_reason_t reason) |
Remove a previously-added scope from a controller instance. More... | |
etcpal_error_t | rdmnet_controller_change_scope (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetScopeConfig *new_scope_config, rdmnet_disconnect_reason_t disconnect_reason) |
Change the configuration of a scope on a controller. More... | |
etcpal_error_t | rdmnet_controller_get_scope (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, char *scope_str_buf, EtcPalSockAddr *static_broker_addr) |
Retrieve the scope configuration of a previously-added scope. More... | |
etcpal_error_t | rdmnet_controller_change_search_domain (rdmnet_controller_t controller_handle, const char *new_search_domain, rdmnet_disconnect_reason_t disconnect_reason) |
Change the controller's DNS search domain. More... | |
etcpal_error_t | rdmnet_controller_request_client_list (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle) |
Request a client list from a broker. More... | |
etcpal_error_t | rdmnet_controller_request_responder_ids (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmUid *uids, size_t num_uids) |
Request a set of responder IDs corresponding with dynamic responder UIDs from a broker. More... | |
etcpal_error_t | rdmnet_controller_send_rdm_command (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetDestinationAddr *destination, rdmnet_command_class_t command_class, uint16_t param_id, const uint8_t *data, uint8_t data_len, uint32_t *seq_num) |
Send an RDM command from a controller on a scope. More... | |
etcpal_error_t | rdmnet_controller_send_get_command (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetDestinationAddr *destination, uint16_t param_id, const uint8_t *data, uint8_t data_len, uint32_t *seq_num) |
Send an RDM GET command from a controller on a scope. More... | |
etcpal_error_t | rdmnet_controller_send_set_command (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetDestinationAddr *destination, uint16_t param_id, const uint8_t *data, uint8_t data_len, uint32_t *seq_num) |
Send an RDM SET command from a controller on a scope. More... | |
etcpal_error_t | rdmnet_controller_send_rdm_ack (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetSavedRdmCommand *received_cmd, const uint8_t *response_data, size_t response_data_len) |
Send an RDM ACK response from a controller on a scope. More... | |
etcpal_error_t | rdmnet_controller_send_rdm_nack (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_handle, const RdmnetSavedRdmCommand *received_cmd, rdm_nack_reason_t nack_reason) |
Send an RDM NACK response from a controller on a scope. More... | |
etcpal_error_t | rdmnet_controller_send_rdm_update (rdmnet_controller_t controller_handle, rdmnet_client_scope_t scope_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_controller_send_llrp_ack (rdmnet_controller_t controller_handle, const LlrpSavedRdmCommand *received_cmd, const uint8_t *response_data, uint8_t response_data_len) |
Send an LLRP RDM ACK response from a controller. More... | |
etcpal_error_t | rdmnet_controller_send_llrp_nack (rdmnet_controller_t controller_handle, const LlrpSavedRdmCommand *received_cmd, rdm_nack_reason_t nack_reason) |
Send an LLRP RDM NACK response from a controller. More... | |