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

#include <XineticsDevice.h>

Inheritance diagram for Laos::XineticsDevice:
Inheritance graph
Collaboration diagram for Laos::XineticsDevice:
Collaboration graph

Public Member Functions

 XineticsDevice (const Nice::JointPtr &_config)
 
virtual ~XineticsDevice ()
 
virtual void init (Basda::DeviceAsync &=s_async)
 init the device More...
 
virtual void open ()
 open device More...
 
virtual void close ()
 close device More...
 
virtual void reset (Basda::DeviceAsync &=s_async)
 reset the device More...
 
virtual void activate (Basda::DeviceAsync &=s_async)
 activate the device More...
 
virtual void deactivate (Basda::DeviceAsync &=s_async)
 deactivate the device More...
 
virtual void handleXineticsEvents (uint32_t _timeout)
 
- Public Member Functions inherited from Laos::XineticsCoreDevice
 XineticsCoreDevice (const Nice::JointPtr &_config)
 
virtual ~XineticsCoreDevice ()
 
virtual void version ()
 version More...
 
virtual void deinit (Basda::DeviceAsync &=s_async)
 deinit the device More...
 
virtual bool setActuators (Nice::SeqInt &_actuatorCmd)
 Calculate voltages (applying corrections like nonliearities) and send the to the refl memory. If the voltages exceed thresholds set by the configuration, the frame is skipped. More...
 
virtual void getActCommands (Nice::SeqInt &_command) const
 Convert the most recently calculated voltages back to their integer values. This is basically the inverse of calcActVoltages() and assumes that m_skipFrame=false, which means it supposes that the most recently calculated voltages have not been rejected by the various threshold checks. More...
 
virtual Nice::SeqInt getExceededNeighborActThreshold ()
 
virtual Nice::SeqInt getExceededActLimits ()
 
virtual void resetActuators ()
 Sets all actuators to actuator command zero. More...
 
virtual void resetActuators (const Nice::SeqFloat &_currentPos)
 
virtual dspState_t getDSPState ()
 
virtual bool getDSPError ()
 
virtual Nice::SeqI16 getFlatPatters ()
 
 XineticsCoreDevice (const Nice::JointPtr &_config)
 
virtual ~XineticsCoreDevice ()
 
virtual void version ()
 version More...
 
virtual void deinit (Basda::DeviceAsync &=s_async)
 deinit the device More...
 
virtual bool setActuators (Nice::SeqInt &_actuatorCmd)
 
virtual void getActCommands (Nice::SeqInt &_command) const
 
virtual Nice::SeqInt getExceededNeighborActThreshold ()
 
virtual Nice::SeqInt getExceededActLimits ()
 
virtual void resetActuators ()
 Sets all actuators to actuator command zero. More...
 
virtual void resetActuators (const Nice::SeqFloat &_currentPos)
 
virtual dspState_t getDSPState ()
 
virtual bool getDSPError ()
 
virtual Nice::SeqI16 getFlatPatters ()
 
 XineticsCoreDevice (const Nice::JointPtr &_config)
 
virtual ~XineticsCoreDevice ()
 
virtual void version ()
 version More...
 
virtual void deinit (Basda::DeviceAsync &=s_async)
 deinit the device More...
 
virtual bool setActuators (Nice::SeqInt &_actuatorCmd)
 
virtual void getActCommands (Nice::SeqInt &_command) const
 
virtual Nice::SeqInt getExceededNeighborActThreshold ()
 
virtual Nice::SeqInt getExceededActLimits ()
 
virtual void resetActuators ()
 Sets all actuators to actuator command zero. More...
 
virtual void resetActuators (const Nice::SeqFloat &_currentPos)
 
virtual dspState_t getDSPState ()
 
virtual bool getDSPError ()
 
virtual Nice::SeqI16 getFlatPatters ()
 
- 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 Member Functions

void applyActVoltages ()
 Send calculated DAC values to the Xinetics Electronics. More...
 
void readDSPMessage (int _messageLength)
 
dspState_t checkDSPStatus ()
 
void checkFiberLink ()
 

Private Attributes

Laos::RfmInterfacem_rfmInterfacePtr
 
RFM2GEVENTTYPE m_sendEventType
 
RFM2GEVENTTYPE m_listenEventType
 
unsigned int m_rfmLowestOffset
 
unsigned short int m_rfmNodeID
 
unsigned int m_clientCookie
 
char m_MessageBuffer [dspSizeMessageBuffer]
 

Additional Inherited Members

- Static Public Attributes inherited from Basda::Device
static DeviceAsyncImpl s_async
 
- Protected Member Functions inherited from Laos::XineticsCoreDevice
void calcActVoltages (const Nice::SeqInt &_command)
 Calculate actuator voltages plus sanity check. More...
 
void addProperties ()
 
void updateProperties ()
 
void calcActVoltages (const Nice::SeqInt &_command)
 Calculate actuator voltages plus sanity check. More...
 
void addProperties ()
 
void updateProperties ()
 
void calcActVoltages (const Nice::SeqInt &_command)
 Calculate actuator voltages plus sanity check. More...
 
void addProperties ()
 
void updateProperties ()
 
- Protected Attributes inherited from Laos::XineticsCoreDevice
Laos::FitsVector< Nice::I16m_actFlatPattern
 
Laos::FitsVector< double > m_actSensitivityPattern
 
Laos::FitsVector< double > m_actNonlinearityPattern
 
double m_actCommonSensitivity
 
bool m_correctFlatness
 
bool m_correctSensitivity
 
bool m_correctNonlinearity
 
Nice::SeqInt m_exceededNeighborActThreshold
 
Nice::SeqInt m_exceededActLimits
 
Laos::FitsVector< Nice::I16m_NeighborMap
 
unsigned int m_NeighborActThreshold
 
long m_temporalDistanceThreshold
 
unsigned short m_actVoltageArray [actVoltageArraySize]
 
unsigned short * m_actVoltagePtr [numberOfXineticsActuators]
 
long m_integratedActVoltage
 
long m_frameCounter
 
long m_skippedFrameCounter
 
bool m_skipFrame
 
bool m_isFlat
 
std::string m_deviceFile
 
Laos::dspState_t m_dspState
 
std::map< dspState_t, std::string > m_dspStatename
 
bool m_dspError
 
bool m_fiberLink
 
- 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

◆ XineticsDevice()

Laos::XineticsDevice::XineticsDevice ( const Nice::JointPtr _config)

◆ ~XineticsDevice()

Laos::XineticsDevice::~XineticsDevice ( )
virtual

Member Function Documentation

◆ activate()

void Laos::XineticsDevice::activate ( Basda::DeviceAsync = s_async)
virtual

activate the device

Implements Basda::Device.

◆ applyActVoltages()

void Laos::XineticsDevice::applyActVoltages ( )
privatevirtual

Send calculated DAC values to the Xinetics Electronics.

Returns
void

Implements Laos::XineticsCoreDevice.

◆ checkDSPStatus()

Laos::dspState_t Laos::XineticsDevice::checkDSPStatus ( )
private

◆ checkFiberLink()

void Laos::XineticsDevice::checkFiberLink ( )
private

◆ close()

void Laos::XineticsDevice::close ( )
virtual

close device

Reimplemented from Laos::XineticsCoreDevice.

◆ deactivate()

void Laos::XineticsDevice::deactivate ( Basda::DeviceAsync = s_async)
virtual

deactivate the device

Implements Basda::Device.

◆ handleXineticsEvents()

void Laos::XineticsDevice::handleXineticsEvents ( uint32_t  _timeout)
virtual

◆ init()

void Laos::XineticsDevice::init ( Basda::DeviceAsync = s_async)
virtual

init the device

Reimplemented from Laos::XineticsCoreDevice.

◆ open()

void Laos::XineticsDevice::open ( )
virtual

open device

Reimplemented from Laos::XineticsCoreDevice.

◆ readDSPMessage()

void Laos::XineticsDevice::readDSPMessage ( int  _messageLength)
private

◆ reset()

void Laos::XineticsDevice::reset ( Basda::DeviceAsync = s_async)
virtual

reset the device

Implements Basda::Device.

Member Data Documentation

◆ m_clientCookie

unsigned int Laos::XineticsDevice::m_clientCookie
private

◆ m_listenEventType

RFM2GEVENTTYPE Laos::XineticsDevice::m_listenEventType
private

◆ m_MessageBuffer

char Laos::XineticsDevice::m_MessageBuffer[dspSizeMessageBuffer]
private

◆ m_rfmInterfacePtr

Laos::RfmInterface* Laos::XineticsDevice::m_rfmInterfacePtr
private

◆ m_rfmLowestOffset

unsigned int Laos::XineticsDevice::m_rfmLowestOffset
private

◆ m_rfmNodeID

unsigned short int Laos::XineticsDevice::m_rfmNodeID
private

◆ m_sendEventType

RFM2GEVENTTYPE Laos::XineticsDevice::m_sendEventType
private

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