OLE Developer Guide  Latest Git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ModelEntry Struct Reference

Detailed Description

The function table entry for a particular responder model.

This can be registered with the RDMHandler by calling RDMHandler_AddModel().

Data Fields

uint16_t model_id
 The model ID.
 
void(* activate_fn )()
 Activate function. More...
 
void(* deactivate_fn )()
 The function used to deactivate an RDM Model. More...
 
int(* ioctl_fn )(ModelIoctl command, uint8_t *data, unsigned int length)
 The generic catch-all function. More...
 
int(* request_fn )(const RDMHeader *header, const uint8_t *param_data)
 The function used to handle an RDM request. More...
 
void(* tasks_fn )()
 The tasks function. More...
 

Field Documentation

void(* ModelEntry::activate_fn)()

Activate function.

Called when the model is activated via RDMHandler_SetActiveModel().Activate function.

void(* ModelEntry::deactivate_fn)()

The function used to deactivate an RDM Model.

The deactivate function is called if this model is active, and another model becomes active via a call to RDMHandler_SetActiveModel().

int(* ModelEntry::ioctl_fn)(ModelIoctl command, uint8_t *data, unsigned int length)

The generic catch-all function.

Parameters
commandThe ioctl command to run.
dataarbitrary data, depends on the ModelIoctl.
lengththe size of the data.
Returns
An int, the meaning of which depends on the ModelIoctl.
See also
ModelIoctl for a list of commands.
int(* ModelEntry::request_fn)(const RDMHeader *header, const uint8_t *param_data)

The function used to handle an RDM request.

Parameters
headerThe RDM request header.
param_dataThe RDM parameter data, or NULL if there wasn't any.
Returns
The size of the RDM response, in g_rdm_buffer. The sign is used to indicate if a break should be sent or not. Negative means no break, positive will send a break. 0 means no response will be sent.
void(* ModelEntry::tasks_fn)()

The tasks function.

This is called periodically by RDMHandler_Tasks().


The documentation for this struct was generated from the following file: