The parameters for rf_iface_start(). More...
#include "rf_library.h"
Data Fields | |
size_t | size |
Size of this structure. | |
int | api_version_major |
Major version number of client API. This should be set to RF_API_VERSION_MAJOR. | |
int | api_version_minor |
Minor version number of client API. This should be set to RF_API_VERSION_MINOR. | |
RF_DFE_PORTS * | dfe_ports |
Indicates the functionality supported by the DFE client. More... | |
message_callback_fn * | message_callback |
A function implemented by the client that will be called by the DFE Interface when a reply message has been received from the DFE Interface. More... | |
void * | message_callback_args |
A handle to client data that the DFE Interface will pass into every call to message_callback(). More... | |
int | global_cfg_method |
The method used to initialize the global configuration. More... | |
RF_GLOBAL_CFG_FROM | global_cfg_from |
Parameters for the method used to initialize the global configuration. More... | |
The parameters for rf_iface_start().
RF_DFE_PORTS* RF_IFACE_PARAMS::dfe_ports |
Indicates the functionality supported by the DFE client.
If a slot is TRUE
that associated functional group is supported. If a slot is FALSE
, the DFE Interface will reject calls to rf_send_message()
functions that are part of that group. If this pointer is NULL
, it defaults to TRUE
for all DFE ports.
RF_GLOBAL_CFG_FROM RF_IFACE_PARAMS::global_cfg_from |
Parameters for the method used to initialize the global configuration.
If the method is RF_GLOBAL_CFG_FROM_CBFC, rf_iface_start() will request the global config from the central blade controller and wait for it to be delivered. If the method is RF_GLOBAL_CFG_FROM_DIRECTORY, a filename will be constructed and used to load the global configuration from a JSON file. If the method is RF_GLOBAL_CFG_FROM_JSON_OBJECT, the JSON object represented by a Jansson object reference will be used to unpack the global configuration. If the method is RF_GLOBAL_CFG_FROM_JSON_STRING, the JSON object represented by a stringified JSON object will be parsed to provide the global configuration. If the method is RF_GLOBAL_CFG_FROM_DEFAULTS, then this field is ignored and sensible defaults will be used if no other method has already been used. Setting the method to anything but RF_GLOBAL_CFG_FROM_DEFAULTS should only be done once per process when calling rf_iface_start() (in the main thread). Calling rf_iface_start() from subsequent threads should use RF_GLOBAL_CFG_FROM_DEFAULTS. Any other method set be ignored in subsequent calls to rf_iface_start().
int RF_IFACE_PARAMS::global_cfg_method |
The method used to initialize the global configuration.
This must be one of the RF_GLOBAL_CFG_FROM_values enum values
message_callback_fn* RF_IFACE_PARAMS::message_callback |
A function implemented by the client that will be called by the DFE Interface when a reply message has been received from the DFE Interface.
The message_callback() function is customer code running in the DFE Interface reactor thread. It should therefore execute quickly or the reactor will block. Ideally it will simply pass farm_reply in a message to a separate thread.
args | The opaque value passed through unchanged from the message_callback_args param to rf_iface_start(). |
farm_reply | Contains the JSON message structure defined in the documentation. |
TRUE
normally. If successful, farm_reply.payload should be freed by message_callback() or a proxy, with rf_free_payload() when it is no longer required. If there were non-critical errors, these should be transmitted to the DFE client by methods internal to message_callback().FALSE
return is a catastrophic error that will result in shutting down the DFE Interface. void* RF_IFACE_PARAMS::message_callback_args |
A handle to client data that the DFE Interface will pass into every call to message_callback().
The associated data must remain valid until rf_iface_stop() is called to stop the RIP farm. May be NULL
.