ifw-fcf 7.1.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
MyDeviceConfig Class Reference
Inheritance diagram for MyDeviceConfig:
ifw::fcf::devmgr::common::DeviceConfig ifw::fcf::devmgr::common::DeviceConfig ifw::fcf::devmgr::common::IDeviceConfig ifw::fcf::devmgr::common::IDeviceConfig

Public Types

enum  { CFG_VAL1_MAN = 0 , CFG_VAL1_OPT = 1 }
 
- Public Types inherited from ifw::fcf::devmgr::common::DeviceConfig
enum  NodeIdType { ATTRIB_NODE_ID , RPC_NODE_ID , OBJ_NODE_ID }
 

Public Member Functions

 MyDeviceConfig (const std::string &filename, const std::string &name)
 
void GetConfig (ifw::core::protocol::base::VectorVariant &params) const
 Obtain the list of configuration parameters.
 
 MyDeviceConfig (const std::string filename, const std::string name)
 
void ReadConfig ()
 
void GetConfig (ifw::core::protocol::base::VectorVariant &params) const
 Obtain the list of configuration parameters.
 
std::string GetMapFile () const
 Get name of the device mapping file.
 
- Public Member Functions inherited from ifw::fcf::devmgr::common::DeviceConfig
 DeviceConfig (const std::string &filename, const std::string &name)
 DeviceConfig constructor.
 
 DeviceConfig (const std::string &name)
 DeviceConfig constructor.
 
virtual ~DeviceConfig ()
 DeviceConfig destructor.
 
bool Init ()
 Initialises a device.
 
void InitFromString (std::string config)
 Init the internal configuration from a string.
 
void InitFromFile (const std::string &filename)
 Init the internal configuration from a given file.
 
std::string GetIdentifier () const override
 
std::string GetPrefix () const override
 
std::string GetAddress () const override
 
std::string GetSimAddress () const override
 
std::string GetFitsPrefix () const
 Get Fits Prefix.
 
std::string GetType () const override
 
int GetNamespace () const override
 
std::string GetAlias () const override
 
std::string GetId () const
 
std::string GetOverview () const
 
std::string GetDescription () const
 
std::string GetName () const noexcept override
 
std::string GetLogName () const noexcept
 
std::string GetNodeIdByType (const std::string &attrib, const NodeIdType type=ATTRIB_NODE_ID) const
 Get node id.
 
std::string GetNodeId (const std::string &attrib) const override
 Get node id.
 
std::string GetProcId (const std::string &attrib) const override
 Get procedure id.
 
std::string GetObjId () const override
 Get object id.
 
virtual void GetConfigList (ifw::core::utils::bat::DbVector &cfg_list, std::string prefix) const
 Get configuration list.
 
std::string GetCfgFile () const
 GetCfgFile.
 
std::string GetCfgAsString () const override
 GetCfgAsString.
 
virtual void SetSimulateFlag (const bool flag) override
 Set simulation flag.
 
virtual void SetIgnoreFlag (const bool flag) override
 Set ignore flag.
 
virtual bool GetIgnored () const override
 Get ignored flag.
 
virtual bool GetSimulated () const override
 Get simulated flag.
 
void CheckConfig () const
 Validates the document configuration.
 

Additional Inherited Members

- Protected Member Functions inherited from ifw::fcf::devmgr::common::DeviceConfig
void MergeConfig (const elt::configng::CiiConfigDocument &doc, bool check=true)
 Merges a configuration file.
 
bool GetVariantValue (const elt::configng::CiiConfigInstanceNode node, ifw::core::protocol::base::Variant &value) const
 Obtain the variant value with the correct type.
 
bool IsValidNodeIDFormat (const std::string &node_id_string) const
 IsValidNodeIDFormat.
 
- Protected Attributes inherited from ifw::fcf::devmgr::common::DeviceConfig
std::string m_filename
 filename of device configuration file
 
std::string m_name
 device identifier
 
std::string m_type
 
std::unique_ptr< elt::configng::CiiConfigDocument > m_config_doc
 Internal configuration document object.
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CFG_VAL1_MAN 
CFG_VAL1_OPT 

Constructor & Destructor Documentation

◆ MyDeviceConfig() [1/2]

MyDeviceConfig::MyDeviceConfig ( const std::string & filename,
const std::string & name )
inline

◆ MyDeviceConfig() [2/2]

MyDeviceConfig::MyDeviceConfig ( const std::string filename,
const std::string name )
inline

Member Function Documentation

◆ GetConfig() [1/2]

void MyDeviceConfig::GetConfig ( ifw::core::protocol::base::VectorVariant & params) const
inlinevirtual

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 device with the purpose to write it into the controller. Only attributes that are scalars are considered here.

Warning
: vectors are ignored since they are still not supported in the OPCUA interface
Exceptions
runtimeerror in case of bad casting.

Reimplemented from ifw::fcf::devmgr::common::DeviceConfig.

◆ GetConfig() [2/2]

void MyDeviceConfig::GetConfig ( ifw::core::protocol::base::VectorVariant & params) const
inlinevirtual

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 device with the purpose to write it into the controller. Only attributes that are scalars are considered here.

Warning
: vectors are ignored since they are still not supported in the OPCUA interface
Exceptions
runtimeerror in case of bad casting.

Reimplemented from ifw::fcf::devmgr::common::DeviceConfig.

◆ GetMapFile()

std::string MyDeviceConfig::GetMapFile ( ) const
inlinevirtual

Get name of the device mapping file.

Returns

Reimplemented from ifw::fcf::devmgr::common::DeviceConfig.

◆ ReadConfig()

void MyDeviceConfig::ReadConfig ( )
inline

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