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

#include <BasicIODeviceWutTestFixture.h>

Inheritance diagram for mpia::TestableIODeviceWut:
Inheritance graph
Collaboration diagram for mpia::TestableIODeviceWut:
Collaboration graph

Public Member Functions

 TestableIODeviceWut (const Nice::JointPtr &config)
 
void replaceWebSocketFactory (Basda::WebSocketFactoryPtr newFactory)
 
unsigned getMaxAllowedNetworkServiceDelayInMicroSec ()
 
unsigned getPollCycleTimeInMilliSec ()
 
virtual void startWatchdogThread ()
 
unsigned getInvocationCount_startWebIoWatchdogThread ()
 
virtual void terminateWatchdogThreadIfAny ()
 
unsigned getInvocationCount_terminateWatchdogThreadIfAny ()
 
- Public Member Functions inherited from Basda::IODeviceWut
 IODeviceWut (const Nice::JointPtr &_config)
 
virtual ~IODeviceWut ()
 
virtual void open ()
 initialize fundamental communication parameters. Define hostname, password and polling cycle. More...
 
virtual void close ()
 toggle an internal flag to disable further use. More...
 
virtual void reset (Basda::DeviceAsync &=Basda::Device::s_async)
 Tells the basda status to assume a reset state. More...
 
virtual void init (Basda::DeviceAsync &=Basda::Device::s_async)
 Initialize counters and values to an unknown status. More...
 
virtual void deinit (Basda::DeviceAsync &=Basda::Device::s_async)
 Tells the basda status to assume a de-initialized status. More...
 
virtual void activate (DeviceAsync &=s_async)
 dummy function which does nothing. More...
 
virtual void deactivate (DeviceAsync &=s_async)
 dummy function which does nothing. More...
 
virtual void version ()
 logs a version number into the logger. More...
 
virtual std::vector< double > read ()
 Reads out the device and updates the property tree. More...
 
virtual void write (std::vector< double >)
 dummy function. Does nothing. More...
 
virtual enum PortState readOutputPort (int index)
 Obtain a single port's status. More...
 
virtual void setOutputPort (int portIndex, enum PortState desiredState)
 Set a single output port to on or off. More...
 
virtual Nice::JointPtrVector description (void)
 get the part nodes More...
 
virtual bool isReachable ()
 
virtual void hardwareIsReachable ()
 Set the flag for reachability to true. More...
 
virtual void hardwareIsUnreachable ()
 Set the flag for reachability to false. More...
 
- Public Member Functions inherited from Basda::AnalogIODevice
 AnalogIODevice (const Nice::JointPtr &_config)
 
 AnalogIODevice (const Nice::JointPtr &_config)
 
 AnalogIODevice (const Nice::JointPtr &_config)
 
- Public Member Functions inherited from Basda::Device
 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::JointPtrconfig ()
 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::JointPtrconfig ()
 retrieve the property tree More...
 
std::string & name ()
 retrieve the name set at ctor time. More...
 

Private Attributes

unsigned invocationCount_startWebIoWatchdogThread_
 
unsigned invocationCount_terminateWatchdogThreadIfAny_
 

Additional Inherited Members

- Public Types inherited from Basda::AnalogIODevice
enum  PortState {
  PORT_STATE_OFF = 0, PORT_STATE_ON = 1, PORT_STATE_UNKNOWN = -1, PORT_STATE_OFF = 0,
  PORT_STATE_ON = 1, PORT_STATE_UNKNOWN = -1, PORT_STATE_OFF = 0, PORT_STATE_ON = 1,
  PORT_STATE_UNKNOWN = -1
}
 
enum  PortState {
  PORT_STATE_OFF = 0, PORT_STATE_ON = 1, PORT_STATE_UNKNOWN = -1, PORT_STATE_OFF = 0,
  PORT_STATE_ON = 1, PORT_STATE_UNKNOWN = -1, PORT_STATE_OFF = 0, PORT_STATE_ON = 1,
  PORT_STATE_UNKNOWN = -1
}
 
enum  PortState {
  PORT_STATE_OFF = 0, PORT_STATE_ON = 1, PORT_STATE_UNKNOWN = -1, PORT_STATE_OFF = 0,
  PORT_STATE_ON = 1, PORT_STATE_UNKNOWN = -1, PORT_STATE_OFF = 0, PORT_STATE_ON = 1,
  PORT_STATE_UNKNOWN = -1
}
 
- Static Public Member Functions inherited from Basda::IODeviceWut
static std::string toString (enum Basda::AnalogIODevice::PortState state)
 Convert the enumerated state to a human-readable string. More...
 
- Static Public Attributes inherited from Basda::Device
static DeviceAsyncImpl s_async
 
- Protected Member Functions inherited from Basda::IODeviceWut
void setReachablePropertyTo (bool reachable)
 
void injectWebSocketFactory (WebSocketFactoryPtr newFactory)
 
int cnvrtOutIndexToNodeIndex (const int index)
 reverse lookup of the device index in the vector of PART's More...
 
- Protected Attributes inherited from Basda::IODeviceWut
Nice::JointPtrVector m_partNodes
 
webIOInputVector m_input
 
webIOOutputVector m_output
 
bool readyForDeviceCommunication_
 
Nice::Mutex m_mtx
 
Nice::Mutex m_readMtx
 
Nice::Mutex m_writeMtx
 
unsigned m_maxAllowedNetworkServiceDelayInMicroSec
 
unsigned m_pollCycleTimeInMilliSec
 
Basda::WuT::LogPtr m_log
 
- Protected Attributes inherited from Basda::Device
Nice::JointPtr m_config
 
Nice::JointPtr m_cfg
 
Nice::JointPtr m_var
 
std::string m_name
 

Constructor & Destructor Documentation

◆ TestableIODeviceWut()

mpia::TestableIODeviceWut::TestableIODeviceWut ( const Nice::JointPtr config)
inline

Member Function Documentation

◆ getInvocationCount_startWebIoWatchdogThread()

unsigned mpia::TestableIODeviceWut::getInvocationCount_startWebIoWatchdogThread ( )
inline

◆ getInvocationCount_terminateWatchdogThreadIfAny()

unsigned mpia::TestableIODeviceWut::getInvocationCount_terminateWatchdogThreadIfAny ( )
inline

◆ getMaxAllowedNetworkServiceDelayInMicroSec()

unsigned mpia::TestableIODeviceWut::getMaxAllowedNetworkServiceDelayInMicroSec ( )
inline

◆ getPollCycleTimeInMilliSec()

unsigned mpia::TestableIODeviceWut::getPollCycleTimeInMilliSec ( )
inline

◆ replaceWebSocketFactory()

void mpia::TestableIODeviceWut::replaceWebSocketFactory ( Basda::WebSocketFactoryPtr  newFactory)
inline

◆ startWatchdogThread()

virtual void mpia::TestableIODeviceWut::startWatchdogThread ( )
inlinevirtual

◆ terminateWatchdogThreadIfAny()

virtual void mpia::TestableIODeviceWut::terminateWatchdogThreadIfAny ( )
inlinevirtual

Member Data Documentation

◆ invocationCount_startWebIoWatchdogThread_

unsigned mpia::TestableIODeviceWut::invocationCount_startWebIoWatchdogThread_
private

◆ invocationCount_terminateWatchdogThreadIfAny_

unsigned mpia::TestableIODeviceWut::invocationCount_terminateWatchdogThreadIfAny_
private

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