Ocean
Ocean::Signals Class Reference

This class implements a signal array. More...

Public Member Functions

 Signals ()
 Creates an empty signal array. More...
 
 Signals (const unsigned int size)
 Creates a new signal array object by the number of requested signals. More...
 
 ~Signals ()
 Destructs a signal array. More...
 
void wait () const
 Returns after all signals has been pulsed. More...
 
void waitSubset (const unsigned int signalsCount) const
 Returns after a subset of signals has been pulsed. More...
 
bool wait (const unsigned int time) const
 Returns after all signals has been pulsed or the specified time has been elapsed. More...
 
bool waitSubset (const unsigned int signalsCount, const unsigned int time)
 Returns after a subset of signals has been pulsed or the specified time has been elapsed. More...
 
bool pulse ()
 Pulses all signals. More...
 
bool reset ()
 Resets all the signal. More...
 
unsigned int size () const
 Returns the number of signals. More...
 
void setSize (const unsigned int size)
 Changes the size of the signal array. More...
 
Signaloperator[] (const unsigned int index) const
 Returns one specific signal of this array. More...
 

Private Member Functions

 Signals (const Signals &otherSignals)=delete
 Disabled copy constructor. More...
 
Signalsoperator= (const Signals &otherSignals)=delete
 Disabled copy operator. More...
 

Private Attributes

SignalsignalObjects
 Array of stored signals. More...
 
unsigned int signalsSize
 Number of signals stored in the array. More...
 

Detailed Description

This class implements a signal array.

Constructor & Destructor Documentation

◆ Signals() [1/3]

Ocean::Signals::Signals ( )

Creates an empty signal array.

◆ Signals() [2/3]

Ocean::Signals::Signals ( const unsigned int  size)
explicit

Creates a new signal array object by the number of requested signals.

Parameters
sizeNumber of requested signals

◆ ~Signals()

Ocean::Signals::~Signals ( )

Destructs a signal array.

◆ Signals() [3/3]

Ocean::Signals::Signals ( const Signals otherSignals)
privatedelete

Disabled copy constructor.

Parameters
otherSignalsObject which would be copied

Member Function Documentation

◆ operator=()

Signals& Ocean::Signals::operator= ( const Signals otherSignals)
privatedelete

Disabled copy operator.

Parameters
otherSignalsObject which would be copied
Returns
Reference to this object

◆ operator[]()

Signal& Ocean::Signals::operator[] ( const unsigned int  index) const

Returns one specific signal of this array.

Parameters
indexSignal index to return
Returns
Specified signal

◆ pulse()

bool Ocean::Signals::pulse ( )

Pulses all signals.

Returns
True, if succeeded

◆ reset()

bool Ocean::Signals::reset ( )

Resets all the signal.

Returns
True, if succeeded

◆ setSize()

void Ocean::Signals::setSize ( const unsigned int  size)

Changes the size of the signal array.

All existing signals will be released before the new array is created.

Parameters
sizeNew signal array size

◆ size()

unsigned int Ocean::Signals::size ( ) const
inline

Returns the number of signals.

Returns
Signal number

◆ wait() [1/2]

void Ocean::Signals::wait ( ) const

Returns after all signals has been pulsed.

◆ wait() [2/2]

bool Ocean::Signals::wait ( const unsigned int  time) const

Returns after all signals has been pulsed or the specified time has been elapsed.

Parameters
timeMaximal wait time in ms
Returns
True, if all signals has been pulsed

◆ waitSubset() [1/2]

void Ocean::Signals::waitSubset ( const unsigned int  signalsCount) const

Returns after a subset of signals has been pulsed.

Parameters
signalsCountNumber of the first signals to wait for

◆ waitSubset() [2/2]

bool Ocean::Signals::waitSubset ( const unsigned int  signalsCount,
const unsigned int  time 
)

Returns after a subset of signals has been pulsed or the specified time has been elapsed.

Parameters
signalsCountNumber of the first signals to wait for
timeMaximal wait time in ms
Returns
True, if all specified signals has been pulsed

Field Documentation

◆ signalObjects

Signal* Ocean::Signals::signalObjects
private

Array of stored signals.

◆ signalsSize

unsigned int Ocean::Signals::signalsSize
private

Number of signals stored in the array.


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