ifw-fcf
5.0.0-pre2
|
Public Member Functions | |
MyDeviceLcsIf (std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config, fcf::devmgr::common::DataContext &data_ctx) | |
void | Init () |
Executes the Init RPC. More... | |
void | Enable () |
Executes the Enable RPC. More... | |
void | Disable () |
Executes the Disable RPC. More... | |
void | ReadConfig () |
bool | IsReady () |
bool | IsNotReady () |
bool | IsOperational () |
bool | IsFailure () |
bool | IsHwFailure () |
std::string | GetHwError (int &error_code, const bool update=false) |
Get error message. More... | |
void | StartMonitoring () |
Start monitoring of controller attributes. More... | |
void | StopMonitoring () |
Stop monitoring of controller attributes. More... | |
void | Listener (protocol::base::VectorVariant ¶ms) |
Callback for listening controller events. More... | |
std::string | GetRpcError (short error_code) const |
Get associated message from the RPC error code. More... | |
std::string | GetError () |
![]() | |
DeviceLcsIf (std::shared_ptr< IDeviceConfig > config, DataContext &data_ctx) | |
DeviceLcsIf constructor. More... | |
virtual void | InitObject () |
Initialize object. More... | |
virtual void | RegisterComm (std::shared_ptr< protocol::base::IComm > comm_if, protocol::base::Dispatcher<> &failure, protocol::base::Dispatcher<> &normal) |
Register a communication interface. More... | |
virtual void | Connect () |
Connect to the controller or simulator. More... | |
virtual void | Disconnect () |
Disconnect from the controller of simulator. More... | |
virtual bool | IsNotReady () const |
Check if controller is in Standby/NotReady state. More... | |
virtual bool | IsReady () const |
Check if controller is in Standby/Ready state. More... | |
virtual bool | IsDisabling () const |
Check if controller is in Disabling state. More... | |
virtual bool | IsOperational () const |
Check if controller is in Operational. More... | |
virtual bool | IsHwFailure () const |
Check if controller is in Hardware Failure. More... | |
virtual void | Stop () |
Executes the Stop RPC. More... | |
virtual void | Reset () |
Executes the Reset RPC. More... | |
virtual void | ReadStatus (DeviceControllerData &status) |
ReadStatus. More... | |
std::string | GetMapValue (const std::string &category, const std::string &key) const |
Get mapping value. More... | |
protocol::base::Dispatcher< protocol::base::VectorVariant & > & | GetDispatcher () |
bool | IsConfigLoaded () const |
Check if configuration was loaded. More... | |
bool | IsConnected () const |
Check is the communication was established. More... | |
virtual std::shared_ptr< IDeviceConfig > | GetDeviceConfig () const |
Get a pointer of device configuration. More... | |
const elt::configng::CiiConfigInstanceNamespace & | GetCfgInstance () const |
virtual void | GetStates (int &state, int &substate) |
Get states (state and substate) of the controller. More... | |
Public Attributes | |
bool | m_ready |
bool | m_not_ready |
bool | m_operational |
bool | m_is_disabling |
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. More... | |
void | ExecuteRpc (const std::string &obj, const std::string &proc, protocol::base::VectorVariant &attr_list) |
int | ReadErrorCode () |
void | StoreUaNames (const std::vector< std::pair< std::string, unsigned int >> &ualist) |
StoreUaNames. More... | |
void | StoreAttribute (const std::string key, const protocol::base::Variant &value, int attribute) |
Store the updated into the DB. More... | |
![]() | |
std::unique_ptr< elt::configng::CiiConfigDocument > | m_config_doc |
Config document for mapping file. More... | |
std::shared_ptr< protocol::base::IComm > | m_comm |
Shared pointer to the communication object. More... | |
std::shared_ptr< IDeviceConfig > | m_config |
Shared pointer to the device config object. More... | |
protocol::base::Dispatcher< protocol::base::VectorVariant & > | m_dispatcher |
Dispatcher for managing subscription events. More... | |
protocol::base::Dispatcher | m_failure |
Dispatcher for managing failures in the communication. More... | |
protocol::base::Dispatcher | m_normal |
Dispatcher for managing recovery of communication failures. More... | |
int | m_state {} |
Actual controller state. More... | |
int | m_substate {} |
Actual controller substate. More... | |
bool | m_local {false} |
Actual local flag. More... | |
bool | m_error_code {false} |
Actual error code. More... | |
bool | m_config_loaded {false} |
Flag indicating whether the configuration was successfully loaded. More... | |
bool | m_connected {false} |
Flag indicating whether the LCS is connected. More... | |
fcf::devmgr::common::DataContext & | m_data_ctx |
std::string | m_lcs_prefix |
Store the prefix for storing keys in the database. More... | |
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 |
|
inline |
|
inlinevirtual |
Executes the Disable RPC.
an | exception if an error ocurrs. |
This RPC call shall bring the controller to Standby/Ready state.
Reimplemented from fcf::devmgr::common::DeviceLcsIf.
|
inlinevirtual |
Executes the Enable RPC.
an | exception if an error ocurrs. |
This RPC call shall bring the controller to Operational state.
Reimplemented from fcf::devmgr::common::DeviceLcsIf.
|
inline |
|
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 fcf::devmgr::common::DeviceLcsIf.
|
inlinevirtual |
Get associated message from the RPC error code.
[in] | error_code |
Implements fcf::devmgr::common::DeviceLcsIf.
|
inlinevirtual |
Executes the Init RPC.
an | exception if an error ocurrs. |
Reimplemented from fcf::devmgr::common::DeviceLcsIf.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Callback for listening controller events.
params | list of paramaters to be monitored. |
Abstract method to be implemented by specific classes.
Reimplemented from fcf::devmgr::common::DeviceLcsIf.
|
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 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 fcf::devmgr::common::DeviceLcsIf.
bool testDeviceFacade::MyDeviceLcsIf::m_is_disabling |
bool testDeviceFacade::MyDeviceLcsIf::m_not_ready |
bool testDeviceFacade::MyDeviceLcsIf::m_operational |
bool testDeviceFacade::MyDeviceLcsIf::m_ready |