gusimplewhiteboard
|
Class which emulates the 2-process channel synchronisation system from UPPAAL. More...
#include <Channels.hpp>
Public Member Functions | |
bool | waiting (int channel) |
check if a signal has been sent on a channel More... | |
void | send (int channel) |
synchronise two machines: sender More... | |
void | clear (int channel) |
clear sync signal from a channel More... | |
void | reset () |
reset all channel signals to zero More... | |
bool | operator== (const Channels &other) const |
comparison operator More... | |
Channels (const std::string &channel_values) | |
string constructor More... | |
std::string | description () const |
convert to a string More... | |
void | from_string (const std::string &str) |
convert from a string More... | |
![]() | |
ARRAY_PROPERTY (uint8_t, channels,(sizeof(gu_simple_message))) wb_channels() | |
Class which emulates the 2-process channel synchronisation system from UPPAAL.
This is implemented as a bit vector, 1 bit per channel
// send a signal to channel #4 channels = Channels_t(); channels.send(4); // wait for a channel signal to be sent channels = Channels_t(); while (!channels.recieve(4)) { }
Definition at line 87 of file Channels.hpp.
|
inline |
|
inline |
clear sync signal from a channel
Definition at line 97 of file Channels.hpp.
References CHANNEL_CLEAR.
Referenced by from_string().
|
inline |
convert to a string
Definition at line 110 of file Channels.hpp.
References CHANNEL_WAITING, and CHANNELS_COUNT.
|
inline |
convert from a string
Definition at line 124 of file Channels.hpp.
References CHANNELS_COUNT, clear(), IO_PIN_BIT_SIZE, and send().
Referenced by Channels().
|
inline |
comparison operator
Definition at line 103 of file Channels.hpp.
|
inline |
reset all channel signals to zero
Definition at line 100 of file Channels.hpp.
|
inline |
synchronise two machines: sender
Definition at line 94 of file Channels.hpp.
References CHANNEL_SEND.
Referenced by from_string().
|
inline |
check if a signal has been sent on a channel
Definition at line 91 of file Channels.hpp.
References CHANNEL_WAITING.