You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This control plane will support receiving messages via JSON/ YAML RPC on a websocket.
The module will open a port and wait for control messages.
Any client module is linked against ut-core will register interest in received message type from the control plane.
Full design of the implementation is yet to be defined but an idea on the server side you would register interest in messages
#defineUT_CONTROL_PLANE_MAX_KEY_SIZE (256)
#defineUT_CONTROL_PLANE_MAX_KEY_SIZE (64)
typedefstruct
{
charkey[UT_CONTROL_PLANE_MAX_KEY_SIZE];
ut_control_callback_tpCallback;
}CallbackEntry_t;
staticcallbackEntry_tcallbackList[UT_CONTROL_PLANE_MAX_CALLBACK_ENTRIES);
staticuint32_tlastFreeCallbackSlot=0; /* Must always be < UT_CONTROL_PLANE_MAX_CALLBACK_ENTRIES *//* Callback function that will be triggered */void (*ut_control_callback_t)( char*key, ut_kvp_instance_t*instance );
/* Init the control plane and create instance */ut_controlPlane_instance_t*UT_ControlPlane_Init( uint32_tmonitorPort );
/* pInstance, will be freed on return from the callback */UT_ControlPlane_RegisterCallbackOnMessage( ut_controlPlane_instance_t*pInstance, char*key, ut_control_callback_tcallbackFunction);
/* Exit the controlPlane instance and release */voidUT_ControlPlane_Exit( ut_controlPlane_instance_t*pInstance );
...
Examples
// Examples of someone calling the registration functionUT_ControlPlane_RegisterCallbackOnMessage(ut_controlPlane_instance_t*pInstance, "hdmicec/command", &myCallback);
UT_ControlPlane_RegisterCallbackOnMessage(ut_controlPlane_instance_t*pInstance, "hdmicec", &myCallback);
See -> rdkcentral/ut-core#20
This control plane will support receiving messages via JSON/ YAML RPC on a websocket.
The module will open a port and wait for control messages.
Any client module is linked against ut-core will register interest in received message type from the control plane.
Full design of the implementation is yet to be defined but an idea on the server side you would register interest in messages
On the client side, you would send message e.g.
Example Socket connection using https://libwebsockets.org/
The text was updated successfully, but these errors were encountered: