#include <sgnlman.h>
Public Methods | |
Signalman (const string &newName=string(""), const unsigned newBeatInterval=186, const unsigned newSetInterval=750) | |
virtual | ~Signalman () |
Signalman & | operator= (const Signalman &other) |
int | operator== (const Signalman &other) const |
int | operator< (const Signalman &other) const |
void | beatSequence (Tapper &tapper, const string &sequence) const |
Beat out the sequence of rings for a bell code. More... | |
const string & | getName () const |
unsigned | getBeatInterval () const |
void | setBeatInterval (const unsigned newInterval) |
unsigned | getSetInterval () const |
void | setSetInterval (const unsigned newInterval) |
int | isBusy () |
void | listenToBell (Bell &newBell, const Monitor::Utility::CallbackBase &timeoutCallback) |
Start listening to a bell in order to recognise a bell code. More... | |
const string | stopListeningToBell () |
Determine what the sequence just heard was. More... | |
Private Methods | |
void | hearBell () |
Hear a ring of the bell being listened to. More... | |
Private Attributes | |
string | name |
Name of signalman. More... | |
unsigned | beatInterval |
Time, in milliseconds, between individual beats. More... | |
unsigned | setInterval |
Time, in milliseconds, between sets of beats. More... | |
Monitor::Utility::Timer * | ringTimer |
Timer to measure interval between bell rings when listening to a bell in order to recognise a bell code. More... | |
Monitor::Utility::Timeout * | ringTimeout |
Timeout to stop listening to a bell in order to recognise a bell code. More... | |
unsigned | heardIntervals [65] |
Array of intervals for bell code being listened to. More... |
|
Definition at line 53 of file sgnlman.cpp. References _USEMYTRACE_. |
|
Definition at line 65 of file sgnlman.cpp. References _USEMYTRACE_, ringTimeout, and ringTimer. |
|
Beat out the sequence of rings for a bell code.
Definition at line 109 of file sgnlman.cpp. References _USEMYTRACE_, beatInterval, and setInterval. |
|
Definition at line 163 of file sgnlman.cpp. References _USEMYTRACE_, and beatInterval. |
|
Definition at line 102 of file sgnlman.h. References name. |
|
Definition at line 185 of file sgnlman.cpp. References _USEMYTRACE_, and setInterval. |
|
Hear a ring of the bell being listened to.
Definition at line 246 of file sgnlman.cpp. References _USEMYTRACE_, heardIntervals, Monitor::Utility::Timeout::reset, Monitor::Utility::Timer::restart, ringTimeout, and ringTimer. |
|
Definition at line 207 of file sgnlman.cpp. References _USEMYTRACE_, ringTimeout, and ringTimer. |
|
Start listening to a bell in order to recognise a bell code.
|
|
Definition at line 101 of file sgnlman.cpp. References name. |
|
Definition at line 79 of file sgnlman.cpp. References beatInterval, name, and setInterval. |
|
Definition at line 91 of file sgnlman.cpp. References beatInterval, name, and setInterval. |
|
Definition at line 174 of file sgnlman.cpp. References _USEMYTRACE_, and beatInterval. |
|
Definition at line 196 of file sgnlman.cpp. References _USEMYTRACE_, and setInterval. |
|
Determine what the sequence just heard was.
Definition at line 270 of file sgnlman.cpp. References _USEMYTRACE_, heardIntervals, ringTimeout, and ringTimer. |
|
Time, in milliseconds, between individual beats.
Definition at line 167 of file sgnlman.h. Referenced by beatSequence, getBeatInterval, operator=, operator==, and setBeatInterval. |
|
Array of intervals for bell code being listened to.
Definition at line 188 of file sgnlman.h. Referenced by hearBell, and stopListeningToBell. |
|
Name of signalman.
Definition at line 162 of file sgnlman.h. Referenced by getName, operator<, operator=, and operator==. |
|
Timeout to stop listening to a bell in order to recognise a bell code.
Definition at line 183 of file sgnlman.h. Referenced by hearBell, isBusy, stopListeningToBell, and ~Signalman. |
|
Timer to measure interval between bell rings when listening to a bell in order to recognise a bell code.
Definition at line 178 of file sgnlman.h. Referenced by hearBell, isBusy, stopListeningToBell, and ~Signalman. |
|
Time, in milliseconds, between sets of beats.
Definition at line 172 of file sgnlman.h. Referenced by beatSequence, getSetInterval, operator=, operator==, and setSetInterval. |