Argon RTOS  1.3.0
Tiny embedded real-time kernel
Ar::TypedChannel< T > Class Template Reference

#include <ar_classes.h>

+ Inheritance diagram for Ar::TypedChannel< T >:

Description

template<typename T>
class Ar::TypedChannel< T >

Typed channel.

+ Collaboration diagram for Ar::TypedChannel< T >:

Public Member Functions

 TypedChannel ()
 Default constructor.
 
 TypedChannel (const char *name)
 Constructor.
 
ar_status_t init (const char *name)
 Channel initialiser.
 
receive (uint32_t timeout=kArInfiniteTimeout)
 Receive from channel.
 
ar_status_t receive (T &value, uint32_t timeout=kArInfiniteTimeout)
 Receive from channel.
 
ar_status_t send (const T &value, uint32_t timeout=kArInfiniteTimeout)
 Send to channel.
 
- Public Member Functions inherited from Ar::Channel
 Channel ()
 Default constructor.
 
 Channel (const char *name, uint32_t width=0)
 Constructor.
 
 ~Channel ()
 Destructor.
 
ar_status_t init (const char *name, uint32_t width=0)
 Channel initialiser.
 
ar_status_t receive (void *value, uint32_t timeout=kArInfiniteTimeout)
 Receive from channel.
 
ar_status_t send (const void *value, uint32_t timeout=kArInfiniteTimeout)
 Send to channel.
 

Friends

T & operator<<= (T &lhs, TypedChannel< T > &rhs)
 Receive from channel.
 
T & operator>> (T &lhs, TypedChannel< T > &rhs)
 Send to channel.
 

Additional Inherited Members

- Public Attributes inherited from ar_channel_t
ar_list_t m_blockedReceivers
 List of blocked receiver threads.
 
ar_list_t m_blockedSenders
 List of blocked sender threads.
 
const char * m_name
 Name of the channel.
 
uint32_t m_width
 Size in bytes of the channel's data.