covers the inter-thread and ipc communication fascade
More...
#include <Context.hpp>
|
template<MessageC M0, MessageC M1, typename ... Messages, typename Enabled = typename std::enable_if<!std::is_integral<M1>::value, void>::type> |
void | send (M0 &&m0, M1 &&m1, Messages &&... msgs) |
| try send a batch of messages to the Context or attached ipc Contexts More...
|
|
template<MessageC M0, MessageC M1, typename ... Messages, typename Enabled = typename std::enable_if<!std::is_integral<M1>::value, void>::type> |
bool | trySend (M0 &&m0, M1 &&m1, Messages &&... msgs) |
| try to send a batch of message to the Context or attached ipc Contexts More...
|
|
template<MessageForwardIterC ForwardIt> |
void | send (ForwardIt begin, size_t n) |
| send a range of messages to the Context or attached ipc Contexts More...
|
|
template<MessageForwardIterC ForwardIt> |
bool | trySend (ForwardIt begin, size_t n) |
| try send a range of messages to the Context or attached ipc Contexts More...
|
|
template<MessageC Message> |
void | send (Message &&m) |
| send a message to the Context or attached ipc Contexts More...
|
|
template<MessageC Message> |
bool | trySend (Message &&m) |
| try to send a message to the Context or attached ipc Contexts if it wouldn't block More...
|
|
template<MessageC Message, typename ... Args> |
void | sendInPlace (Args &&... args) |
| send a message to all Clients in the Context or attached ipc Contexts More...
|
|
template<MessageC Message, typename ... Args> |
bool | trySendInPlace (Args &&... args) |
| try send a message to all Clients in the Context or attached ipc Contexts if it wouldn't block More...
|
|
Buffer & | buffer () |
| accessor - mostly used internally More...
|
|
template<size_t MaxMessageSize, typename... ContextProperties>
class hmbdc::app::context_detail::ThreadCommBase< MaxMessageSize, ContextProperties >
covers the inter-thread and ipc communication fascade
this type's interface is exposed thru Context and the type itself is not directly used by users
- Template Parameters
-
MaxMessageSize | What is the max message size, need at compile time if the value can only be determined at runtime, set this to 0. Things can still work but will lost some compile time checking advantages, see maxMessageSizeRuntime below |
ContextProperties | see types in context_property namespace |
◆ buffer()
template<size_t MaxMessageSize, typename... ContextProperties>
accessor - mostly used internally
- Returns
- underlying buffer used in the Context
◆ send() [1/3]
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageC M0, MessageC M1, typename ... Messages, typename Enabled = typename std::enable_if<!std::is_integral<M1>::value, void>::type>
try send a batch of messages to the Context or attached ipc Contexts
only the Clients that handles the Message will get it of course This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
- Template Parameters
-
◆ send() [2/3]
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageForwardIterC ForwardIt>
send a range of messages to the Context or attached ipc Contexts
only the Clients that handles the Message will get it of course This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
begin | a forward iterator point at the start of the range |
n | length of the range |
◆ send() [3/3]
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageC Message>
send a message to the Context or attached ipc Contexts
only the Clients that handles the Message will get it of course This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
- Template Parameters
-
◆ sendInPlace()
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageC Message, typename ... Args>
send a message to all Clients in the Context or attached ipc Contexts
construct the Message in buffer directly This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
- Template Parameters
-
Message | type |
typename | ... Args args |
◆ trySend() [1/3]
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageC M0, MessageC M1, typename ... Messages, typename Enabled = typename std::enable_if<!std::is_integral<M1>::value, void>::type>
try to send a batch of message to the Context or attached ipc Contexts
this call does not block and it is transactional - send all or none This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
- Template Parameters
-
- Returns
- true if send successfully
◆ trySend() [2/3]
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageForwardIterC ForwardIt>
try send a range of messages to the Context or attached ipc Contexts
this call does not block and it is transactional - send all or none This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
begin | a forward iterator point at the start of the range |
n | length of the range |
◆ trySend() [3/3]
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageC Message>
try to send a message to the Context or attached ipc Contexts if it wouldn't block
this call does not block - return false when buffer is full This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
- Template Parameters
-
- Returns
- true if send successfully
◆ trySendInPlace()
template<size_t MaxMessageSize, typename... ContextProperties>
template<MessageC Message, typename ... Args>
try send a message to all Clients in the Context or attached ipc Contexts if it wouldn't block
this call does not block - return false when buffer is full constructed the Message in buffer directly if returns true This function is threadsafe, which means you can call it anywhere in the code
- Parameters
-
- Template Parameters
-
Message | type |
typename | ... Args args |
- Returns
- true if send successfully
The documentation for this class was generated from the following file: