ess_channel - RoseLeBlood/openess GitHub Wiki

OpenESS Channel

source file: ess_channel.h

class ess_channel : ess_object

all openess modules have n inputs channels or / and n outputs channels You can connect a input channel with a output channel.

The class is abstract you muss override the functions read

constructor

basic constructor with no parameters
set ess_object name to "ess_channel"
  • ess_channel();

name param [in] human readelble name for the channel
type param [in] type of the channel - input or output

set ess_object name to name

 name param [in] human readelble name for the channel
 type param [in] type of the channel
 channel param [in] which channel

public functions

get the using channel (id)
return the using channel

get the type of the channel
return the type of the channel

is the channel a input channel
return true when channel is a input channel
return false the channel is not a input channel
  • bool is_input();

is the channel a output channel
return true when channel is a output channel
return false the channel is not a output channel
  • bool is_output();

is the channel invalid
return true the channel is not a input or output channel
return false the channel is valid
  • bool is_invalid();

read from channel the output object read from input
sub class must ovveride this function

buffer param [out] the pointer to write the data to
offset param [in] the readed offset

channel name and other informations to string
return the channel string
  • virtual std::string to_string();

protected functions

set the channel id
channel param [in]  id  the new channel

set the type of this channel
name param [in] the new type of this channel

protected member

the channel id

the channel type

the using channel mutex
  • ess_mutex m_mutex;