Argon RTOS
1.3.0
Tiny embedded real-time kernel
|
Channel API.
Classes | |
struct | ar_channel_t |
Channel. More... | |
class | Ar::Channel |
Channel. More... | |
class | Ar::TypedChannel< T > |
Typed channel. More... | |
Channels | |
ar_status_t | ar_channel_create (ar_channel_t *channel, const char *name, uint32_t width) |
Create a new channel. More... | |
ar_status_t | ar_channel_delete (ar_channel_t *channel) |
Delete an existing channel. More... | |
ar_status_t | ar_channel_send (ar_channel_t *channel, const void *value, uint32_t timeout) |
Send to a channel. More... | |
ar_status_t | ar_channel_receive (ar_channel_t *channel, void *value, uint32_t timeout) |
Receive from a channel. More... | |
const char * | ar_channel_get_name (ar_channel_t *channel) |
Get a channel's name. More... | |
ar_status_t ar_channel_create | ( | ar_channel_t * | channel, |
const char * | name, | ||
uint32_t | width | ||
) |
Create a new channel.
channel | Pointer to storage for the new channel. |
name | Optional name for the new channel. |
width | The size in bytes of the data passed through the channel. Set this parameter to 0 to use the default pointer-sized width. |
ar_status_t ar_channel_delete | ( | ar_channel_t * | channel | ) |
Delete an existing channel.
channel | Pointer to the channel. |
const char* ar_channel_get_name | ( | ar_channel_t * | channel | ) |
Get a channel's name.
channel | Pointer to the channel. |
ar_status_t ar_channel_receive | ( | ar_channel_t * | channel, |
void * | value, | ||
uint32_t | timeout | ||
) |
Receive from a channel.
channel | Pointer to the channel. |
value | Pointer to a location where the received data is written. |
timeout | The maximum number of milliseconds the caller is willing to wait before the receive is completed. |
ar_status_t ar_channel_send | ( | ar_channel_t * | channel, |
const void * | value, | ||
uint32_t | timeout | ||
) |
Send to a channel.
This function synchronously sends a value across the specified channel. If there is not a thread waiting to receive on the other side, then this function will block.
channel | Pointer to the channel. |
value | Pointer to value to send through the channel. |
timeout | The maximum number of milliseconds the caller is willing to wait before the send is completed. |