le_comm.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* le_comm_CallbackHandlerFunc_t) (void *handle, short events)
 

Functions

LE_SHARED void * le_comm_Create (const int argc, const char *argv[], le_result_t *resultPtr)
 
LE_SHARED le_result_t le_comm_RegisterHandleMonitor (void *handle, le_comm_CallbackHandlerFunc_t handlerFunc, short events)
 
LE_SHARED le_result_t le_comm_Delete (void *handle)
 
LE_SHARED le_result_t le_comm_Connect (void *handle)
 
LE_SHARED le_result_t le_comm_Disconnect (void *handle)
 
LE_SHARED le_result_t le_comm_Send (void *handle, const void *buf, size_t len)
 
LE_SHARED le_result_t le_comm_Receive (void *handle, void *buf, size_t *len)
 
LE_SHARED int le_comm_GetId (void *handle)
 
LE_SHARED void * le_comm_GetParentHandle (void *handle)
 

Detailed Description

This file contains the prototypes of Legato RPC Communication API, used to provide network communication between two or more remote-host systems.

Typedef Documentation

◆ le_comm_CallbackHandlerFunc_t

typedef void(* le_comm_CallbackHandlerFunc_t) (void *handle, short events)

Legato RPC Communication Types

Function Documentation

◆ le_comm_Connect()

LE_SHARED le_result_t le_comm_Connect ( void *  handle)

Function for Connecting a RPC Communication Channel

Returns
  • LE_OK if successfully.
Parameters
[in]handleCommunication channel.

◆ le_comm_Create()

LE_SHARED void* le_comm_Create ( const int  argc,
const char *  argv[],
le_result_t resultPtr 
)

Function for Creating a RPC Communication Channel

Return Code

  • LE_OK if successfully,
  • LE_WAITING if pending on asynchronous connection,
  • otherwise failure
Returns
Opaque handle to the Communication Channel.
Parameters
[in]argcNumber of strings pointed to by argv.
[in]argvPointer to an array of character strings.
[out]resultPtrReturn Code

◆ le_comm_Delete()

LE_SHARED le_result_t le_comm_Delete ( void *  handle)

Function for Deleting a RPC Communicaiton Channel

Returns
  • LE_OK if successfully.
Parameters
[in]handleCommunication channel.

◆ le_comm_Disconnect()

LE_SHARED le_result_t le_comm_Disconnect ( void *  handle)

Function for Disconnecting a RPC Communication Channel

Returns
  • LE_OK if successfully.
Parameters
[in]handleCommunication channel.

◆ le_comm_GetId()

LE_SHARED int le_comm_GetId ( void *  handle)

Get Support Functions Function to retrieve an ID for the specified handle. NOTE: For logging or display purposes only.

Returns
  • Non-zero integer, if successful.
  • Negative one (-1), otherwise.

◆ le_comm_GetParentHandle()

LE_SHARED void* le_comm_GetParentHandle ( void *  handle)

Function to retrieve the Parent Handle. NOTE: For asynchronous connections only.

Returns
  • Parent (Listening) handle, if successfully.
  • NULL, otherwise.

◆ le_comm_Receive()

LE_SHARED le_result_t le_comm_Receive ( void *  handle,
void *  buf,
size_t *  len 
)

Function for Receiving Data over a RPC Communication Channel

Returns
  • LE_OK if successfully.
Parameters
[in]handleCommunication channel.
[in]bufPointer to buffer to hold received data.
[in]lenSize of data received.

◆ le_comm_RegisterHandleMonitor()

LE_SHARED le_result_t le_comm_RegisterHandleMonitor ( void *  handle,
le_comm_CallbackHandlerFunc_t  handlerFunc,
short  events 
)

Function for Registering a Callback Handler function to monitor events on the specific handle

Returns
  • LE_OK if successfully.
Parameters
[in]handleCommunication channel handle.
[in]handlerFuncCallback Handler Function.
[in]eventsEvents to be monitored.

◆ le_comm_Send()

LE_SHARED le_result_t le_comm_Send ( void *  handle,
const void *  buf,
size_t  len 
)

Function for Sending Data over a RPC Communication Channel

Returns
  • LE_OK if successfully.
Parameters
[in]handleCommunication channel.
[in]bufPointer to buffer of data to be sent.
[in]lenSize of data to be sent.