ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
devmgr::motor::MotorConfig Class Reference

Motor Configuration class. More...

#include <motorConfig.hpp>

Inheritance diagram for devmgr::motor::MotorConfig:
devmgr::common::DeviceConfig devmgr::common::DeviceConfig devmgr::common::DeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig devmgr::common::IDeviceConfig testMotor::MyDeviceConfig testMotorConfig::MyDeviceConfig testMotorLcsIf::TestMotorConfig

Public Member Functions

 MotorConfig (const std::string filename, const std::string name)
 MotorConfig constructor. More...
 
virtual ~MotorConfig ()
 MotorConfig destructor. More...
 
virtual void ReadConfig ()
 Read the configuration. More...
 
virtual void GetConfig (fcf::common::VectorVariant &params)
 Obtain the list of configuration parameters. More...
 
virtual std::string GetMapFile ()
 
virtual void GetConfigList (std::vector< std::string > &cfg_list, std::string prefix)
 Get configuration list. More...
 
int GetNumberOfNamedPositions ()
 
double GetVelocity ()
 
void SetScaleFactor (double scale)
 Set Scale Factor. More...
 
double GetScaleFactor () const
 
const std::string GetNamedPosition (const int index)
 GetNamedPosition. More...
 
const double GetNamedPositionValue (const std::string named_pos)
 GetNamedPositionValue. More...
 
bool FindNamedPositionValue (const std::string named_pos, double &position)
 Find value associated to a named position. More...
 
bool FindNamedPositionValue (const double position, std::string &name)
 Find value associated to a named position in UU. More...
 
double GetNpTolerance () const
 Get named position tolerance. More...
 
 MotorConfig (const std::string filename, const std::string name)
 MotorConfig constructor. More...
 
virtual ~MotorConfig ()
 MotorConfig destructor. More...
 
virtual void ReadConfig ()
 Read the configuration. More...
 
virtual void GetConfig (fcf::common::VectorVariant &params)
 Obtain the list of configuration parameters. More...
 
virtual std::string GetMapFile ()
 
virtual void GetConfigList (std::vector< std::string > &cfg_list, std::string prefix)
 Get configuration list. More...
 
int GetNumberOfNamedPositions ()
 
double GetVelocity ()
 
void SetScaleFactor (double scale)
 Set Scale Factor. More...
 
double GetScaleFactor () const
 
const std::string GetNamedPosition (const int index)
 GetNamedPosition. More...
 
const double GetNamedPositionValue (const std::string named_pos)
 GetNamedPositionValue. More...
 
bool FindNamedPositionValue (const std::string named_pos, double &position)
 Find value associated to a named position. More...
 
bool FindNamedPositionValue (const double position, std::string &name)
 Find value associated to a named position in UU. More...
 
double GetNpTolerance () const
 Get named position tolerance. More...
 
 MotorConfig (const std::string filename, const std::string name)
 MotorConfig constructor. More...
 
virtual ~MotorConfig ()
 MotorConfig destructor. More...
 
virtual void ReadConfig ()
 Read the configuration. More...
 
virtual void GetConfig (fcf::common::VectorVariant &params)
 Obtain the list of configuration parameters. More...
 
virtual std::string GetMapFile ()
 
virtual void GetConfigList (std::vector< std::string > &cfg_list, std::string prefix)
 Get configuration list. More...
 
int GetNumberOfNamedPositions ()
 
double GetVelocity ()
 
void SetScaleFactor (double scale)
 Set Scale Factor. More...
 
double GetScaleFactor () const
 
const std::string GetNamedPosition (const int index)
 GetNamedPosition. More...
 
const double GetNamedPositionValue (const std::string named_pos)
 GetNamedPositionValue. More...
 
bool FindNamedPositionValue (const std::string named_pos, double &position)
 Find value associated to a named position. More...
 
bool FindNamedPositionValue (const double position, std::string &name)
 Find value associated to a named position in UU. More...
 
double GetNpTolerance () const
 Get named position tolerance. More...
 
- Public Member Functions inherited from devmgr::common::DeviceConfig
 DeviceConfig (const std::string &filename, const std::string &name)
 DeviceConfig constructor. More...
 
virtual ~DeviceConfig ()
 DeviceConfig destructor. More...
 
virtual bool Init ()
 Initialises a device. More...
 
std::string GetIdentifier ()
 
std::string GetPrefix ()
 
std::string GetAddress ()
 
std::string GetSimAddress ()
 
std::string GetFitsPrefix ()
 Get Fits Prefix. More...
 
std::string GetType ()
 
int GetNamespace ()
 
std::string GetAlias ()
 
std::string GetName ()
 
std::string GetNodeId (const std::string &attrib)
 Get node id. More...
 
std::string GetProcId (const std::string &attrib)
 Get procedure id. More...
 
std::string GetObjId ()
 Get object id. More...
 
std::string GetCfgFile ()
 GetCfgFile. More...
 
virtual void SetSimulateFlag (bool flag)
 Set simulation flag. More...
 
virtual void SetIgnoreFlag (bool flag)
 Set ignore flag. More...
 
virtual bool GetIgnored ()
 Get ignored flag. More...
 
virtual bool GetSimulated ()
 Get simulated flag. More...
 
 DeviceConfig (const std::string &filename, const std::string &name)
 DeviceConfig constructor. More...
 
virtual ~DeviceConfig ()
 DeviceConfig destructor. More...
 
virtual bool Init ()
 Initialises a device. More...
 
std::string GetIdentifier ()
 
std::string GetPrefix ()
 
std::string GetAddress ()
 
std::string GetSimAddress ()
 
std::string GetFitsPrefix ()
 Get Fits Prefix. More...
 
std::string GetType ()
 
int GetNamespace ()
 
std::string GetAlias ()
 
std::string GetName ()
 
std::string GetNodeId (const std::string &attrib)
 Get node id. More...
 
std::string GetProcId (const std::string &attrib)
 Get procedure id. More...
 
std::string GetObjId ()
 Get object id. More...
 
std::string GetCfgFile ()
 GetCfgFile. More...
 
virtual void SetSimulateFlag (bool flag)
 Set simulation flag. More...
 
virtual void SetIgnoreFlag (bool flag)
 Set ignore flag. More...
 
virtual bool GetIgnored ()
 Get ignored flag. More...
 
virtual bool GetSimulated ()
 Get simulated flag. More...
 
 DeviceConfig (const std::string &filename, const std::string &name)
 DeviceConfig constructor. More...
 
virtual ~DeviceConfig ()
 DeviceConfig destructor. More...
 
virtual bool Init ()
 Initialises a device. More...
 
std::string GetIdentifier ()
 
std::string GetPrefix ()
 
std::string GetAddress ()
 
std::string GetSimAddress ()
 
std::string GetFitsPrefix ()
 Get Fits Prefix. More...
 
std::string GetType ()
 
int GetNamespace ()
 
std::string GetAlias ()
 
std::string GetName ()
 
std::string GetNodeId (const std::string &attrib)
 Get node id. More...
 
std::string GetProcId (const std::string &attrib)
 Get procedure id. More...
 
std::string GetObjId ()
 Get object id. More...
 
std::string GetCfgFile ()
 GetCfgFile. More...
 
virtual void SetSimulateFlag (bool flag)
 Set simulation flag. More...
 
virtual void SetIgnoreFlag (bool flag)
 Set ignore flag. More...
 
virtual bool GetIgnored ()
 Get ignored flag. More...
 
virtual bool GetSimulated ()
 Get simulated flag. More...
 

Friends

class Sensor
 

Additional Inherited Members

- Protected Attributes inherited from devmgr::common::DeviceConfig
std::string m_filename
 filename of device configuration file More...
 
std::string m_name
 device identifier More...
 
YAML::Node m_configNode
 YAML node object for configuration file. More...
 
std::string m_identifier
 Address space identifier. More...
 
std::string m_type
 Device type. More...
 
std::string m_fits_prefix
 
bool m_simulated
 
bool m_ignored
 
std::string m_lcs_prefix
 
std::string m_address
 
std::string m_sim_address
 
std::string m_map_file
 
std::string m_alias
 
int m_lcs_namespace
 

Detailed Description

Motor Configuration class.

This class manages the configuration of a motor. It reads the configuration file and provides the methods to obtain the parameters used by the auxiliary classes.

Constructor & Destructor Documentation

devmgr::motor::MotorConfig::MotorConfig ( const std::string  filename,
const std::string  name 
)

MotorConfig constructor.

Parameters
[in]filenameFilename of the device configuration file.
[in]nameDevice identifier.
[in]data_ctxReference to data context object.
devmgr::motor::MotorConfig::~MotorConfig ( )
virtual

MotorConfig destructor.

devmgr::motor::MotorConfig::MotorConfig ( const std::string  filename,
const std::string  name 
)

MotorConfig constructor.

Parameters
[in]filenameFilename of the device configuration file.
[in]nameDevice identifier.
[in]data_ctxReference to data context object.
virtual devmgr::motor::MotorConfig::~MotorConfig ( )
virtual

MotorConfig destructor.

devmgr::motor::MotorConfig::MotorConfig ( const std::string  filename,
const std::string  name 
)

MotorConfig constructor.

Parameters
[in]filenameFilename of the device configuration file.
[in]nameDevice identifier.
[in]data_ctxReference to data context object.
virtual devmgr::motor::MotorConfig::~MotorConfig ( )
virtual

MotorConfig destructor.

Member Function Documentation

bool devmgr::motor::MotorConfig::FindNamedPositionValue ( const std::string  named_pos,
double &  position 
)

Find value associated to a named position.

Parameters
named_posposition name
positionposition value in UU
Returns
true when position was found in the map, false otherwise.
bool devmgr::motor::MotorConfig::FindNamedPositionValue ( const std::string  named_pos,
double &  position 
)

Find value associated to a named position.

Parameters
named_posposition name
positionposition value in UU
Returns
true when position was found in the map, false otherwise.
bool devmgr::motor::MotorConfig::FindNamedPositionValue ( const std::string  named_pos,
double &  position 
)

Find value associated to a named position.

Parameters
named_posposition name
positionposition value in UU
Returns
true when position was found in the map, false otherwise.
bool devmgr::motor::MotorConfig::FindNamedPositionValue ( const double  position,
std::string &  name 
)

Find value associated to a named position in UU.

Parameters
[in]positionin UU
[in,out]positionname as string
Returns
true when position was found in the map, false otherwise.
bool devmgr::motor::MotorConfig::FindNamedPositionValue ( const double  position,
std::string &  name 
)

Find value associated to a named position in UU.

Parameters
[in]positionin UU
[in,out]positionname as string
Returns
true when position was found in the map, false otherwise.
bool devmgr::motor::MotorConfig::FindNamedPositionValue ( const double  position,
std::string &  name 
)

Find value associated to a named position in UU.

Parameters
[in]positionin UU
[in,out]positionname as string
Returns
true when position was found in the map, false otherwise.
void devmgr::motor::MotorConfig::GetConfig ( fcf::common::VectorVariant &  params)
virtual

Obtain the list of configuration parameters.

Parameters
[in,out]paramsoutput vector with the list of config parameters

This methods prepare a vector with all the configuration parameters of a motor with the purpose to write it into the controller or just to keep it in memory.

Implements devmgr::common::IDeviceConfig.

Reimplemented in testMotor::MyDeviceConfig, and testMotorConfig::MyDeviceConfig.

virtual void devmgr::motor::MotorConfig::GetConfig ( fcf::common::VectorVariant &  params)
virtual

Obtain the list of configuration parameters.

Parameters
[in,out]paramsoutput vector with the list of config parameters

This methods prepare a vector with all the configuration parameters of a motor with the purpose to write it into the controller or just to keep it in memory.

Implements devmgr::common::IDeviceConfig.

Reimplemented in testMotor::MyDeviceConfig, and testMotorConfig::MyDeviceConfig.

virtual void devmgr::motor::MotorConfig::GetConfig ( fcf::common::VectorVariant &  params)
virtual

Obtain the list of configuration parameters.

Parameters
[in,out]paramsoutput vector with the list of config parameters

This methods prepare a vector with all the configuration parameters of a motor with the purpose to write it into the controller or just to keep it in memory.

Implements devmgr::common::IDeviceConfig.

Reimplemented in testMotor::MyDeviceConfig, and testMotorConfig::MyDeviceConfig.

virtual void devmgr::motor::MotorConfig::GetConfigList ( std::vector< std::string > &  cfg_list,
std::string  prefix 
)
virtual

Get configuration list.

Parameters
cfg_listList of all configuration parameters.
prefixPrefix to be added to the attributes names.

This method returs the complete of configuration parameters handled by this class. This method is used to dump the list into the DB.

Reimplemented from devmgr::common::DeviceConfig.

void devmgr::motor::MotorConfig::GetConfigList ( std::vector< std::string > &  cfg_list,
std::string  prefix 
)
virtual

Get configuration list.

Parameters
cfg_listList of all configuration parameters.
prefixPrefix to be added to the attributes names.

This method returs the complete of configuration parameters handled by this class. This method is used to dump the list into the DB.

Reimplemented from devmgr::common::DeviceConfig.

virtual void devmgr::motor::MotorConfig::GetConfigList ( std::vector< std::string > &  cfg_list,
std::string  prefix 
)
virtual

Get configuration list.

Parameters
cfg_listList of all configuration parameters.
prefixPrefix to be added to the attributes names.

This method returs the complete of configuration parameters handled by this class. This method is used to dump the list into the DB.

Reimplemented from devmgr::common::DeviceConfig.

virtual std::string devmgr::motor::MotorConfig::GetMapFile ( )
virtual
std::string devmgr::motor::MotorConfig::GetMapFile ( )
virtual
virtual std::string devmgr::motor::MotorConfig::GetMapFile ( )
virtual
const std::string devmgr::motor::MotorConfig::GetNamedPosition ( const int  index)

GetNamedPosition.

Parameters
index
Returns
const std::string devmgr::motor::MotorConfig::GetNamedPosition ( const int  index)

GetNamedPosition.

Parameters
index
Returns
const std::string devmgr::motor::MotorConfig::GetNamedPosition ( const int  index)

GetNamedPosition.

Parameters
index
Returns
const double devmgr::motor::MotorConfig::GetNamedPositionValue ( const std::string  named_pos)

GetNamedPositionValue.

Parameters
named_pos
Returns
const double devmgr::motor::MotorConfig::GetNamedPositionValue ( const std::string  named_pos)

GetNamedPositionValue.

Parameters
named_pos
Returns
const double devmgr::motor::MotorConfig::GetNamedPositionValue ( const std::string  named_pos)

GetNamedPositionValue.

Parameters
named_pos
Returns
double devmgr::motor::MotorConfig::GetNpTolerance ( ) const

Get named position tolerance.

double devmgr::motor::MotorConfig::GetNpTolerance ( ) const

Get named position tolerance.

double devmgr::motor::MotorConfig::GetNpTolerance ( ) const

Get named position tolerance.

int devmgr::motor::MotorConfig::GetNumberOfNamedPositions ( )
Returns
Number of named positions
int devmgr::motor::MotorConfig::GetNumberOfNamedPositions ( )
Returns
Number of named positions
int devmgr::motor::MotorConfig::GetNumberOfNamedPositions ( )
Returns
Number of named positions
double devmgr::motor::MotorConfig::GetScaleFactor ( ) const
Returns
Scale factor
double devmgr::motor::MotorConfig::GetScaleFactor ( ) const
Returns
Scale factor
double devmgr::motor::MotorConfig::GetScaleFactor ( ) const
Returns
Scale factor
double devmgr::motor::MotorConfig::GetVelocity ( )
Returns
actual velocity
double devmgr::motor::MotorConfig::GetVelocity ( )
Returns
actual velocity
double devmgr::motor::MotorConfig::GetVelocity ( )
Returns
actual velocity
void devmgr::motor::MotorConfig::ReadConfig ( )
virtual

Read the configuration.

This reads the shutter configuration attributes in memory and check the presence of all attributes that are mandatory.

Exceptions
std::runtime_errorin case of an error

Implements devmgr::common::IDeviceConfig.

Reimplemented in testMotor::MyDeviceConfig, and testMotorConfig::MyDeviceConfig.

virtual void devmgr::motor::MotorConfig::ReadConfig ( )
virtual

Read the configuration.

This reads the shutter configuration attributes in memory and check the presence of all attributes that are mandatory.

Exceptions
std::runtime_errorin case of an error

Implements devmgr::common::IDeviceConfig.

Reimplemented in testMotor::MyDeviceConfig, and testMotorConfig::MyDeviceConfig.

virtual void devmgr::motor::MotorConfig::ReadConfig ( )
virtual

Read the configuration.

This reads the shutter configuration attributes in memory and check the presence of all attributes that are mandatory.

Exceptions
std::runtime_errorin case of an error

Implements devmgr::common::IDeviceConfig.

Reimplemented in testMotor::MyDeviceConfig, and testMotorConfig::MyDeviceConfig.

void devmgr::motor::MotorConfig::SetScaleFactor ( double  scale)

Set Scale Factor.

Parameters
scale
void devmgr::motor::MotorConfig::SetScaleFactor ( double  scale)

Set Scale Factor.

Parameters
scale
void devmgr::motor::MotorConfig::SetScaleFactor ( double  scale)

Set Scale Factor.

Parameters
scale

Friends And Related Function Documentation

Sensor
friend

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