TwiceAsNice  2019-02-18
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Basda::WutThermo Class Reference

This is the main class which provides functions to send and receave strings from and to the WutWebThermograph. More...

#include <WutWebThermograph.h>

Inheritance diagram for Basda::WutThermo:
Inheritance graph
Collaboration diagram for Basda::WutThermo:
Collaboration graph

Public Member Functions

 WutThermo (std::string host, int port, std::string password)
 Constructor for the WutThermo_class. More...
 
virtual ~WutThermo ()
 
const WutThermooperator<< (const std::string &) const
 "<<" operator sends a string to the socket connection. More...
 
const WutThermooperator>> (std::string &) const
 ">>" operator receives the response (string) from the socket connection. More...
 
std::string readSensor (int sensor)
 readSensor combines all the functions provided to read out the temperature of a specific sensor More...
 
std::string readSensor (void)
 readSensor combines all the functions provided to read out the temperature of all sensors More...
 
std::string readSensorCSV (void)
 readSensorCSV combines all the functions provided to read out the Thermo.csv file from the W&T Web Thermograph 8x More...
 
 WutThermo (std::string host, int port, std::string password)
 Constructor for the WutThermo_class. More...
 
virtual ~WutThermo ()
 
const WutThermooperator<< (const std::string &) const
 "<<" operator sends a string to the socket connection. More...
 
const WutThermooperator>> (std::string &) const
 ">>" operator receives the response (string) from the socket connection. More...
 
std::string readSensor (int sensor)
 readSensor combines all the functions provided to read out the temperature of a specific sensor More...
 
std::string readSensor (void)
 readSensor combines all the functions provided to read out the temperature of all sensors More...
 
std::string readSensorCSV (void)
 readSensorCSV combines all the functions provided to read out the Thermo.csv file from the W&T Web Thermograph 8x More...
 

Private Member Functions

void getSingle (int sensor)
 getSingle is used to call for the temperature of a specific sensor More...
 
void getAll (void)
 getAll is used to call for the temperature of all sensors at once More...
 
void getCSV (void)
 getCSV is used to call for the temperatures of all sensors in a .csv file More...
 
void shortSingle (std::string &)
 shortSingle is used to shorten the string for getting the temperature from a single sensor without the extra information like IP-Address and the name of the Web Thermograph. More...
 
void shortAll (std::string &)
 shortAll is used to shorten the string for getting the temperature from all sensors without the extra information like IP-Address and the name of the Web Thermograph. More...
 
void getSingle (int sensor)
 getSingle is used to call for the temperature of a specific sensor More...
 
void getAll (void)
 getAll is used to call for the temperature of all sensors at once More...
 
void getCSV (void)
 getCSV is used to call for the temperatures of all sensors in a .csv file More...
 
void shortSingle (std::string &)
 shortSingle is used to shorten the string for getting the temperature from a single sensor without the extra information like IP-Address and the name of the Web Thermograph. More...
 
void shortAll (std::string &)
 shortAll is used to shorten the string for getting the temperature from all sensors without the extra information like IP-Address and the name of the Web Thermograph. More...
 
- Private Member Functions inherited from Basda::WutSocket
 WutSocket ()
 
virtual ~WutSocket ()
 
virtual bool create ()
 
bool bind (const uint16_t port)
 
bool listen () const
 
bool accept (WutSocket &) const
 
virtual bool connect (const std::string host, const uint16_t port)
 
virtual bool connectWithTimeout (const std::string host, uint16_t port, unsigned timeoutInMicroSeconds)
 
virtual bool send (const std::string) const
 
virtual int recv (std::string &) const
 
virtual bool setReceiveTimeout (unsigned timeoutInMicroSeconds)
 
virtual bool setSendTimeout (unsigned timeoutInMicroSeconds)
 
void set_non_blocking (const bool)
 
bool is_valid () const
 
 WutSocket ()
 
virtual ~WutSocket ()
 
virtual bool create ()
 
bool bind (const uint16_t port)
 
bool listen () const
 
bool accept (WutSocket &) const
 
virtual bool connect (const std::string host, const uint16_t port)
 
virtual bool connectWithTimeout (const std::string host, uint16_t port, unsigned timeoutInMicroSeconds)
 
virtual bool send (const std::string) const
 
virtual int recv (std::string &) const
 
virtual bool setReceiveTimeout (unsigned timeoutInMicroSeconds)
 
virtual bool setSendTimeout (unsigned timeoutInMicroSeconds)
 
void set_non_blocking (const bool)
 
bool is_valid () const
 
 WutSocket ()
 
virtual ~WutSocket ()
 
virtual bool create ()
 
bool bind (const uint16_t port)
 
bool listen () const
 
bool accept (WutSocket &) const
 
virtual bool connect (const std::string host, const uint16_t port)
 
virtual bool connectWithTimeout (const std::string host, uint16_t port, unsigned timeoutInMicroSeconds)
 
virtual bool send (const std::string) const
 
virtual int recv (std::string &) const
 
virtual bool setReceiveTimeout (unsigned timeoutInMicroSeconds)
 
virtual bool setSendTimeout (unsigned timeoutInMicroSeconds)
 
void set_non_blocking (const bool)
 
bool is_valid () const
 
 WutSocket ()
 
virtual ~WutSocket ()
 
virtual bool create ()
 
bool bind (const int port)
 
bool listen () const
 
bool accept (WutSocket &) const
 
virtual bool connect (const std::string host, const int port)
 
virtual bool connectWithTimeout (const std::string host, int port, unsigned timeoutInMicroSeconds)
 
virtual bool send (const std::string) const
 
virtual int recv (std::string &) const
 
virtual bool setReceiveTimeout (unsigned timeoutInMicroSeconds)
 
virtual bool setSendTimeout (unsigned timeoutInMicroSeconds)
 
void set_non_blocking (const bool)
 
bool is_valid () const
 
 WutSocket ()
 
virtual ~WutSocket ()
 
virtual bool create ()
 
bool bind (const int port)
 
bool listen () const
 
bool accept (WutSocket &) const
 
virtual bool connect (const std::string host, const int port)
 
virtual bool connectWithTimeout (const std::string host, int port, unsigned timeoutInMicroSeconds)
 
virtual bool send (const std::string) const
 
virtual int recv (std::string &) const
 
virtual bool setReceiveTimeout (unsigned timeoutInMicroSeconds)
 
virtual bool setSendTimeout (unsigned timeoutInMicroSeconds)
 
void set_non_blocking (const bool)
 
bool is_valid () const
 

Private Attributes

std::string m_password
 contains the password to get administration rights on the WutWebThermograph More...
 

Detailed Description

This is the main class which provides functions to send and receave strings from and to the WutWebThermograph.

To make the functions more easy to look at another class has been implemented which contains the direct interaction with sockets.

Constructor & Destructor Documentation

◆ WutThermo() [1/2]

WutThermo::WutThermo ( std::string  host,
int  port,
std::string  password 
)

Constructor for the WutThermo_class.

Parameters
hostName or IP address of the host ( the WutThermograph )
portport used by the connection
passwordadministrator password for the W&T Web Thermograph 8x

◆ ~WutThermo() [1/2]

virtual Basda::WutThermo::~WutThermo ( )
inlinevirtual

◆ WutThermo() [2/2]

Basda::WutThermo::WutThermo ( std::string  host,
int  port,
std::string  password 
)

Constructor for the WutThermo_class.

Parameters
hostName or IP address of the host ( the WutThermograph )
portport used by the connection
passwordadministrator password for the W&T Web Thermograph 8x

◆ ~WutThermo() [2/2]

virtual Basda::WutThermo::~WutThermo ( )
inlinevirtual

Member Function Documentation

◆ getAll() [1/2]

void WutThermo::getAll ( void  )
private

getAll is used to call for the temperature of all sensors at once

◆ getAll() [2/2]

void Basda::WutThermo::getAll ( void  )
private

getAll is used to call for the temperature of all sensors at once

◆ getCSV() [1/2]

void WutThermo::getCSV ( void  )
private

getCSV is used to call for the temperatures of all sensors in a .csv file

◆ getCSV() [2/2]

void Basda::WutThermo::getCSV ( void  )
private

getCSV is used to call for the temperatures of all sensors in a .csv file

◆ getSingle() [1/2]

void Basda::WutThermo::getSingle ( int  sensor)
private

getSingle is used to call for the temperature of a specific sensor

Parameters
sensordefines the sensor

◆ getSingle() [2/2]

void WutThermo::getSingle ( int  sensor)
private

getSingle is used to call for the temperature of a specific sensor

Parameters
sensordefines the sensor

◆ operator<<() [1/2]

const WutThermo& Basda::WutThermo::operator<< ( const std::string &  ) const

"<<" operator sends a string to the socket connection.

◆ operator<<() [2/2]

const WutThermo & WutThermo::operator<< ( const std::string &  s) const

"<<" operator sends a string to the socket connection.

◆ operator>>() [1/2]

const WutThermo & WutThermo::operator>> ( std::string &  s) const

">>" operator receives the response (string) from the socket connection.

◆ operator>>() [2/2]

const WutThermo& Basda::WutThermo::operator>> ( std::string &  ) const

">>" operator receives the response (string) from the socket connection.

◆ readSensor() [1/4]

std::string Basda::WutThermo::readSensor ( int  sensor)

readSensor combines all the functions provided to read out the temperature of a specific sensor

Parameters
snumber of the sensor
Returns
the string with the temperature information

◆ readSensor() [2/4]

std::string WutThermo::readSensor ( int  sensor)

readSensor combines all the functions provided to read out the temperature of a specific sensor

Parameters
snumber of the sensor
Returns
the string with the temperature information

◆ readSensor() [3/4]

std::string WutThermo::readSensor ( void  )

readSensor combines all the functions provided to read out the temperature of all sensors

Returns
the string with the temperature information

◆ readSensor() [4/4]

std::string Basda::WutThermo::readSensor ( void  )

readSensor combines all the functions provided to read out the temperature of all sensors

Returns
the string with the temperature information

◆ readSensorCSV() [1/2]

std::string Basda::WutThermo::readSensorCSV ( void  )

readSensorCSV combines all the functions provided to read out the Thermo.csv file from the W&T Web Thermograph 8x

Returns
the string with the temperature informations in csv format

◆ readSensorCSV() [2/2]

std::string WutThermo::readSensorCSV ( void  )

readSensorCSV combines all the functions provided to read out the Thermo.csv file from the W&T Web Thermograph 8x

Returns
the string with the temperature informations in csv format

◆ shortAll() [1/2]

void Basda::WutThermo::shortAll ( std::string &  )
private

shortAll is used to shorten the string for getting the temperature from all sensors without the extra information like IP-Address and the name of the Web Thermograph.

Parameters
sstring to be shortened

◆ shortAll() [2/2]

void WutThermo::shortAll ( std::string &  s)
private

shortAll is used to shorten the string for getting the temperature from all sensors without the extra information like IP-Address and the name of the Web Thermograph.

Parameters
sstring to be shortened

◆ shortSingle() [1/2]

void WutThermo::shortSingle ( std::string &  s)
private

shortSingle is used to shorten the string for getting the temperature from a single sensor without the extra information like IP-Address and the name of the Web Thermograph.

Parameters
sstring to be shortened

◆ shortSingle() [2/2]

void Basda::WutThermo::shortSingle ( std::string &  )
private

shortSingle is used to shorten the string for getting the temperature from a single sensor without the extra information like IP-Address and the name of the Web Thermograph.

Parameters
sstring to be shortened

Member Data Documentation

◆ m_password

std::string Basda::WutThermo::m_password
private

contains the password to get administration rights on the WutWebThermograph


The documentation for this class was generated from the following files: