Go to the documentation of this file.
18 #ifndef __LIBIPC_CHANNELCLIENT_H
19 #define __LIBIPC_CHANNELCLIENT_H
Unidirectional point-to-point messaging channel.
ChannelClient()
Constructor.
Singleton design pattern: only one instance is allowed.
Index< Request, MaximumRequests > m_requests
Contains ongoing requests.
virtual Result receiveAny(void *buffer, const Size msgSize, ProcessID *pid)
Try to receive message from any channel.
Represents a callback function.
const bool operator==(const struct Request &req) const
Index is a N-sized array of pointers to items of type T.
u32 ProcessID
Process Identification Number.
virtual Result syncReceiveFrom(void *buffer, const Size msgSize, const ProcessID pid)
Synchronous receive from one process.
static const Size MaximumRequests
Maximum number of concurrent outgoing requests.
Channel * findProducer(const ProcessID pid, const Size msgSize)
Get producer for a process.
CallbackFunction * callback
virtual Result connect(const ProcessID pid, const Size msgSize)
Connect to a process.
virtual ~ChannelClient()
Destructor.
Holds an outgoing request.
static const Size MaxConnectRetries
Maximum number of retries for establishing new connection.
const bool operator!=(const struct Request &req) const
virtual Result syncSendTo(const void *buffer, const Size msgSize, const ProcessID pid)
Synchronous send to one process.
unsigned int Size
Any sane size indicator cannot go negative.
virtual Result syncSendReceive(void *buffer, const Size msgSize, const ProcessID pid)
Synchronous send and receive to/from one process.
Client for using Channels on the local processor.
ChannelRegistry & getRegistry()
Get channel registry.
virtual Result initialize()
Initialize the ChannelClient.
virtual Result sendRequest(const ProcessID pid, void *buffer, const Size msgSize, CallbackFunction *callback)
Send asynchronous request message.
Registration for Channels.
struct ChannelClient::Request Request
Holds an outgoing request.
Channel * findConsumer(const ProcessID pid, const Size msgSize)
Get consumer for a process.
const ProcessID m_pid
Current Process ID.
virtual Result processResponse(const ProcessID pid, ChannelMessage *msg)
Process a response message.
ChannelRegistry m_registry
Contains registered channels.
Basic message format for sending on a Channel.