TwiceAsNice  2019-02-18
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Basda::Tempo::wavecomm::WavecommThor Class Reference

The class WavecommThor provides all functions to create a connection to the Wavecomm temperature and humidity monitor (thor) More...

#include <WavecommThor.h>

Collaboration diagram for Basda::Tempo::wavecomm::WavecommThor:
Collaboration graph

Public Member Functions

 WavecommThor ()
 standard constructor More...
 
 WavecommThor (std::string dev, bool create)
 constructor to set the device address and create connection on demand More...
 
virtual ~WavecommThor ()
 standard destructor ( slightly modified to close the port also ) More...
 
void createChatLine (const std::string &conConfig)
 this function creates the chatline and starts the connection with the device. More...
 
void createChatLine (void)
 creates the chatline with m_IpInfo More...
 
void closeChatLine (void)
 this function closes the chatline and ends the connection to the Device More...
 
WavecommDataHandlerPtr channelHandler (unsigned int channel)
 
 WavecommThor ()
 standard constructor More...
 
 WavecommThor (std::string dev, bool create)
 constructor to set the device address and create connection on demand More...
 
virtual ~WavecommThor ()
 standard destructor ( slightly modified to close the port also ) More...
 
void createChatLine (const std::string &conConfig)
 this function creates the chatline and starts the connection with the device. More...
 
void createChatLine (void)
 creates the chatline with m_IpInfo More...
 
void closeChatLine (void)
 this function closes the chatline and ends the connection to the Device More...
 
WavecommDataHandlerPtr channelHandler (unsigned int channel)
 

Protected Member Functions

int sendMsg (const std::string &cmd)
 this function sends a specific command to the device More...
 
void readMsg (std::string &rcv)
 this function reads the answer from the device More...
 
std::string getAnswer (void)
 returns the answer string More...
 
int sendMsg (const std::string &cmd)
 this function sends a specific command to the device More...
 
void readMsg (std::string &rcv)
 this function reads the answer from the device More...
 
std::string getAnswer (void)
 returns the answer string More...
 

Private Member Functions

void setInfo (std::string info)
 this function is used to set the m_IpInfo var. More...
 
void setInfo (std::string info)
 this function is used to set the m_IpInfo var. More...
 

Private Attributes

Nice::ChatLine m_chat
 this is the chatline that is used to comunicate with the device More...
 
std::string m_IpInfo
 this string contains the connection informations (ip adress, port) to build the chatLine More...
 
bool m_isConnected
 this boolean indicates if there is an active connection to a device More...
 
std::string m_answer
 this string contains the latest answer from the device More...
 
std::string m_term
 this string contains the current terminators for the sending of the commands More...
 

Detailed Description

The class WavecommThor provides all functions to create a connection to the Wavecomm temperature and humidity monitor (thor)

Constructor & Destructor Documentation

◆ WavecommThor() [1/4]

WavecommThor::WavecommThor ( )

standard constructor

◆ WavecommThor() [2/4]

WavecommThor::WavecommThor ( std::string  dev,
bool  create 
)

constructor to set the device address and create connection on demand

Parameters
devaddress of the device
createtrue if a connection should be created at once

◆ ~WavecommThor() [1/2]

WavecommThor::~WavecommThor ( )
virtual

standard destructor ( slightly modified to close the port also )

◆ WavecommThor() [3/4]

Basda::Tempo::wavecomm::WavecommThor::WavecommThor ( )

standard constructor

◆ WavecommThor() [4/4]

Basda::Tempo::wavecomm::WavecommThor::WavecommThor ( std::string  dev,
bool  create 
)

constructor to set the device address and create connection on demand

Parameters
devaddress of the device
createtrue if a connection should be created at once

◆ ~WavecommThor() [2/2]

virtual Basda::Tempo::wavecomm::WavecommThor::~WavecommThor ( )
virtual

standard destructor ( slightly modified to close the port also )

Member Function Documentation

◆ channelHandler() [1/2]

WavecommDataHandlerPtr WavecommThor::channelHandler ( unsigned int  channel)

◆ channelHandler() [2/2]

WavecommDataHandlerPtr Basda::Tempo::wavecomm::WavecommThor::channelHandler ( unsigned int  channel)

◆ closeChatLine() [1/2]

void WavecommThor::closeChatLine ( void  )

this function closes the chatline and ends the connection to the Device

◆ closeChatLine() [2/2]

void Basda::Tempo::wavecomm::WavecommThor::closeChatLine ( void  )

this function closes the chatline and ends the connection to the Device

◆ createChatLine() [1/4]

void Basda::Tempo::wavecomm::WavecommThor::createChatLine ( const std::string &  conConfig)

this function creates the chatline and starts the connection with the device.

Parameters
conConfigconfiguration and identification needed by chatline

◆ createChatLine() [2/4]

void WavecommThor::createChatLine ( const std::string &  conConfig)

this function creates the chatline and starts the connection with the device.

Parameters
conConfigconfiguration and identification needed by chatline

◆ createChatLine() [3/4]

void WavecommThor::createChatLine ( void  )

creates the chatline with m_IpInfo

◆ createChatLine() [4/4]

void Basda::Tempo::wavecomm::WavecommThor::createChatLine ( void  )

creates the chatline with m_IpInfo

◆ getAnswer() [1/2]

std::string Basda::Tempo::wavecomm::WavecommThor::getAnswer ( void  )
inlineprotected

returns the answer string

Returns
latest answer from the device

◆ getAnswer() [2/2]

std::string Basda::Tempo::wavecomm::WavecommThor::getAnswer ( void  )
inlineprotected

returns the answer string

Returns
latest answer from the device

◆ readMsg() [1/2]

void Basda::Tempo::wavecomm::WavecommThor::readMsg ( std::string &  rcv)
protected

this function reads the answer from the device

Parameters
rcvanswer from the device

◆ readMsg() [2/2]

void WavecommThor::readMsg ( std::string &  rcv)
protected

this function reads the answer from the device

Parameters
rcvanswer from the device

◆ sendMsg() [1/2]

int WavecommThor::sendMsg ( const std::string &  cmd)
protected

this function sends a specific command to the device

Parameters
cmdcommand to send
Returns
number of chars sent

◆ sendMsg() [2/2]

int Basda::Tempo::wavecomm::WavecommThor::sendMsg ( const std::string &  cmd)
protected

this function sends a specific command to the device

Parameters
cmdcommand to send
Returns
number of chars sent

◆ setInfo() [1/2]

void WavecommThor::setInfo ( std::string  info)
private

this function is used to set the m_IpInfo var.

to a specific string

◆ setInfo() [2/2]

void Basda::Tempo::wavecomm::WavecommThor::setInfo ( std::string  info)
private

this function is used to set the m_IpInfo var.

to a specific string

Member Data Documentation

◆ m_answer

std::string Basda::Tempo::wavecomm::WavecommThor::m_answer
private

this string contains the latest answer from the device

◆ m_chat

Nice::ChatLine Basda::Tempo::wavecomm::WavecommThor::m_chat
private

this is the chatline that is used to comunicate with the device

◆ m_IpInfo

std::string Basda::Tempo::wavecomm::WavecommThor::m_IpInfo
private

this string contains the connection informations (ip adress, port) to build the chatLine

◆ m_isConnected

bool Basda::Tempo::wavecomm::WavecommThor::m_isConnected
private

this boolean indicates if there is an active connection to a device

◆ m_term

std::string Basda::Tempo::wavecomm::WavecommThor::m_term
private

this string contains the current terminators for the sending of the commands


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