`Preformatted text`
Client--------------------------------------- Code
COMPONENT_INIT
{
le_msg_ProtocolRef_t protocolRef;
le_msg_SessionRef_t sessionRef;
LE_INFO("==================>Client Start:\n");
// Open a session.
protocolRef = le_msg_GetProtocolRef(PROTOCOL_ID, sizeof(myproto_Msg_t));
LE_INFO("==================>Client :le_msg_GetProtocolRef\n");
sessionRef = le_msg_CreateSession(protocolRef, SERVER_INTERFACE_NAME);
LE_INFO("==================>Client :le_msg_CreateSession %p \n",sessionRef);
le_msg_SetSessionRecvHandler(sessionRef, NotifyHandlerFunc, NULL);
LE_INFO("==================>Client :le_msg_SetSessionRecvHandler\n");
le_msg_OpenSessionSync(sessionRef);
LE_INFO("==================>Client le_msg_OpenSessionSync\n");
}
Server Code-----------------------
COMPONENT_INIT
{
le_msg_ProtocolRef_t protocolRef;
le_msg_ServiceRef_t serviceRef;
LE_INFO("==================>Server Start:\n");
// Create my service and advertise it.
protocolRef = le_msg_GetProtocolRef(PROTOCOL_ID, sizeof(myproto_Msg_t));
LE_INFO("==================>Server le_msg_GetProtocolRef:\n");
serviceRef = le_msg_CreateService(protocolRef, SERVER_INTERFACE_NAME);
LE_INFO("==================>Server le_msg_CreateService:\n");
le_msg_SetServiceRecvHandler(serviceRef, RequestMsgHandlerFunc, NULL);
LE_INFO("==================>Server le_msg_SetServiceRecvHandler:\n");
le_msg_AdvertiseService(serviceRef);
LE_INFO("==================>Server: le_msg_AdvertiseService\n");
}
I am new to Legato/mangoh WP76XX
Can some one please help by providing simple Example.