Real Time Open Sound Control librtosc
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions | List of all members
rtosc::ThreadLink Class Reference

#include <thread-link.h>

Public Member Functions

 ThreadLink (size_t max_message_length, size_t max_messages)
 
 ~ThreadLink (void)
 
void write (const char *dest, const char *args,...)
 
void writeArray (const char *dest, const char *args, const rtosc_arg_t *aargs)
 
void raw_write (const char *msg)
 
bool hasNext (void) const
 
msg_t read (void)
 
msg_t peak (void) const
 
char * buffer (void)
 
size_t buffer_size (void) const
 

Detailed Description

ThreadLink - A simple wrapper around jack's ringbuffers desinged to make sending messages via rt-osc trivial. This class provides the basics of reading and writing events via fixed sized buffers, which can be specified at compile time.

Constructor & Destructor Documentation

rtosc::ThreadLink::ThreadLink ( size_t  max_message_length,
size_t  max_messages 
)
inline
rtosc::ThreadLink::~ThreadLink ( void  )
inline

Member Function Documentation

char* rtosc::ThreadLink::buffer ( void  )
inline

Raw write buffer access for more complicated task

size_t rtosc::ThreadLink::buffer_size ( void  ) const
inline

Access to write buffer length

bool rtosc::ThreadLink::hasNext ( void  ) const
inline
Returns
true iff there is another message to be read in the buffer
msg_t rtosc::ThreadLink::peak ( void  ) const
inline

Peak at last message read without reading another

void rtosc::ThreadLink::raw_write ( const char *  msg)
inline

Directly write message to ringbuffer

msg_t rtosc::ThreadLink::read ( void  )
inline

Read a new message from the ringbuffer

void rtosc::ThreadLink::write ( const char *  dest,
const char *  args,
  ... 
)
inline

Write message to ringbuffer

See Also
rtosc_message()
void rtosc::ThreadLink::writeArray ( const char *  dest,
const char *  args,
const rtosc_arg_t aargs 
)
inline

Write an arary of arguments to ringbuffer

See Also
rtosc_amessage()

The documentation for this class was generated from the following file: