TwiceAsNice
2019-02-18
|
#include <THDevice.h>
Public Member Functions | |
UniModTHDevice (const Nice::JointPtr &_config) | |
virtual | ~UniModTHDevice () |
std::string | createConnectionID (const std::string &_address, const unsigned int _cardNo, const unsigned int _moduleNo) |
This method creates an ID based on the connection address, card number and module number separated by a colon to identify the module/card object in a map. More... | |
virtual void | open () |
This method might be called when the service goes in the INIT state. More... | |
virtual void | close () |
This method might be called when the service goes in the OFFLINE state. More... | |
virtual void | reset (Basda::DeviceAsync &=Basda::Device::s_async) |
This method might be called when the service will be reseted. More... | |
virtual void | version () |
This method returns the version string of the device. More... | |
virtual void | init (DeviceAsync &=Basda::Device::s_async) |
This method initialize the device and set the state to INIT. More... | |
virtual void | deinit (DeviceAsync &=Basda::Device::s_async) |
This method deinitialize the device and set the state to OFFLINE. More... | |
virtual void | activate (DeviceAsync &=Basda::Device::s_async) |
activate something More... | |
virtual void | deactivate (DeviceAsync &=Basda::Device::s_async) |
deactivate something More... | |
void | setLinkTimeout (Nice::Time _tcpConnectionTimeout) |
virtual Nice::SeqTime | getLinkTimeout () |
virtual bool | isReachable () |
virtual Nice::BitSet | read () |
virtual void | write (Nice::BitSet _collision) |
virtual float | readTemperature (std::string _sensorName) |
virtual float | readHumidity (std::string _sensorName) |
virtual Nice::SeqFloat | read (std::string _sensorName) |
virtual void | updateProperties () |
virtual Nice::JointPtrVector | description () |
void | setChatType (std::map< std::string, Nice::ChatLinePtr > _chat) |
UniModTHDevice (const Nice::JointPtr &_config) | |
virtual | ~UniModTHDevice () |
std::string | createConnectionID (const std::string &_address, const unsigned int _cardNo, const unsigned int _moduleNo) |
This method creates an ID based on the connection address, card number and module number separated by a colon to identify the module/card object in a map. More... | |
virtual void | open () |
This method might be called when the service goes in the INIT state. More... | |
virtual void | close () |
This method might be called when the service goes in the OFFLINE state. More... | |
virtual void | reset (Basda::DeviceAsync &=Basda::Device::s_async) |
This method might be called when the service will be reseted. More... | |
virtual void | version () |
This method returns the version string of the device. More... | |
virtual void | init (DeviceAsync &=Basda::Device::s_async) |
This method initialize the device and set the state to INIT. More... | |
virtual void | deinit (DeviceAsync &=Basda::Device::s_async) |
This method deinitialize the device and set the state to OFFLINE. More... | |
virtual void | activate (DeviceAsync &=Basda::Device::s_async) |
activate something More... | |
virtual void | deactivate (DeviceAsync &=Basda::Device::s_async) |
deactivate something More... | |
void | setLinkTimeout (Nice::Time _tcpConnectionTimeout) |
virtual Nice::SeqTime | getLinkTimeout () |
virtual bool | isReachable () |
virtual Nice::BitSet | read () |
virtual void | write (Nice::BitSet _collision) |
virtual float | readTemperature (std::string _sensorName) |
virtual float | readHumidity (std::string _sensorName) |
virtual Nice::SeqFloat | read (std::string _sensorName) |
virtual void | updateProperties () |
virtual Nice::JointPtrVector | description () |
void | setChatType (std::map< std::string, Nice::ChatLinePtr > _chat) |
![]() | |
MoccaTHDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaTHDevice () |
Constructor. More... | |
MoccaTHDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaTHDevice () |
Constructor. More... | |
MoccaTHDevice (const Nice::JointPtr &_config) | |
Constructor. More... | |
virtual | ~MoccaTHDevice () |
Constructor. More... | |
![]() | |
TempoDevice (const Nice::JointPtr &config) | |
virtual | ~TempoDevice () |
TempoDevice (const Nice::JointPtr &config) | |
virtual | ~TempoDevice () |
TempoDevice (const Nice::JointPtr &config) | |
virtual | ~TempoDevice () |
![]() | |
Device (const Nice::JointPtr &_config) | |
constructor. This is an elementary (lazy) action which stores the name and gets configuration. More... | |
virtual | ~Device () |
destructor Does nothing More... | |
virtual void | setConfig (const Nice::JointPtr &_config) |
init with config tree ptr More... | |
Nice::JointPtr & | config () |
retrieve the property tree More... | |
std::string & | name () |
retrieve the name set at ctor time. More... | |
Device (const Nice::JointPtr &_config) | |
constructor. This is an elementary (lazy) action which stores the name and gets configuration. More... | |
virtual | ~Device () |
destructor Does nothing More... | |
virtual void | setConfig (const Nice::JointPtr &_config) |
init with config tree ptr More... | |
Nice::JointPtr & | config () |
retrieve the property tree More... | |
std::string & | name () |
retrieve the name set at ctor time. More... | |
Private Member Functions | |
void | createInstances () |
void | addProperties () |
void | setIsReachable (const bool _isReachable) |
void | createInstances () |
void | addProperties () |
void | setIsReachable (const bool _isReachable) |
Private Attributes | |
std::map< std::string, MPIACoreProtocolPtr > | m_protocol |
This member keeps all connection to the UniMod. More... | |
std::map< std::string, UniModCardPtr > | m_card |
This member keeps all card objects. More... | |
std::map< std::string, UniModModuleTemperatureHumidityPtr > | m_module |
This member keeps all module objects. More... | |
std::map< std::string, Nice::ChatLinePtr > | m_chat |
This member keeps all chat objects. More... | |
bool | m_isReachable |
Nice::Mutex | m_mutex |
Nice::Completion | m_completion |
Basda::UniModTHDevice::UniModTHDevice | ( | const Nice::JointPtr & | _config | ) |
|
virtual |
Basda::UniModTHDevice::UniModTHDevice | ( | const Nice::JointPtr & | _config | ) |
|
virtual |
|
virtual |
activate something
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
activate something
_asynch | the call back object |
Implements Basda::Device.
|
private |
|
private |
|
virtual |
This method might be called when the service goes in the OFFLINE state.
The connection to the collision controller will be closed.
Implements Basda::Device.
|
virtual |
This method might be called when the service goes in the OFFLINE state.
The connection to the collision controller will be closed.
Implements Basda::Device.
std::string Basda::UniModTHDevice::createConnectionID | ( | const std::string & | _address, |
const unsigned int | _cardNo, | ||
const unsigned int | _moduleNo | ||
) |
This method creates an ID based on the connection address, card number and module number separated by a colon to identify the module/card object in a map.
_address | the connection string |
_cardNo | the card number |
_moduleNo | the module number |
std::string Basda::UniModTHDevice::createConnectionID | ( | const std::string & | _address, |
const unsigned int | _cardNo, | ||
const unsigned int | _moduleNo | ||
) |
This method creates an ID based on the connection address, card number and module number separated by a colon to identify the module/card object in a map.
_address | the connection string |
_cardNo | the card number |
_moduleNo | the module number |
|
private |
|
private |
|
virtual |
deactivate something
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
deactivate something
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method deinitialize the device and set the state to OFFLINE.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method deinitialize the device and set the state to OFFLINE.
_asynch | the call back object |
Implements Basda::Device.
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
This method initialize the device and set the state to INIT.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method initialize the device and set the state to INIT.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
This method might be called when the service goes in the INIT state.
It connects to the collision controller.
Implements Basda::Device.
|
virtual |
This method might be called when the service goes in the INIT state.
It connects to the collision controller.
Implements Basda::Device.
|
virtual |
|
virtual |
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
This method might be called when the service will be reseted.
The connection to the UniMod will be closed and opened again.
_asynch | the call back object |
Implements Basda::Device.
|
virtual |
This method might be called when the service will be reseted.
The connection to the UniMod will be closed and opened again.
_asynch | the call back object |
Implements Basda::Device.
void Basda::UniModTHDevice::setChatType | ( | std::map< std::string, Nice::ChatLinePtr > | _chat | ) |
void Basda::UniModTHDevice::setChatType | ( | std::map< std::string, Nice::ChatLinePtr > | _chat | ) |
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::MoccaTHDevice.
|
virtual |
Implements Basda::Tempo::TempoDevice.
|
virtual |
Implements Basda::Tempo::TempoDevice.
|
virtual |
This method returns the version string of the device.
Implements Basda::Device.
|
virtual |
This method returns the version string of the device.
Implements Basda::Device.
|
virtual |
|
virtual |
|
private |
This member keeps all card objects.
The key is the connection ID which is composed by the connection address, the card number and the module number.
|
private |
This member keeps all chat objects.
The original Nice::Chat::Line object can be exchanged with a Chat::LineMock object to simulate the UniMod behavior.
|
private |
|
private |
|
private |
This member keeps all module objects.
The key is the connection ID which is composed by the connection address, the card number and the module number.
|
private |
|
private |
This member keeps all connection to the UniMod.
The key is the connection address.