Ocean
|
This class is the base class for all streaming objects. More...
Public Types | |
enum | State { STATE_START , STATE_PAUSE , STATE_STOP , STATE_TYPE_CHANGED } |
Definition of different streaming states. More... | |
typedef MessageQueue::Id | SessionId |
Definition of a session id. More... | |
Public Member Functions | |
const std::string & | name () const |
Returns the name of this streaming object. More... | |
const std::string & | description () const |
Returns the description of this streaming object. More... | |
double | responseTimeout () const |
Returns the timeout value the streaming object waits for response messages. More... | |
virtual bool | setName (const std::string &name) |
Sets the name of this streaming object. More... | |
virtual bool | setDescription (const std::string &description) |
Sets the description of this streaming object. More... | |
bool | setResponseTimeout (const double timeout) |
Sets the timeout value the streaming object waits for response messages. More... | |
Protected Member Functions | |
Streaming () | |
Creates a new streaming object. More... | |
Streaming (const Streaming &streaming)=delete | |
Disabled copy constructor. More... | |
virtual | ~Streaming ()=default |
Destructs an object. More... | |
bool | parse (const unsigned char *data, const size_t size, bool &isResponse, std::string &message, std::string &value, SessionId &sessionId) |
Parses a command or a response. More... | |
Streaming & | operator= (const Streaming &streaming)=delete |
Disabled copy operator. More... | |
Static Protected Member Functions | |
static const std::string & | connectCommand () |
Definition of a connect command. More... | |
static const std::string & | connectResponseP () |
Definition of a positive connect response. More... | |
static const std::string & | connectResponseN () |
Definition of a negative connect response. More... | |
static const std::string & | disconnectCommand () |
Definition of a disconnect command. More... | |
static const std::string & | disconnectResponseP () |
Definition of a positive disconnect response. More... | |
static const std::string & | disconnectResponseN () |
Definition of a negative disconnect response. More... | |
static const std::string & | channelSelectCommand () |
Definition of a channel select command. More... | |
static const std::string & | channelSelectResponseP () |
Definition of a positive channel select response. More... | |
static const std::string & | channelSelectResponseN () |
Definition of a negative channel select response. More... | |
static const std::string & | startCommand () |
Definition of a start command. More... | |
static const std::string & | startResponseP () |
Definition of a positiv start response. More... | |
static const std::string & | startResponseN () |
Definition fo a negative start response. More... | |
static const std::string & | pauseCommand () |
Definition of a pause command. More... | |
static const std::string & | pauseResponseP () |
Definition of a positive pause response. More... | |
static const std::string & | pauseResponseN () |
Definition of a negative pause response. More... | |
static const std::string & | stopCommand () |
Definition of a stop command. More... | |
static const std::string & | stopResponseP () |
Definition of a positive stop response. More... | |
static const std::string & | stopResponseN () |
Definition of a negative stop response. More... | |
static const std::string & | clientPortCommand () |
Definition of a client port command. More... | |
static const std::string & | clientPortResponseP () |
Definition of a positive client port response. More... | |
static const std::string & | clientPortResponseN () |
Definition of a negative client port response. More... | |
static const std::string & | serverPortCommand () |
Definition of a server port command. More... | |
static const std::string & | serverPortResponseP () |
Definition of a positive server port response. More... | |
static const std::string & | serverPortResponseN () |
Definition of a negative server port response. More... | |
static const std::string & | channelRequestCommand () |
Definition of a channel request command. More... | |
static const std::string & | channelRequestResponseP () |
Definition of a positive channel request response. More... | |
static const std::string & | channelRequestResponseN () |
Definition of a negative channel request response. More... | |
static const std::string & | changedDataTypeCommand () |
Definition of a changed data type command. More... | |
static const std::string & | changedDataTypeResponseP () |
Definition of a positive changed data type request. More... | |
static const std::string & | changedDataTypeResponseN () |
Definition of a negative change data type request. More... | |
static const std::string & | dataTypeRequestCommand () |
Definition of a data type request command. More... | |
static const std::string & | dataTypeRequestResponseP () |
Definition of a positive data type request response. More... | |
static const std::string & | dataTypeRequestResponseN () |
Definition of a negative data type request response. More... | |
static std::string | createCommand (const std::string &command, const SessionId sessionId) |
Creates a new command message. More... | |
static std::string | createCommand (const std::string &command, const std::string &value, const SessionId sessionId) |
Creates a new command message with a value. More... | |
static std::string | createResponse (const std::string &response, const SessionId sessionId) |
Creates a new response message. More... | |
static std::string | createResponse (const std::string &response, const std::string &value, const SessionId sessionId) |
Creates a new response message with a value. More... | |
Protected Attributes | |
std::string | name_ |
Name of this streaming object. More... | |
std::string | description_ |
Description of this streaming object. More... | |
double | responseTimeout_ = 2.0 |
Timeout value for response messages. More... | |
MessageQueue | messageQueue_ = MessageQueue(100) |
Message queue. More... | |
This class is the base class for all streaming objects.
Definition of a session id.
|
protected |
Creates a new streaming object.
|
protecteddelete |
Disabled copy constructor.
streaming | Object which would be copied |
|
protectedvirtualdefault |
Destructs an object.
|
staticprotected |
Definition of a changed data type command.
|
staticprotected |
Definition of a negative change data type request.
|
staticprotected |
Definition of a positive changed data type request.
|
staticprotected |
Definition of a channel request command.
|
staticprotected |
Definition of a negative channel request response.
|
staticprotected |
Definition of a positive channel request response.
|
staticprotected |
Definition of a channel select command.
|
staticprotected |
Definition of a negative channel select response.
|
staticprotected |
Definition of a positive channel select response.
|
staticprotected |
Definition of a client port command.
|
staticprotected |
Definition of a negative client port response.
|
staticprotected |
Definition of a positive client port response.
|
staticprotected |
Definition of a connect command.
|
staticprotected |
Definition of a negative connect response.
|
staticprotected |
Definition of a positive connect response.
|
staticprotected |
Creates a new command message.
command | The command |
sessionId | Unique session id connected to this command |
|
staticprotected |
Creates a new command message with a value.
command | The command |
value | Command value |
sessionId | Unique session id connected to this command |
|
staticprotected |
Creates a new response message.
response | The response |
sessionId | Unique session id connected to this response |
|
staticprotected |
Creates a new response message with a value.
response | The response |
value | Response value |
sessionId | Unique session id connected to this response |
|
staticprotected |
Definition of a data type request command.
|
staticprotected |
Definition of a negative data type request response.
|
staticprotected |
Definition of a positive data type request response.
|
inline |
Returns the description of this streaming object.
|
staticprotected |
Definition of a disconnect command.
|
staticprotected |
Definition of a negative disconnect response.
|
staticprotected |
Definition of a positive disconnect response.
|
inline |
Returns the name of this streaming object.
Disabled copy operator.
streaming | Object which would be copied |
|
protected |
Parses a command or a response.
data | The data to parse, must be valid |
size | The size of the data to parse in bytes |
isResponse | True, if the parse string was a command, a response otherwise |
message | Command or response message |
value | Optional command or response value |
sessionId | Unique session id |
|
staticprotected |
Definition of a pause command.
|
staticprotected |
Definition of a negative pause response.
|
staticprotected |
Definition of a positive pause response.
|
inline |
Returns the timeout value the streaming object waits for response messages.
|
staticprotected |
Definition of a server port command.
|
staticprotected |
Definition of a negative server port response.
|
staticprotected |
Definition of a positive server port response.
|
virtual |
Sets the description of this streaming object.
description | Streaming object description to set |
|
virtual |
Sets the name of this streaming object.
name | Streaming object name to set |
bool Ocean::Network::Streaming::setResponseTimeout | ( | const double | timeout | ) |
Sets the timeout value the streaming object waits for response messages.
timeout | The timeout value in seconds |
|
staticprotected |
Definition of a start command.
|
staticprotected |
Definition fo a negative start response.
|
staticprotected |
Definition of a positiv start response.
|
staticprotected |
Definition of a stop command.
|
staticprotected |
Definition of a negative stop response.
|
staticprotected |
Definition of a positive stop response.
|
protected |
Description of this streaming object.
|
protected |
Message queue.
|
protected |
Name of this streaming object.
|
protected |
Timeout value for response messages.