|
ifw-fcf
3.0.0
|
Motor Configuration class. More...
#include <motorConfig.hpp>
Public Member Functions | |
| MotorConfig (const std::string filename, const std::string name) | |
| MotorConfig constructor. More... | |
| MotorConfig (const std::string name) | |
| MotorConfig constructor. More... | |
| virtual | ~MotorConfig () |
| MotorConfig destructor. More... | |
| void | InitConfig () |
| Define configuration parameters for motor device. More... | |
| virtual void | ReadConfig () |
| Read the configuration. More... | |
| virtual void | GetConfig (fcf::common::VectorVariant ¶ms) |
| Obtain the list of configuration parameters. More... | |
| 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 fcf::devmgr::common::DeviceConfig | |
| DeviceConfig (const std::string &filename, const std::string &name) | |
| DeviceConfig constructor. More... | |
| DeviceConfig (const std::string &name) | |
| DeviceConfig constructor. More... | |
| virtual | ~DeviceConfig () |
| DeviceConfig destructor. More... | |
| bool | Init () |
| Initialises a device. More... | |
| void | InitFromString (std::string config) |
| Init the internal configuration from a string. More... | |
| void | InitFromFile (const std::string &filename) |
| Init the internal configuration from a given file. More... | |
| void | CheckConfig () |
| Verify Configuration Data. 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... | |
| std::string | GetCfgAsString () |
| GetCfgAsString. 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... | |
| virtual std::string | GetMapFile () |
| Get name of the device mapping file. More... | |
Protected Attributes | |
| std::unordered_map< int, InitAction > | m_init_sequence_map |
Protected Attributes inherited from fcf::devmgr::common::DeviceConfig | |
| MapCfgBool | m_map_cfg_bool |
| MapCfgShort | m_map_cfg_short |
| MapCfgInt | m_map_cfg_int |
| MapCfgUInt | m_map_cfg_uint |
| MapCfgDouble | m_map_cfg_double |
| std::string | m_filename |
| filename of device configuration file More... | |
| std::string | m_name |
| device identifier More... | |
| YAML::Node | m_config_node |
| 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 |
Friends | |
| class | Sensor |
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.
| anonymous enum |
| fcf::devmgr::motor::MotorConfig::MotorConfig | ( | const std::string | filename, |
| const std::string | name | ||
| ) |
MotorConfig constructor.
| [in] | filename | Filename of the device configuration file. |
| [in] | name | Device identifier. |
| fcf::devmgr::motor::MotorConfig::MotorConfig | ( | const std::string | name | ) |
MotorConfig constructor.
| [in] | name | Device identifier. |
|
virtual |
MotorConfig destructor.
| bool fcf::devmgr::motor::MotorConfig::FindNamedPositionValue | ( | const double | position, |
| std::string & | name | ||
| ) |
Find value associated to a named position in UU.
| [in] | position | in UU |
| [in,out] | name | Name as string |
| bool fcf::devmgr::motor::MotorConfig::FindNamedPositionValue | ( | const std::string | named_pos, |
| double & | position | ||
| ) |
Find value associated to a named position.
| named_pos | position name |
| position | position value in UU |
|
virtual |
Obtain the list of configuration parameters.
| [in,out] | params | output 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.
Reimplemented from fcf::devmgr::common::DeviceConfig.
Reimplemented in testMotorConfig::MyDeviceConfig, testMotor::MyDeviceConfig, testDrotConfig::MyDeviceConfig, and testDrot::MyDeviceConfig.
|
virtual |
Get configuration list.
| cfg_list | List of all configuration parameters. |
| prefix | Prefix 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 fcf::devmgr::common::DeviceConfig.
| const std::string fcf::devmgr::motor::MotorConfig::GetNamedPosition | ( | const int | index | ) |
GetNamedPosition.
| index |
| const double fcf::devmgr::motor::MotorConfig::GetNamedPositionValue | ( | const std::string | named_pos | ) |
GetNamedPositionValue.
| named_pos |
| double fcf::devmgr::motor::MotorConfig::GetNpTolerance | ( | ) | const |
Get named position tolerance.
| int fcf::devmgr::motor::MotorConfig::GetNumberOfNamedPositions | ( | ) |
| double fcf::devmgr::motor::MotorConfig::GetScaleFactor | ( | ) | const |
| double fcf::devmgr::motor::MotorConfig::GetVelocity | ( | ) |
| void fcf::devmgr::motor::MotorConfig::InitConfig | ( | ) |
Define configuration parameters for motor device.
|
virtual |
Read the configuration.
This reads the shutter configuration attributes in memory and check the presence of all attributes that are mandatory.
| std::runtime_error | in case of an error |
Reimplemented from fcf::devmgr::common::DeviceConfig.
Reimplemented in testMotorConfig::MyDeviceConfig, testMotor::MyDeviceConfig, testDrotConfig::MyDeviceConfig, and testDrot::MyDeviceConfig.
| void fcf::devmgr::motor::MotorConfig::SetScaleFactor | ( | double | scale | ) |
Set Scale Factor.
| scale |
|
friend |
|
protected |