ifw-fcf 7.1.4
|
Public Member Functions | |
MyDeviceLcsIf (std::shared_ptr< testDeviceLcsIf::MyDeviceConfig > config, ifw::fcf::devmgr::common::DataContext &data_ctx) | |
void | ReadConfig () |
bool | IsReady () |
bool | IsOperational () |
bool | IsHwFailure () |
void | StartMonitoring () |
Start monitoring of controller attributes. | |
void | StopMonitoring () |
Stop monitoring of controller attributes. | |
std::string | GetRpcError (short error_code) const |
Get associated message from the RPC error code. | |
std::string | GetHwError (int &error_code, const bool update=false) |
Get error message. | |
![]() | |
DeviceLcsIf (std::shared_ptr< IDeviceConfig > config, DataContext &data_ctx) | |
DeviceLcsIf constructor. | |
virtual void | InitObject () |
Initialize object. | |
virtual void | RegisterComm (std::shared_ptr< ifw::core::protocol::base::IComm > comm_if, ifw::core::protocol::base::Dispatcher<> &failure, ifw::core::protocol::base::Dispatcher<> &normal) |
Register a communication interface. | |
virtual void | Connect () |
Connect to the controller or simulator. | |
virtual void | Disconnect () |
Disconnect from the controller of simulator. | |
virtual bool | IsNotReady () const |
Check if controller is in Standby/NotReady state. | |
virtual bool | IsReady () const |
Check if controller is in Standby/Ready state. | |
virtual bool | IsDisabling () const |
Check if controller is in Disabling state. | |
virtual bool | IsOperational () const |
Check if controller is in Operational. | |
virtual bool | IsHwFailure () const |
Check if controller is in Hardware Failure. | |
virtual void | Init () |
Executes the Init RPC. | |
virtual void | Enable () |
Executes the Enable RPC. | |
virtual void | Disable () |
Executes the Disable RPC. | |
virtual void | Stop () |
Executes the Stop RPC. | |
virtual void | Reset () |
Executes the Reset RPC. | |
virtual void | ReadStatus (DeviceControllerData &status) |
ReadStatus. | |
virtual void | Listener (ifw::core::protocol::base::VectorVariant ¶ms) |
Callback for listening controller events. | |
std::string | GetMapValue (const std::string &category, const std::string &key) const |
Get mapping value. | |
ifw::core::protocol::base::Dispatcher< ifw::core::protocol::base::VectorVariant & > & | GetDispatcher () |
bool | IsConfigLoaded () const |
Check if configuration was loaded. | |
bool | IsConnected () const |
Check is the communication was established. | |
virtual std::shared_ptr< IDeviceConfig > | GetDeviceConfig () const |
Get a pointer of device configuration. | |
const elt::configng::CiiConfigInstanceNamespace & | GetCfgInstance () const |
virtual void | GetStates (int &state, int &substate) |
Get states (state and substate) of the controller. | |
Additional Inherited Members | |
![]() | |
enum | { STAT_LOCAL = 1 , STAT_ERROR = 2 , STAT_HW_STATUS = 3 , STAT_STATE = 4 , STAT_SUBSTATE = 5 } |
![]() | |
void | LoadConfig () |
Load the YAML configuration. | |
void | ExecuteRpc (const std::string &obj, const std::string &proc, ifw::core::protocol::base::VectorVariant &attr_list) |
int | ReadErrorCode () |
void | StoreUaNames (const std::vector< std::pair< std::string, unsigned int > > &ualist) |
StoreUaNames. | |
void | StoreAttribute (const std::string &key, const ifw::core::protocol::base::Variant &value, int attribute) |
Store the updated into the DB. | |
void | SetConfigLoad (bool flag) |
![]() | |
std::shared_ptr< IDeviceConfig > | m_config |
Shared pointer to the device config object. | |
std::unique_ptr< elt::configng::CiiConfigDocument > | m_config_doc |
Config document for mapping file. | |
std::string | m_lcs_prefix |
Store the prefix for storing keys in the database. | |
std::shared_ptr< ifw::core::protocol::base::IComm > | m_comm |
Shared pointer to the communication object. | |
ifw::core::protocol::base::Dispatcher< ifw::core::protocol::base::VectorVariant & > | m_dispatcher |
Dispatcher for managing subscription events. | |
ifw::core::protocol::base::Dispatcher | m_failure |
Dispatcher for managing failures in the communication. | |
ifw::core::protocol::base::Dispatcher | m_normal |
Dispatcher for managing recovery of communication failures. | |
int | m_state {} |
Actual controller state. | |
int | m_substate {} |
Actual controller substate. | |
bool | m_local {false} |
Actual local flag. | |
bool | m_error_code {false} |
Actual error code. | |
bool | m_config_loaded {false} |
Flag indicating whether the configuration was successfully loaded. | |
bool | m_connected {false} |
Flag indicating whether the LCS is connected. | |
ifw::fcf::devmgr::common::DataContext & | m_data_ctx |
std::unordered_map< std::string, short > | m_ua_status_map |
std::vector< std::string > | m_ua_monitor_vector |
std::unordered_map< short, std::string > | m_hw_errors |
|
inlineexplicit |
|
inlinevirtual |
Get error message.
error_code | Input error code |
update | Flag that indicate to read the error code. |
This methods does a read to the PLC to obtain the error code.
Reimplemented from ifw::fcf::devmgr::common::DeviceLcsIf.
|
inlinevirtual |
Get associated message from the RPC error code.
[in] | error_code |
Implements ifw::fcf::devmgr::common::DeviceLcsIf.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Start monitoring of controller attributes.
an | exception if an error ocurrs. |
This methods take cares of registering the attributes that will be monitored by the communication class. Most of the communication will be OPCUA and this monitoring means OPCUA subscription.
Reimplemented from ifw::fcf::devmgr::common::DeviceLcsIf.
|
inlinevirtual |
Stop monitoring of controller attributes.
an | exception if an error ocurrs. |
This method will inform the communication interface to stop monitoring the shutter attributes. All OPCUA subscriptions will be removed.
Reimplemented from ifw::fcf::devmgr::common::DeviceLcsIf.