TwiceAsNice  2019-02-18
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Basda::DmDevice Class Referenceabstract

This is the Deformable Mirror Service Interface. More...

#include <Device.h>

Inheritance diagram for Basda::DmDevice:
Inheritance graph
Collaboration diagram for Basda::DmDevice:
Collaboration graph

Public Member Functions

 DmDevice (const Nice::JointPtr &_config)
 
 DmDevice (const unsigned int _totalActuators, const std::vector< unsigned int > &_blankActuators, const unsigned short int _voltageLimitMin, const unsigned short int _voltageLimitMax, const double _maxPiston, const double _maxPistonStep, const std::vector< double > &_nonliniearityVector, const std::vector< double > &_sensitivityVector, const std::vector< double > &_flatPatternVector, const std::vector< std::vector< double > > &_injectionMatrix)
 constructor initialize the DM with following parameters More...
 
virtual ~DmDevice ()
 default destructor More...
 
virtual void reset (Basda::DeviceAsync &=Basda::Device::s_async)
 reset the device More...
 
virtual void version ()
 version More...
 
virtual void init (Basda::DeviceAsync &=Basda::Device::s_async)
 init the device More...
 
virtual void deinit (Basda::DeviceAsync &=Basda::Device::s_async)
 deinit the device More...
 
virtual void activate (DeviceAsync &=Basda::Device::s_async)
 activate the device More...
 
virtual void deactivate (DeviceAsync &=Basda::Device::s_async)
 deactivate the device More...
 
virtual void open (char *_devicePath)=0
 Opens the DM device. More...
 
void open (const Nice::Completion &_c)
 
virtual void open ()
 open device More...
 
void close (const Nice::Completion &_c)
 Closes an open DM device. More...
 
virtual void close ()
 close device More...
 
unsigned short int getNodeID ()
 Returns the Reflective Memory device node ID. More...
 
virtual unsigned short int readNodeID ()=0
 
unsigned int getBoardID ()
 Returns the ID of the Reflective Memory board. More...
 
virtual unsigned int readBoardID ()=0
 
unsigned int getMemorySize ()
 Returns the total amount of memory space available on the Reflective Memory device. More...
 
virtual unsigned int readMemorySize ()=0
 
std::string getDeviceName ()
 Returns the Reflective Memory device name. More...
 
virtual std::string readDeviceName ()=0
 
std::string getDriverVersion ()
 Returns the Reflective Memory device driver version. More...
 
virtual std::string readDriverVersion ()=0
 
Nice::CompletionState setNonlinearity (const std::vector< double > &_nonliniearityVector, Nice::PropertyFoo *)
 Set the weighting factor for the non-linearities. More...
 
void setNonlinearity (const std::vector< double > &_nonliniearityVector)
 Set the weighting factor for the non-linearities. More...
 
std::vector< Ice::Double > getNonlinearity ()
 Returns the weighting factor for the non-linearities. More...
 
Nice::CompletionState setSensitivity (const std::vector< double > &_sensitivityVector, Nice::PropertyFoo *)
 Set the vector of the different sensibilities of the single actuators. More...
 
void setSensitivity (const std::vector< double > &_sensitivityVector)
 Set the vector of the different sensibilities of the single actuators. More...
 
std::vector< Ice::Double > getSensitivity ()
 Returns the vector of the different sensibilities of the single actuators. More...
 
Nice::CompletionState setFlatPattern (const std::vector< double > &_flatPatternVector, Nice::PropertyFoo *)
 Set the flat pattern vector. More...
 
void setFlatPattern (const std::vector< double > &_flatPattern)
 Set the flat pattern vector. More...
 
std::vector< Ice::Double > getFlatPattern ()
 Returns the flat pattern vector. More...
 
Nice::CompletionState setInjection (const std::vector< std::vector< double > > &_injectionMatrix, Nice::PropertyFoo *)
 Set the injection matrix. More...
 
void setInjection (const std::vector< std::vector< double > > &_injectionMatrix)
 Set the injection matrix. More...
 
std::vector< std::vector< double > > getInjection ()
 Returns the injection matrix. More...
 
Nice::CompletionState setActuatorPositions (const std::vector< double > &_actuatorStrokesPercent, Nice::PropertyFoo *)
 Sends the position of each actuator to the Deformable Mirror. More...
 
virtual void setActuatorPositions (const std::vector< double > &_actuatorStrokesPercent, const bool _pistonStep, const bool _addSensitivity, const bool _addNonLinearity, const bool _addFlatPattern)
 Sends the position of each actuator to the Deformable Mirror. More...
 
virtual void applyStroke ()=0
 
virtual void readStroke ()=0
 
void readActuatorPositions (const Nice::Completion &_c)
 
void getActuatorPositions (std::vector< double > &_actuatorStrokesPercent)
 
Nice::CompletionState setModesAmplitude (const std::vector< double > &_modesAmplitude, Nice::PropertyFoo *)
 Compute the actuator positions based on amplitude vector and injection matrix and sends the position of each actuator to the Deformable Mirror. More...
 
void setModesAmplitude (const std::vector< double > &_modesAmplitude, const bool _pistonStep, const bool _addSensitivity, const bool _addNonLinearity, const bool _addFlatPattern)
 Sends the position of each actuator to the Deformable Mirror. More...
 
bool getLedStatus ()
 Retrieves the current ON/OFF state of the Reflective Memory board's STATUS LED. More...
 
virtual bool readLedStatus ()=0
 
Nice::CompletionState setLedStatus (const bool &_ledStatus, Nice::PropertyFoo *)
 Sets the ON/OFF state of the Reflective Memory board's STATUS LED. More...
 
void setLedStatus (const bool &_ledStatus)
 Sets the ON/OFF state of the Reflective Memory board's STATUS LED. More...
 
virtual void writeLedStatus (const bool &_ledStatus)=0
 
- 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...
 

Protected Attributes

Nice::U32 m_lowestOffset
 
std::vector< double > m_actuatorStrokesPercent
 
/** More...
 
std::vector< Nice::U16m_actuatorStrokesVoltage
 This member holds voltage values of each actuators. More...
 
Nice::U16 m_voltageLimitMin
 This member holds minimum voltage limit for actuators. More...
 
Nice::U16 m_voltageLimitMean
 This member holds mean voltage limit for actuators. More...
 
Nice::U16 m_voltageLimitMax
 This member holds maximum voltage limit for actuators. More...
 
double m_actuatorStrokesMeanLast
 This member holds last mean actuator strokes. More...
 
Nice::U32 m_totalActuators
 Member to store the total number of actuators inclusive blanks. More...
 
Nice::U32 m_presentActuators
 Member to store the present number of actuators exclusive blanks. More...
 
std::vector< boolm_blankActuators
 List, which stores the blank actuators. More...
 
std::vector< double > m_nonliniearityVector
 Member to store the weight vector for the non-linearities. More...
 
double m_maxPiston
 Member to store the maximum value of the allowed piston. More...
 
double m_maxPistonStep
 Member to store the maximum piston step between two successive commands. More...
 
std::vector< double > m_sensitivityVector
 Member to store the sensitivity vector. More...
 
std::vector< double > m_flatPatternVector
 Member to store the flat pattern. More...
 
std::vector< std::vector< double > > m_injectionMatrix
 Member to store the injection matrix. More...
 
Nice::U32 m_injectionModes
 Member to store the number of modes. More...
 
Nice::JointPtrVector m_moduleNodes
 
bool m_connected
 Member variable indicates the status of the connection. More...
 
- Protected Attributes inherited from Basda::Device
Nice::JointPtr m_config
 
Nice::JointPtr m_cfg
 
Nice::JointPtr m_var
 
std::string m_name
 

Private Member Functions

void addSensitivity ()
 The sensitivity of each actuator are add to the current actuator strokes. More...
 
void addNonLinearity ()
 The non-linearities of each actuator are add to the current actuator strokes. More...
 
void addFlatPattern ()
 The flat pattern are add to the current actuator strokes. More...
 
void checkPiston (const bool _pistonStep)
 This method checks the piston and the maximum piston step of the Deformable Mirror. More...
 
void convert2Voltage ()
 This method convert the percental strokes of each actuators to the voltage values of each actuators. More...
 
void convert2Percent (std::vector< double > &_actuatorStrokesPercent)
 This method convert the voltage values of each actuators to the percental strokes of each actuators. More...
 
double mean ()
 This method comnpute the mean value of m_actuatorStrokesPercent. More...
 

Private Attributes

::Nice::Mutex m_mutex
 Mutex to avoid reading and writing at the same time. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Basda::Device
static DeviceAsyncImpl s_async
 

Detailed Description

This is the Deformable Mirror Service Interface.

This service contains all necessary logic and intelligence to control the Deformable Mirror (DM). It uses the Reflective Memory (RFM2G) as interface to the DM.

Author
Frank Kittmann
Version
07.10.25
Date
2007.10.25
See also
Carma::Rfm::DrvI
Todo:

Add #Nice::App::Application (Currently the Nice common software doesnt support this).

Setup a configuration file with the initial parameters.

Add an ICE interface and a server for remote connection. (Currently the Nice common software doesnt support this).

Constructor & Destructor Documentation

◆ DmDevice() [1/2]

Basda::DmDevice::DmDevice ( const Nice::JointPtr _config)

◆ DmDevice() [2/2]

Basda::DmDevice::DmDevice ( const unsigned int  _totalActuators,
const std::vector< unsigned int > &  _blankActuators,
const unsigned short int  _voltageLimitMin,
const unsigned short int  _voltageLimitMax,
const double  _maxPiston,
const double  _maxPistonStep,
const std::vector< double > &  _nonliniearityVector,
const std::vector< double > &  _sensitivityVector,
const std::vector< double > &  _flatPatternVector,
const std::vector< std::vector< double > > &  _injectionMatrix 
)

constructor initialize the DM with following parameters

Parameters
_totalActuatorsthe total number of actuators inclusive blanks
_blankActuatorsa vector with the IDs of the Blank actuators
_voltageLimitMinthe minimum voltage limit
_voltageLimitMaxthe maximum voltage limit
_maxPistonthe maximum value of the allowed piston
_maxPistonStepthe maximum piston step between two successive commands
_nonliniearityVectorweighting vector for the non-linearities
_sensitivityVectorvector of the different sensibilities of the single actuators
_flatPatternVectorvector contains the flat pattern
_injectionMatrixmatrix contains the injection parameter
Exceptions
Basda::Dm::vectorSizeException
Basda::Dm::multibleBlanksException
Basda::Dm::zeroSensitivtyException
Basda::Dm::matrixSizeException

◆ ~DmDevice()

Basda::DmDevice::~DmDevice ( )
virtual

default destructor

Parameters
-

Member Function Documentation

◆ activate()

virtual void Basda::DmDevice::activate ( DeviceAsync = Basda::Device::s_async)
inlinevirtual

activate the device

Implements Basda::Device.

◆ addFlatPattern()

void Basda::DmDevice::addFlatPattern ( )
private

The flat pattern are add to the current actuator strokes.

This method change the private member m_actuatorStrokesPercent.

Parameters
-
Returns
-
See also
m_actuatorStrokesPercent
m_flatPatternVector

◆ addNonLinearity()

void Basda::DmDevice::addNonLinearity ( )
private

The non-linearities of each actuator are add to the current actuator strokes.

This method change the private member m_actuatorStrokesPercent.

Parameters
-
Returns
-
See also
m_actuatorStrokesPercent
m_factorNonliniear

◆ addSensitivity()

void Basda::DmDevice::addSensitivity ( )
private

The sensitivity of each actuator are add to the current actuator strokes.

This method change the private member m_actuatorStrokesPercent.

Parameters
-
Returns
-
See also
m_actuatorStrokesPercent
m_sensitivityVector

◆ applyStroke()

virtual void Basda::DmDevice::applyStroke ( )
pure virtual

◆ checkPiston()

void Basda::DmDevice::checkPiston ( const bool  _pistonStep)
private

This method checks the piston and the maximum piston step of the Deformable Mirror.

Depends on the mode the piston of the Deformable Mirror is checked. In case the piston is to high the percental strokes of each actuators (m_actuatorStrokesPercent) are adjust to the maximal possible.

Parameters
_pistonStepsee setActuatorPositions()
Returns
-
See also
Basda::Dm::serviceI::m_actuatorStrokesPercent

◆ close() [1/2]

void Basda::DmDevice::close ( const Nice::Completion _c)

Closes an open DM device.

Parameters
-
Returns
-
See also
Basda::Rfm::DrvI::close

◆ close() [2/2]

virtual void Basda::DmDevice::close ( )
inlinevirtual

close device

Implements Basda::Device.

◆ convert2Percent()

void Basda::DmDevice::convert2Percent ( std::vector< double > &  _actuatorStrokesPercent)
private

This method convert the voltage values of each actuators to the percental strokes of each actuators.

Parameters
_actuatorStrokesPercentsee getActuatorPositions()
Returns
-

◆ convert2Voltage()

void Basda::DmDevice::convert2Voltage ( )
private

This method convert the percental strokes of each actuators to the voltage values of each actuators.

This method change the private member m_actuatorStrokesVoltage.

Parameters
-
Returns
-

◆ deactivate()

virtual void Basda::DmDevice::deactivate ( DeviceAsync = Basda::Device::s_async)
inlinevirtual

deactivate the device

Implements Basda::Device.

◆ deinit()

virtual void Basda::DmDevice::deinit ( Basda::DeviceAsync = Basda::Device::s_async)
inlinevirtual

deinit the device

Implements Basda::Device.

◆ getActuatorPositions()

void Basda::DmDevice::getActuatorPositions ( std::vector< double > &  _actuatorStrokesPercent)

◆ getBoardID()

unsigned int Basda::DmDevice::getBoardID ( )

Returns the ID of the Reflective Memory board.

Parameters
-
Returns
boardId - Board ID of the currently opened RFM2g device.
Exceptions
Carma::Dm::closeDeviceException
See also
Carma::Rfm::DrvI::getBoardID

◆ getDeviceName()

std::string Basda::DmDevice::getDeviceName ( )

Returns the Reflective Memory device name.

Parameters
-
Returns
device name - a null-terminated string containing the first 64 characters of the device file name.
Exceptions
Carma::Dm::closeDeviceException
See also
Carma::Rfm::DrvI::getDeviceName

◆ getDriverVersion()

std::string Basda::DmDevice::getDriverVersion ( )

Returns the Reflective Memory device driver version.

Parameters
-
Returns
driver version - an ASCII string with which an application program can determine the GE Fanuc Embedded Systems production release version of the underlying RFM2g device driver.
Exceptions
Carma::Dm::closeDeviceException
See also
Carma::Rfm::DrvI::getDeviceName

◆ getFlatPattern()

std::vector< double > Basda::DmDevice::getFlatPattern ( )

Returns the flat pattern vector.

Parameters
-
Returns
vector contains the flat pattern

◆ getInjection()

std::vector< std::vector< double > > Basda::DmDevice::getInjection ( )

Returns the injection matrix.

Parameters
-
Returns
matrix contains the different modes for each actuator

◆ getLedStatus()

bool Basda::DmDevice::getLedStatus ( )

Retrieves the current ON/OFF state of the Reflective Memory board's STATUS LED.

Parameters
-
Returns
led status - true led is switched on; false led is switched off
Exceptions
Carma::Dm::closeDeviceException
See also
Carma::Rfm::DrvI::getLedStatus

◆ getMemorySize()

unsigned int Basda::DmDevice::getMemorySize ( )

Returns the total amount of memory space available on the Reflective Memory device.

Parameters
-
Returns
memory size - the total amount of memory space available on the Reflective Memory device.
Exceptions
Carma::Dm::closeDeviceException
See also
Carma::Rfm::DrvI::getMemorySize

◆ getNodeID()

unsigned short int Basda::DmDevice::getNodeID ( )

Returns the Reflective Memory device node ID.

Parameters
-
Returns
nodeId - Node ID of the currently opened RFM2g device.
Exceptions
Carma::Dm::closeDeviceException
See also
Carma::Rfm::DrvI::getNodeID

◆ getNonlinearity()

std::vector< double > Basda::DmDevice::getNonlinearity ( )

Returns the weighting factor for the non-linearities.

Parameters
-
Returns
weighting factor for the non-linearities

◆ getSensitivity()

std::vector< double > Basda::DmDevice::getSensitivity ( )

Returns the vector of the different sensibilities of the single actuators.

Parameters
-
Returns
vector of the different sensibilities of the single actuators

◆ init()

void Basda::DmDevice::init ( Basda::DeviceAsync _async = Basda::Device::s_async)
virtual

init the device

Implements Basda::Device.

◆ mean()

double Basda::DmDevice::mean ( )
private

This method comnpute the mean value of m_actuatorStrokesPercent.

Parameters
-
Returns
the mean value

◆ open() [1/3]

virtual void Basda::DmDevice::open ( char *  _devicePath)
pure virtual

Opens the DM device.

Parameters
_devicePathPath to special device file. Refer to your driver-specific manual for the format of DevicePath.
Returns
-
Exceptions
Basda::Dm::closeDeviceException
See also
Basda::Rfm::DrvI::open

◆ open() [2/3]

void Basda::DmDevice::open ( const Nice::Completion _c)

◆ open() [3/3]

virtual void Basda::DmDevice::open ( )
inlinevirtual

open device

Implements Basda::Device.

◆ readActuatorPositions()

void Basda::DmDevice::readActuatorPositions ( const Nice::Completion _c)

◆ readBoardID()

virtual unsigned int Basda::DmDevice::readBoardID ( )
pure virtual

◆ readDeviceName()

virtual std::string Basda::DmDevice::readDeviceName ( )
pure virtual

◆ readDriverVersion()

virtual std::string Basda::DmDevice::readDriverVersion ( )
pure virtual

◆ readLedStatus()

virtual bool Basda::DmDevice::readLedStatus ( )
pure virtual

◆ readMemorySize()

virtual unsigned int Basda::DmDevice::readMemorySize ( )
pure virtual

◆ readNodeID()

virtual unsigned short int Basda::DmDevice::readNodeID ( )
pure virtual

◆ readStroke()

virtual void Basda::DmDevice::readStroke ( )
pure virtual

◆ reset()

virtual void Basda::DmDevice::reset ( Basda::DeviceAsync = Basda::Device::s_async)
inlinevirtual

reset the device

Implements Basda::Device.

◆ setActuatorPositions() [1/2]

Nice::CompletionState Basda::DmDevice::setActuatorPositions ( const std::vector< double > &  _actuatorStrokesPercent,
Nice::PropertyFoo  
)

Sends the position of each actuator to the Deformable Mirror.

The unit of the positions is percent and are in range of -1 .. +1.

Parameters
_actuatorStrokesPercentPointer to where data is copied to Reflective Memory. Variable containing the current stroke values of all actuator. The values are in a range of -1 .. +1. The size of this vector depends on the amount of the Deformable Mirror actuator and have to be defined in the configuration file.
Returns
-
Exceptions
Basda::Dm::closeDeviceException
Basda::Dm::vectorSizeException
See also
Basda::Rfm::DrvI::write

◆ setActuatorPositions() [2/2]

void Basda::DmDevice::setActuatorPositions ( const std::vector< double > &  _actuatorStrokesPercent,
const bool  _pistonStep,
const bool  _addSensitivity,
const bool  _addNonLinearity,
const bool  _addFlatPattern 
)
virtual

Sends the position of each actuator to the Deformable Mirror.

The unit of the positions is percent and are in range of -1 .. +1.

Parameters
_actuatorStrokesPercentPointer to where data is copied to Reflective Memory. Variable containing the current stroke values of all actuator. The values are in a range of -1 .. +1. The size of this vector depends on the amount of the Deformable Mirror actuator and have to be defined in the configuration file.
_pistonStepThe flag can be used to switch between the two modes:
  • false - The Deformable Mirror moves around the home position.
  • true - The Deformable Mirror can be move forward and backward (very slowly!!). The maximal piston step is defined in the configuration file.
_addSensitivityThe flag can be used to switch between the two modes:
  • true - add the sensitivity vector to the actuator strokes
  • false - do not add the sensitivity vector to the actuator strokes
_addNonLinearityThe flag can be used to switch between the two modes:
  • true - add the non-linearity vector to the actuator strokes
  • false - do not add the non-linearity vector to the actuator strokes
_addFlatPatternThe flag can be used to switch between the two modes:
  • true - add the flat pattern vector to the actuator strokes
  • false - do not add the flat pattern vector to the actuator strokes
Returns
-
Exceptions
Basda::Dm::closeDeviceException
Basda::Dm::vectorSizeException
See also
Basda::Rfm::DrvI::write

◆ setFlatPattern() [1/2]

Nice::CompletionState Basda::DmDevice::setFlatPattern ( const std::vector< double > &  _flatPatternVector,
Nice::PropertyFoo  
)

Set the flat pattern vector.

Parameters
_flatPatternvector contains the flat pattern
Returns
-
Exceptions
Basda::Dm::vectorSizeException

◆ setFlatPattern() [2/2]

void Basda::DmDevice::setFlatPattern ( const std::vector< double > &  _flatPattern)

Set the flat pattern vector.

Parameters
_flatPatternvector contains the flat pattern
Returns
-
Exceptions
Basda::Dm::vectorSizeException

◆ setInjection() [1/2]

Nice::CompletionState Basda::DmDevice::setInjection ( const std::vector< std::vector< double > > &  _injectionMatrix,
Nice::PropertyFoo  
)

Set the injection matrix.

Parameters
_injectionMatrixmatrix contains the different modes for each actuator
Returns
-
Exceptions
Basda::Dm::matrixSizeException

◆ setInjection() [2/2]

void Basda::DmDevice::setInjection ( const std::vector< std::vector< double > > &  _injectionMatrix)

Set the injection matrix.

Parameters
_injectionMatrixmatrix contains the different modes for each actuator
Returns
-
Exceptions
Basda::Dm::matrixSizeException

◆ setLedStatus() [1/2]

Nice::CompletionState Basda::DmDevice::setLedStatus ( const bool _ledStatus,
Nice::PropertyFoo  
)

Sets the ON/OFF state of the Reflective Memory board's STATUS LED.

Returns
-
See also
Basda::Rfm::DrvI::setLedStatus

◆ setLedStatus() [2/2]

void Basda::DmDevice::setLedStatus ( const bool _ledStatus)

Sets the ON/OFF state of the Reflective Memory board's STATUS LED.

Parameters
_ledStatusThe state of the LED: true -> on, false -> off
Returns
-
Exceptions
Basda::Dm::closeDeviceException
See also
Basda::Rfm::DrvI::setLedStatus

◆ setModesAmplitude() [1/2]

Nice::CompletionState Basda::DmDevice::setModesAmplitude ( const std::vector< double > &  _modesAmplitude,
Nice::PropertyFoo  
)

Compute the actuator positions based on amplitude vector and injection matrix and sends the position of each actuator to the Deformable Mirror.

Parameters
_modesAmplitudethe amplitudes of the different modes
Returns
-
Exceptions
Basda::Dm::closeDeviceException
See also
Basda::Dm::ServiceI::setActuatorPositions

◆ setModesAmplitude() [2/2]

void Basda::DmDevice::setModesAmplitude ( const std::vector< double > &  _modesAmplitude,
const bool  _pistonStep,
const bool  _addSensitivity,
const bool  _addNonLinearity,
const bool  _addFlatPattern 
)

Sends the position of each actuator to the Deformable Mirror.

The unit of the positions is percent and are in range of -1 .. +1.

Parameters
_actuatorStrokesPercentPointer to where data is copied to Reflective Memory. Variable containing the current stroke values of all actuator. The values are in a range of -1 .. +1. The size of this vector depends on the amount of the Deformable Mirror actuator and have to be defined in the configuration file.
_pistonStepThe flag can be used to switch between the two modes:
  • false - The Deformable Mirror moves around the home position.
  • true - The Deformable Mirror can be move forward and backward (very slowly!!). The maximal piston step is defined in the configuration file.
_addSensitivityThe flag can be used to switch between the two modes:
  • true - add the sensitivity vector to the actuator strokes
  • false - do not add the sensitivity vector to the actuator strokes
_addNonLinearityThe flag can be used to switch between the two modes:
  • true - add the non-linearity vector to the actuator strokes
  • false - do not add the non-linearity vector to the actuator strokes
_addFlatPatternThe flag can be used to switch between the two modes:
  • true - add the flat pattern vector to the actuator strokes
  • false - do not add the flat pattern vector to the actuator strokes
Returns
-
Exceptions
Basda::Dm::closeDeviceException
Basda::Dm::vectorSizeException
See also
Basda::Rfm::DrvI::write

◆ setNonlinearity() [1/2]

Nice::CompletionState Basda::DmDevice::setNonlinearity ( const std::vector< double > &  _nonliniearityVector,
Nice::PropertyFoo  
)

Set the weighting factor for the non-linearities.

Parameters
_nonliniearityVectorweighting vector for the non-linearities
Returns
-

◆ setNonlinearity() [2/2]

void Basda::DmDevice::setNonlinearity ( const std::vector< double > &  _nonliniearityVector)

Set the weighting factor for the non-linearities.

Parameters
_nonliniearityVectorweighting vector for the non-linearities
Returns
-

◆ setSensitivity() [1/2]

Nice::CompletionState Basda::DmDevice::setSensitivity ( const std::vector< double > &  _sensitivityVector,
Nice::PropertyFoo  
)

Set the vector of the different sensibilities of the single actuators.

Parameters
_sensitivityVectorvector of the different sensibilities of the single actuators
Returns
-
Exceptions
Basda::Dm::vectorSizeException
Basda::Dm::zeroSensitivtyException

◆ setSensitivity() [2/2]

void Basda::DmDevice::setSensitivity ( const std::vector< double > &  _sensitivityVector)

Set the vector of the different sensibilities of the single actuators.

Parameters
_sensitivityVectorvector of the different sensibilities of the single actuators
Returns
-
Exceptions
Basda::Dm::vectorSizeException
Basda::Dm::zeroSensitivtyException

◆ version()

virtual void Basda::DmDevice::version ( void  )
inlinevirtual

version

Implements Basda::Device.

◆ writeLedStatus()

virtual void Basda::DmDevice::writeLedStatus ( const bool _ledStatus)
pure virtual

Member Data Documentation

◆ m_actuatorStrokesMeanLast

double Basda::DmDevice::m_actuatorStrokesMeanLast
protected

This member holds last mean actuator strokes.

This is necessary to know check the piston step distance.

◆ m_actuatorStrokesPercent

std::vector<double> Basda::DmDevice::m_actuatorStrokesPercent
protected


/**

This member holds percental strokes of each actuators.

The size of this vector depends on the amount of the Deformable Mirror actuator and have to be defined in the configuration file.

◆ m_actuatorStrokesVoltage

std::vector<Nice::U16> Basda::DmDevice::m_actuatorStrokesVoltage
protected

This member holds voltage values of each actuators.

The size of this vector depends on the amount of the Deformable Mirror actuator and have to be defined in the configuration file.

◆ m_blankActuators

std::vector<bool> Basda::DmDevice::m_blankActuators
protected

List, which stores the blank actuators.

It have to be defined in the configuration file.

◆ m_connected

bool Basda::DmDevice::m_connected
protected

Member variable indicates the status of the connection.

true - connected; false - disconnected

◆ m_flatPatternVector

std::vector<double> Basda::DmDevice::m_flatPatternVector
protected

Member to store the flat pattern.

It have to be defined in the configuration file.

◆ m_injectionMatrix

std::vector<std::vector<double> > Basda::DmDevice::m_injectionMatrix
protected

Member to store the injection matrix.

It have to be defined in the configuration file.

◆ m_injectionModes

Nice::U32 Basda::DmDevice::m_injectionModes
protected

Member to store the number of modes.

◆ m_lowestOffset

Nice::U32 Basda::DmDevice::m_lowestOffset
protected

◆ m_maxPiston

double Basda::DmDevice::m_maxPiston
protected

Member to store the maximum value of the allowed piston.

It have to be defined in the configuration file.

◆ m_maxPistonStep

double Basda::DmDevice::m_maxPistonStep
protected

Member to store the maximum piston step between two successive commands.

It have to be defined in the configuration file.

◆ m_moduleNodes

Nice::JointPtrVector Basda::DmDevice::m_moduleNodes
protected

◆ m_mutex

::Nice::Mutex Basda::DmDevice::m_mutex
private

Mutex to avoid reading and writing at the same time.

◆ m_nonliniearityVector

std::vector<double> Basda::DmDevice::m_nonliniearityVector
protected

Member to store the weight vector for the non-linearities.

It have to be defined in the configuration file.

◆ m_presentActuators

Nice::U32 Basda::DmDevice::m_presentActuators
protected

Member to store the present number of actuators exclusive blanks.

It have to be defined in the configuration file.

◆ m_sensitivityVector

std::vector<double> Basda::DmDevice::m_sensitivityVector
protected

Member to store the sensitivity vector.

It have to be defined in the configuration file.

◆ m_totalActuators

Nice::U32 Basda::DmDevice::m_totalActuators
protected

Member to store the total number of actuators inclusive blanks.

It have to be defined in the configuration file.

◆ m_voltageLimitMax

Nice::U16 Basda::DmDevice::m_voltageLimitMax
protected

This member holds maximum voltage limit for actuators.

The conversion from percental strokes to voltage values and voltage to percental strokes based on this value.

◆ m_voltageLimitMean

Nice::U16 Basda::DmDevice::m_voltageLimitMean
protected

This member holds mean voltage limit for actuators.

The conversion from percental strokes to voltage values and voltage to percental strokes based on this value.

◆ m_voltageLimitMin

Nice::U16 Basda::DmDevice::m_voltageLimitMin
protected

This member holds minimum voltage limit for actuators.

The conversion from percental strokes to voltage values and voltage to percental strokes based on this value.


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