TwiceAsNice
2019-02-18
|
#include <WebSocketImpl.h>
Public Member Functions | |
WebSocketImpl (const std::string &host, const uint16_t port, const std::string &pwd, WutSocketPtr socket, const unsigned timeoutInMicroSeconds) | |
constructor More... | |
virtual | ~WebSocketImpl () |
destructor More... | |
const WebSocketImpl & | operator<< (const std::string &) const |
operator to send a string More... | |
const WebSocketImpl & | operator>> (std::string &) const |
operator to receive a string More... | |
virtual std::string | getInputStatus (void) |
function to get the input status of all inputs More... | |
virtual std::string | getInputStatus (const int inputPortIndex) |
function to get the input status for a specific input More... | |
virtual std::string | getCounterReading (void) |
function to get the counter reading of all input More... | |
virtual std::string | getCounterReading (const int inputPortIndex) |
function to get the counter reading of a specific input More... | |
virtual void | setCounterValue (const int _input, const long int _value) |
function to set the counter of an input More... | |
virtual void | setCounterValue (const long int _value) |
function to set the counter for all inputs More... | |
virtual std::string | getOutputStatus (void) |
function to get the output status of all outputs More... | |
virtual std::string | getOutputStatus (const int outputPortIndex) |
function to get the output status for a specific output More... | |
virtual void | setOutputBits (const std::string _mask, const std::string _state) |
function to disable outputs with mask More... | |
virtual void | setOutputBits (const int _output, const std::string _state) |
function to enable/disable one output More... | |
virtual void | setOutputBits (const std::string _state) |
function to enable multiple outputs More... | |
virtual std::string | getTime (void) |
function to get the time More... | |
virtual void | setTime (const std::string _time) |
function to det the system time More... | |
virtual std::string | getDiagnosticMemory (void) |
function to get the status of the diagnostic memory More... | |
virtual std::string | getDiagnosticReport (const int _index) |
function to et a specific diagnostic report More... | |
virtual std::string | getMessageText (const int _number) |
function to get the messages of the message bits More... | |
virtual void | clearMessageMemory (void) |
function to clear the message memory More... | |
virtual void | clearLoadErrors (void) |
function to clear load errors and to re-enable affected outputs More... | |
WebSocketImpl (const std::string &host, const uint16_t port, const std::string &pwd, WutSocketPtr socket, const unsigned timeoutInMicroSeconds) | |
constructor More... | |
virtual | ~WebSocketImpl () |
destructor More... | |
const WebSocketImpl & | operator<< (const std::string &) const |
operator to send a string More... | |
const WebSocketImpl & | operator>> (std::string &) const |
operator to receive a string More... | |
virtual std::string | getInputStatus (void) |
function to get the input status of all inputs More... | |
virtual std::string | getInputStatus (const int inputPortIndex) |
function to get the input status for a specific input More... | |
virtual std::string | getCounterReading (void) |
function to get the counter reading of all input More... | |
virtual std::string | getCounterReading (const int inputPortIndex) |
function to get the counter reading of a specific input More... | |
virtual void | setCounterValue (const int _input, const long int _value) |
function to set the counter of an input More... | |
virtual void | setCounterValue (const long int _value) |
function to set the counter for all inputs More... | |
virtual std::string | getOutputStatus (void) |
function to get the output status of all outputs More... | |
virtual std::string | getOutputStatus (const int outputPortIndex) |
function to get the output status for a specific output More... | |
virtual void | setOutputBits (const std::string _mask, const std::string _state) |
function to disable outputs with mask More... | |
virtual void | setOutputBits (const int _output, const std::string _state) |
function to enable/disable one output More... | |
virtual void | setOutputBits (const std::string _state) |
function to enable multiple outputs More... | |
virtual std::string | getTime (void) |
function to get the time More... | |
virtual void | setTime (const std::string _time) |
function to det the system time More... | |
virtual std::string | getDiagnosticMemory (void) |
function to get the status of the diagnostic memory More... | |
virtual std::string | getDiagnosticReport (const int _index) |
function to et a specific diagnostic report More... | |
virtual std::string | getMessageText (const int _number) |
function to get the messages of the message bits More... | |
virtual void | clearMessageMemory (void) |
function to clear the message memory More... | |
virtual void | clearLoadErrors (void) |
function to clear load errors and to re-enable affected outputs More... | |
WebSocketImpl (const std::string &host, const uint16_t port, const std::string &pwd, WutSocketPtr socket, const unsigned timeoutInMicroSeconds) | |
constructor More... | |
virtual | ~WebSocketImpl () |
destructor More... | |
const WebSocketImpl & | operator<< (const std::string &) const |
operator to send a string More... | |
const WebSocketImpl & | operator>> (std::string &) const |
operator to receive a string More... | |
virtual std::string | getInputStatus (void) |
function to get the input status of all inputs More... | |
virtual std::string | getInputStatus (const int inputPortIndex) |
function to get the input status for a specific input More... | |
virtual std::string | getCounterReading (void) |
function to get the counter reading of all input More... | |
virtual std::string | getCounterReading (const int inputPortIndex) |
function to get the counter reading of a specific input More... | |
virtual void | setCounterValue (const int _input, const long int _value) |
function to set the counter of an input More... | |
virtual void | setCounterValue (const long int _value) |
function to set the counter for all inputs More... | |
virtual std::string | getOutputStatus (void) |
function to get the output status of all outputs More... | |
virtual std::string | getOutputStatus (const int outputPortIndex) |
function to get the output status for a specific output More... | |
virtual void | setOutputBits (const std::string _mask, const std::string _state) |
function to disable outputs with mask More... | |
virtual void | setOutputBits (const int _output, const std::string _state) |
function to enable/disable one output More... | |
virtual void | setOutputBits (const std::string _state) |
function to enable multiple outputs More... | |
virtual std::string | getTime (void) |
function to get the time More... | |
virtual void | setTime (const std::string _time) |
function to det the system time More... | |
virtual std::string | getDiagnosticMemory (void) |
function to get the status of the diagnostic memory More... | |
virtual std::string | getDiagnosticReport (const int _index) |
function to et a specific diagnostic report More... | |
virtual std::string | getMessageText (const int _number) |
function to get the messages of the message bits More... | |
virtual void | clearMessageMemory (void) |
function to clear the message memory More... | |
virtual void | clearLoadErrors (void) |
function to clear load errors and to re-enable affected outputs More... | |
![]() | |
virtual | ~WebSocket ()=0 |
virtual | ~WebSocket ()=0 |
virtual | ~WebSocket ()=0 |
Private Member Functions | |
std::string | getOutputStatusFromResponseString (const std::string &response) |
std::string | getOutputStatusFromResponseString (const std::string &response) |
std::string | getOutputStatusFromResponseString (const std::string &response) |
Private Attributes | |
std::string | m_pwd |
administrator password More... | |
WutSocketPtr | socket_ |
Additional Inherited Members | |
![]() | |
static WebSocketPtr | null () |
static WebSocketPtr | null () |
static WebSocketPtr | null () |
Basda::WebSocketImpl::WebSocketImpl | ( | const std::string & | host, |
const uint16_t | port, | ||
const std::string & | pwd, | ||
WutSocketPtr | socket, | ||
const unsigned | timeoutInMicroSeconds | ||
) |
constructor
host | Name or IP address of the host |
port | port of the host (default 80) |
pwd | administrator password |
timeoutInMicroSeconds | timeout for connecting, sending and receiving |
|
inlinevirtual |
destructor
Basda::WebSocketImpl::WebSocketImpl | ( | const std::string & | host, |
const uint16_t | port, | ||
const std::string & | pwd, | ||
WutSocketPtr | socket, | ||
const unsigned | timeoutInMicroSeconds | ||
) |
constructor
host | Name or IP address of the host |
port | port of the host (default 80) |
pwd | administrator password |
timeoutInMicroSeconds | timeout for connecting, sending and receiving |
|
inlinevirtual |
destructor
Basda::WebSocketImpl::WebSocketImpl | ( | const std::string & | host, |
const uint16_t | port, | ||
const std::string & | pwd, | ||
WutSocketPtr | socket, | ||
const unsigned | timeoutInMicroSeconds | ||
) |
constructor
host | Name or IP address of the host |
port | port of the host (default 80) |
pwd | administrator password |
timeoutInMicroSeconds | timeout for connecting, sending and receiving |
|
inlinevirtual |
destructor
|
virtual |
function to clear load errors and to re-enable affected outputs
Implements Basda::WebSocket.
|
virtual |
function to clear load errors and to re-enable affected outputs
Implements Basda::WebSocket.
|
virtual |
function to clear load errors and to re-enable affected outputs
Implements Basda::WebSocket.
|
virtual |
function to clear the message memory
Implements Basda::WebSocket.
|
virtual |
function to clear the message memory
Implements Basda::WebSocket.
|
virtual |
function to clear the message memory
Implements Basda::WebSocket.
|
virtual |
function to get the counter reading of all input
Implements Basda::WebSocket.
|
virtual |
function to get the counter reading of all input
Implements Basda::WebSocket.
|
virtual |
function to get the counter reading of all input
Implements Basda::WebSocket.
|
virtual |
function to get the counter reading of a specific input
_input | specifies the input (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the counter reading of a specific input
_input | specifies the input (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the counter reading of a specific input
_input | specifies the input (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the status of the diagnostic memory
Implements Basda::WebSocket.
|
virtual |
function to get the status of the diagnostic memory
Implements Basda::WebSocket.
|
virtual |
function to get the status of the diagnostic memory
Implements Basda::WebSocket.
|
virtual |
function to et a specific diagnostic report
_index | index of the diagnostic report |
Implements Basda::WebSocket.
|
virtual |
function to et a specific diagnostic report
_index | index of the diagnostic report |
Implements Basda::WebSocket.
|
virtual |
function to et a specific diagnostic report
_index | index of the diagnostic report |
Implements Basda::WebSocket.
|
virtual |
function to get the input status of all inputs
Implements Basda::WebSocket.
|
virtual |
function to get the input status of all inputs
Implements Basda::WebSocket.
|
virtual |
function to get the input status of all inputs
Implements Basda::WebSocket.
|
virtual |
function to get the input status for a specific input
_input | specifies the input number (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the input status for a specific input
_input | specifies the input number (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the input status for a specific input
_input | specifies the input number (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the messages of the message bits
_number | specifies the message bit (max 64) |
Implements Basda::WebSocket.
|
virtual |
function to get the messages of the message bits
_number | specifies the message bit (max 64) |
Implements Basda::WebSocket.
|
virtual |
function to get the messages of the message bits
_number | specifies the message bit (max 64) |
Implements Basda::WebSocket.
|
virtual |
function to get the output status of all outputs
Implements Basda::WebSocket.
|
virtual |
function to get the output status of all outputs
Implements Basda::WebSocket.
|
virtual |
function to get the output status of all outputs
Implements Basda::WebSocket.
|
virtual |
function to get the output status for a specific output
_output | specifies the output number (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the output status for a specific output
_output | specifies the output number (0-11) |
Implements Basda::WebSocket.
|
virtual |
function to get the output status for a specific output
_output | specifies the output number (0-11) |
Implements Basda::WebSocket.
|
private |
|
private |
|
private |
|
virtual |
|
virtual |
|
virtual |
const WebSocketImpl & Basda::WebSocketImpl::operator<< | ( | const std::string & | s | ) | const |
operator to send a string
const WebSocketImpl& Basda::WebSocketImpl::operator<< | ( | const std::string & | ) | const |
operator to send a string
const WebSocketImpl& Basda::WebSocketImpl::operator<< | ( | const std::string & | ) | const |
operator to send a string
const WebSocketImpl & Basda::WebSocketImpl::operator>> | ( | std::string & | s | ) | const |
operator to receive a string
const WebSocketImpl& Basda::WebSocketImpl::operator>> | ( | std::string & | ) | const |
operator to receive a string
const WebSocketImpl& Basda::WebSocketImpl::operator>> | ( | std::string & | ) | const |
operator to receive a string
|
virtual |
function to set the counter of an input
_input | specifies the input (0-11) |
_value | specifies the counter value (0-2Mrd) |
Implements Basda::WebSocket.
function to set the counter of an input
_input | specifies the input (0-11) |
_value | specifies the counter value (0-2Mrd) |
Implements Basda::WebSocket.
|
virtual |
function to set the counter of an input
_input | specifies the input (0-11) |
_value | specifies the counter value (0-2Mrd) |
Implements Basda::WebSocket.
function to set the counter for all inputs
_value | specifies the counter value (0-2Mrd) |
Implements Basda::WebSocket.
function to set the counter for all inputs
_value | specifies the counter value (0-2Mrd) |
Implements Basda::WebSocket.
function to set the counter for all inputs
_value | specifies the counter value (0-2Mrd) |
Implements Basda::WebSocket.
|
virtual |
function to disable outputs with mask
_mask | specifies the outputs activated (in hex form) |
_state | OFF |
Implements Basda::WebSocket.
|
virtual |
function to disable outputs with mask
_mask | specifies the outputs activated (in hex form) |
_state | OFF |
Implements Basda::WebSocket.
|
virtual |
function to disable outputs with mask
_mask | specifies the outputs activated (in hex form) |
_state | OFF |
Implements Basda::WebSocket.
|
virtual |
function to enable/disable one output
_output | specifies the output (0-11) |
_state | ON or OFF |
Implements Basda::WebSocket.
function to enable/disable one output
_output | specifies the output (0-11) |
_state | ON or OFF |
Implements Basda::WebSocket.
|
virtual |
function to enable/disable one output
_output | specifies the output (0-11) |
_state | ON or OFF |
Implements Basda::WebSocket.
|
virtual |
function to enable multiple outputs
_state | hex form of outputs to be enabled |
Implements Basda::WebSocket.
|
virtual |
function to enable multiple outputs
_state | hex form of outputs to be enabled |
Implements Basda::WebSocket.
|
virtual |
function to enable multiple outputs
_state | hex form of outputs to be enabled |
Implements Basda::WebSocket.
|
virtual |
|
virtual |
|
virtual |
|
private |
administrator password
|
private |