#include <StreamCore.h>


Data Structures | |
| class | MutexLock |
Public Member Functions | |
| StreamCore () | |
| virtual | ~StreamCore () |
| bool | parse (const char *filename, const char *protocolname) |
| void | printProtocol () |
| const char * | name () |
Protected Types | |
| enum | ProtocolResult { Success, LockTimeout, WriteTimeout, ReplyTimeout, ReadTimeout, ScanError, FormatError, Abort, Fault } |
| enum | StartMode { StartNormal, StartInit, StartAsync } |
Protected Member Functions | |
| bool | attachBus (const char *busname, int addr, const char *param) |
| void | releaseBus () |
| bool | startProtocol (StartMode) |
| void | finishProtocol (ProtocolResult) |
| void | timerCallback () |
| bool | printValue (const StreamFormat &format, long value) |
| bool | printValue (const StreamFormat &format, double value) |
| bool | printValue (const StreamFormat &format, char *value) |
| long | scanValue (const StreamFormat &format, long &value) |
| long | scanValue (const StreamFormat &format, double &value) |
| long | scanValue (const StreamFormat &format, char *value, long maxlen) |
| long | scanValue (const StreamFormat &format) |
| StreamCore (const StreamCore &) | |
| bool | compile (StreamProtocolParser::Protocol *) |
| bool | evalCommand () |
| bool | evalOut () |
| bool | evalIn () |
| bool | evalEvent () |
| bool | evalWait () |
| bool | evalExec () |
| bool | evalConnect () |
| bool | evalDisconnect () |
| bool | formatOutput () |
| bool | matchInput () |
| bool | matchSeparator () |
| void | printSeparator () |
| bool | compileCommand (StreamProtocolParser::Protocol *, StreamBuffer &, const char *command, const char *&args) |
| bool | getFieldAddress (const char *fieldname, StreamBuffer &address)=0 |
| void | lockCallback (StreamIoStatus status) |
| void | writeCallback (StreamIoStatus status) |
| long | readCallback (StreamIoStatus status, const void *input, long size) |
| void | eventCallback (StreamIoStatus status) |
| void | execCallback (StreamIoStatus status) |
| void | connectCallback (StreamIoStatus status) |
| void | disconnectCallback (StreamIoStatus status) |
| const char * | getInTerminator (size_t &length) |
| const char * | getOutTerminator (size_t &length) |
| virtual void | protocolStartHook () |
| virtual void | protocolFinishHook (ProtocolResult) |
| virtual void | startTimer (unsigned long timeout)=0 |
| virtual bool | formatValue (const StreamFormat &, const void *fieldaddress)=0 |
| virtual bool | matchValue (const StreamFormat &, const void *fieldaddress)=0 |
| virtual void | lockMutex ()=0 |
| virtual void | releaseMutex ()=0 |
| virtual bool | execute () |
Protected Attributes | |
| StreamCore * | next |
| char * | streamname |
| unsigned long | flags |
| StreamBuffer | protocolname |
| unsigned long | lockTimeout |
| unsigned long | writeTimeout |
| unsigned long | replyTimeout |
| unsigned long | readTimeout |
| unsigned long | pollPeriod |
| unsigned long | maxInput |
| bool | inTerminatorDefined |
| bool | outTerminatorDefined |
| StreamBuffer | inTerminator |
| StreamBuffer | outTerminator |
| StreamBuffer | separator |
| StreamBuffer | commands |
| StreamBuffer | onInit |
| StreamBuffer | onWriteTimeout |
| StreamBuffer | onReplyTimeout |
| StreamBuffer | onReadTimeout |
| StreamBuffer | onMismatch |
| const char * | commandIndex |
| const char * | activeCommand |
| StreamBuffer | outputLine |
| StreamBuffer | inputBuffer |
| StreamBuffer | inputLine |
| long | consumedInput |
| ProtocolResult | runningHandler |
| StreamBuffer | fieldAddress |
| StreamIoStatus | lastInputStatus |
| bool | unparsedInput |
Static Protected Attributes | |
| static StreamCore * | first |
Private Member Functions | |
| bool | busSupportsEvent () |
| bool | busSupportsAsyncRead () |
| bool | busAcceptEvent (unsigned long mask, unsigned long replytimeout_ms) |
| void | busRelease () |
| bool | busLockRequest (unsigned long timeout_ms) |
| bool | busUnlock () |
| bool | busWriteRequest (const void *output, size_t size, unsigned long timeout_ms) |
| bool | busReadRequest (unsigned long replytimeout_ms, unsigned long readtimeout_ms, long expectedLength, bool async) |
| void | busFinish () |
| bool | busConnectRequest (unsigned long timeout_ms) |
| bool | busDisconnect () |
Private Attributes | |
| StreamBusInterface * | businterface |
Friends | |
| class | MutexLock |
| class | StreamProtocolParser::Protocol |
Definition at line 95 of file StreamCore.h.
enum StreamCore::ProtocolResult [protected] |
| Success | |
| LockTimeout | |
| WriteTimeout | |
| ReplyTimeout | |
| ReadTimeout | |
| ScanError | |
| FormatError | |
| Abort | |
| Fault |
Definition at line 100 of file StreamCore.h.
enum StreamCore::StartMode [protected] |
Definition at line 105 of file StreamCore.h.
| StreamCore::StreamCore | ( | const StreamCore & | ) | [protected] |
| StreamCore::StreamCore | ( | ) |
| virtual StreamCore::~StreamCore | ( | ) | [virtual] |
| bool StreamCore::attachBus | ( | const char * | busname, | |
| int | addr, | |||
| const char * | param | |||
| ) | [protected] |
| bool StreamBusInterface::Client::busAcceptEvent | ( | unsigned long | mask, | |
| unsigned long | replytimeout_ms | |||
| ) | [inline, protected, inherited] |
Definition at line 60 of file StreamBusInterface.h.
References StreamBusInterface::acceptEvent(), and StreamBusInterface::Client::businterface.
| bool StreamBusInterface::Client::busConnectRequest | ( | unsigned long | timeout_ms | ) | [inline, protected, inherited] |
Definition at line 86 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::connectRequest().
| bool StreamBusInterface::Client::busDisconnect | ( | ) | [inline, protected, inherited] |
Definition at line 89 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::disconnectRequest().
| void StreamBusInterface::Client::busFinish | ( | ) | [inline, protected, inherited] |
Definition at line 83 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::finish().
| bool StreamBusInterface::Client::busLockRequest | ( | unsigned long | timeout_ms | ) | [inline, protected, inherited] |
Definition at line 67 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::lockRequest().
| bool StreamBusInterface::Client::busReadRequest | ( | unsigned long | replytimeout_ms, | |
| unsigned long | readtimeout_ms, | |||
| long | expectedLength, | |||
| bool | async | |||
| ) | [inline, protected, inherited] |
Definition at line 77 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::readRequest().
| void StreamBusInterface::Client::busRelease | ( | ) | [inline, protected, inherited] |
Definition at line 64 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::release().
| bool StreamBusInterface::Client::busSupportsAsyncRead | ( | ) | [inline, protected, inherited] |
Definition at line 57 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::supportsAsyncRead().
| bool StreamBusInterface::Client::busSupportsEvent | ( | ) | [inline, protected, inherited] |
Definition at line 54 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::supportsEvent().
| bool StreamBusInterface::Client::busUnlock | ( | ) | [inline, protected, inherited] |
Definition at line 70 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::unlock().
| bool StreamBusInterface::Client::busWriteRequest | ( | const void * | output, | |
| size_t | size, | |||
| unsigned long | timeout_ms | |||
| ) | [inline, protected, inherited] |
Definition at line 73 of file StreamBusInterface.h.
References StreamBusInterface::Client::businterface, and StreamBusInterface::writeRequest().
| bool StreamCore::compile | ( | StreamProtocolParser::Protocol * | ) | [protected] |
| bool StreamCore::compileCommand | ( | StreamProtocolParser::Protocol * | , | |
| StreamBuffer & | , | |||
| const char * | command, | |||
| const char *& | args | |||
| ) | [protected] |
| void StreamCore::connectCallback | ( | StreamIoStatus | status | ) | [protected, virtual] |
Reimplemented from StreamBusInterface::Client.
| void StreamCore::disconnectCallback | ( | StreamIoStatus | status | ) | [protected, virtual] |
Reimplemented from StreamBusInterface::Client.
| bool StreamCore::evalCommand | ( | ) | [protected] |
| bool StreamCore::evalConnect | ( | ) | [protected] |
| bool StreamCore::evalDisconnect | ( | ) | [protected] |
| bool StreamCore::evalEvent | ( | ) | [protected] |
| bool StreamCore::evalExec | ( | ) | [protected] |
| bool StreamCore::evalIn | ( | ) | [protected] |
| bool StreamCore::evalOut | ( | ) | [protected] |
| bool StreamCore::evalWait | ( | ) | [protected] |
| void StreamCore::eventCallback | ( | StreamIoStatus | status | ) | [protected, virtual] |
Reimplemented from StreamBusInterface::Client.
| void StreamCore::execCallback | ( | StreamIoStatus | status | ) | [protected] |
| virtual bool StreamCore::execute | ( | ) | [protected, virtual] |
| void StreamCore::finishProtocol | ( | ProtocolResult | ) | [protected] |
| bool StreamCore::formatOutput | ( | ) | [protected] |
| virtual bool StreamCore::formatValue | ( | const StreamFormat & | , | |
| const void * | fieldaddress | |||
| ) | [protected, pure virtual] |
| bool StreamCore::getFieldAddress | ( | const char * | fieldname, | |
| StreamBuffer & | address | |||
| ) | [protected, pure virtual] |
| const char* StreamCore::getInTerminator | ( | size_t & | length | ) | [protected, virtual] |
Implements StreamBusInterface::Client.
| const char* StreamCore::getOutTerminator | ( | size_t & | length | ) | [protected, virtual] |
Implements StreamBusInterface::Client.
| void StreamCore::lockCallback | ( | StreamIoStatus | status | ) | [protected, virtual] |
Implements StreamBusInterface::Client.
| virtual void StreamCore::lockMutex | ( | ) | [protected, pure virtual] |
Referenced by StreamCore::MutexLock::MutexLock().
| bool StreamCore::matchInput | ( | ) | [protected] |
| bool StreamCore::matchSeparator | ( | ) | [protected] |
| virtual bool StreamCore::matchValue | ( | const StreamFormat & | , | |
| const void * | fieldaddress | |||
| ) | [protected, pure virtual] |
| const char* StreamCore::name | ( | ) | [inline, virtual] |
Implements StreamBusInterface::Client.
Definition at line 221 of file StreamCore.h.
References streamname.
| bool StreamCore::parse | ( | const char * | filename, | |
| const char * | protocolname | |||
| ) |
| void StreamCore::printProtocol | ( | ) |
| void StreamCore::printSeparator | ( | ) | [protected] |
| bool StreamCore::printValue | ( | const StreamFormat & | format, | |
| char * | value | |||
| ) | [protected] |
| bool StreamCore::printValue | ( | const StreamFormat & | format, | |
| long | value | |||
| ) | [protected] |
| bool StreamCore::printValue | ( | const StreamFormat & | format, | |
| double | value | |||
| ) | [protected] |
| virtual void StreamCore::protocolFinishHook | ( | ProtocolResult | ) | [inline, protected, virtual] |
Definition at line 208 of file StreamCore.h.
| virtual void StreamCore::protocolStartHook | ( | ) | [inline, protected, virtual] |
Definition at line 207 of file StreamCore.h.
| long StreamCore::readCallback | ( | StreamIoStatus | status, | |
| const void * | input, | |||
| long | size | |||
| ) | [protected, virtual] |
Reimplemented from StreamBusInterface::Client.
| void StreamCore::releaseBus | ( | ) | [protected] |
| virtual void StreamCore::releaseMutex | ( | ) | [protected, pure virtual] |
Referenced by StreamCore::MutexLock::~MutexLock().
| long StreamCore::scanValue | ( | const StreamFormat & | format, | |
| double & | value | |||
| ) | [protected] |
| long StreamCore::scanValue | ( | const StreamFormat & | format, | |
| char * | value, | |||
| long | maxlen | |||
| ) | [protected] |
| long StreamCore::scanValue | ( | const StreamFormat & | format, | |
| long & | value | |||
| ) | [protected] |
| long StreamCore::scanValue | ( | const StreamFormat & | format | ) | [protected] |
| bool StreamCore::startProtocol | ( | StartMode | ) | [protected] |
| virtual void StreamCore::startTimer | ( | unsigned long | timeout | ) | [protected, pure virtual] |
| void StreamCore::timerCallback | ( | ) | [protected] |
| void StreamCore::writeCallback | ( | StreamIoStatus | status | ) | [protected, virtual] |
Reimplemented from StreamBusInterface::Client.
friend class MutexLock [friend] |
Definition at line 120 of file StreamCore.h.
friend class StreamProtocolParser::Protocol [friend, inherited] |
Definition at line 84 of file StreamProtocol.h.
const char* StreamCore::activeCommand [protected] |
Definition at line 162 of file StreamCore.h.
StreamBusInterface* StreamBusInterface::Client::businterface [protected, inherited] |
Definition at line 53 of file StreamBusInterface.h.
Referenced by StreamBusInterface::Client::busAcceptEvent(), StreamBusInterface::Client::busConnectRequest(), StreamBusInterface::Client::busDisconnect(), StreamBusInterface::Client::busFinish(), StreamBusInterface::Client::busLockRequest(), StreamBusInterface::Client::busReadRequest(), StreamBusInterface::Client::busRelease(), StreamBusInterface::Client::busSupportsAsyncRead(), StreamBusInterface::Client::busSupportsEvent(), StreamBusInterface::Client::busUnlock(), and StreamBusInterface::Client::busWriteRequest().
const char* StreamCore::commandIndex [protected] |
Definition at line 161 of file StreamCore.h.
StreamBuffer StreamCore::commands [protected] |
Definition at line 155 of file StreamCore.h.
long StreamCore::consumedInput [protected] |
Definition at line 166 of file StreamCore.h.
StreamBuffer StreamCore::fieldAddress [protected] |
Definition at line 168 of file StreamCore.h.
StreamCore* StreamCore::first [static, protected] |
Definition at line 123 of file StreamCore.h.
unsigned long StreamCore::flags [protected] |
Definition at line 126 of file StreamCore.h.
StreamBuffer StreamCore::inputBuffer [protected] |
Definition at line 164 of file StreamCore.h.
StreamBuffer StreamCore::inputLine [protected] |
Definition at line 165 of file StreamCore.h.
StreamBuffer StreamCore::inTerminator [protected] |
Definition at line 152 of file StreamCore.h.
bool StreamCore::inTerminatorDefined [protected] |
Definition at line 150 of file StreamCore.h.
StreamIoStatus StreamCore::lastInputStatus [protected] |
Definition at line 170 of file StreamCore.h.
unsigned long StreamCore::lockTimeout [protected] |
Definition at line 144 of file StreamCore.h.
unsigned long StreamCore::maxInput [protected] |
Definition at line 149 of file StreamCore.h.
StreamCore* StreamCore::next [protected] |
Definition at line 122 of file StreamCore.h.
StreamBuffer StreamCore::onInit [protected] |
Definition at line 156 of file StreamCore.h.
StreamBuffer StreamCore::onMismatch [protected] |
Definition at line 160 of file StreamCore.h.
StreamBuffer StreamCore::onReadTimeout [protected] |
Definition at line 159 of file StreamCore.h.
StreamBuffer StreamCore::onReplyTimeout [protected] |
Definition at line 158 of file StreamCore.h.
StreamBuffer StreamCore::onWriteTimeout [protected] |
Definition at line 157 of file StreamCore.h.
StreamBuffer StreamCore::outputLine [protected] |
Definition at line 163 of file StreamCore.h.
StreamBuffer StreamCore::outTerminator [protected] |
Definition at line 153 of file StreamCore.h.
bool StreamCore::outTerminatorDefined [protected] |
Definition at line 151 of file StreamCore.h.
unsigned long StreamCore::pollPeriod [protected] |
Definition at line 148 of file StreamCore.h.
StreamBuffer StreamCore::protocolname [protected] |
Definition at line 143 of file StreamCore.h.
unsigned long StreamCore::readTimeout [protected] |
Definition at line 147 of file StreamCore.h.
unsigned long StreamCore::replyTimeout [protected] |
Definition at line 146 of file StreamCore.h.
ProtocolResult StreamCore::runningHandler [protected] |
Definition at line 167 of file StreamCore.h.
StreamBuffer StreamCore::separator [protected] |
Definition at line 154 of file StreamCore.h.
char* StreamCore::streamname [protected] |
Definition at line 125 of file StreamCore.h.
Referenced by name().
bool StreamCore::unparsedInput [protected] |
Definition at line 171 of file StreamCore.h.
unsigned long StreamCore::writeTimeout [protected] |
Definition at line 145 of file StreamCore.h.
1.7.1