|
| | LampLcsIf (std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config, fcf::devmgr::common::DataContext &data_ctx, bool initialise=true) |
| | LampLcsIf constructor. More...
|
| |
| virtual | ~LampLcsIf () |
| | Default destructor. More...
|
| |
| virtual bool | IsReady () |
| | Check if controller is in Standby/Ready state. More...
|
| |
| virtual bool | IsOperational () |
| | Check if controller is in Operational. More...
|
| |
| void | SwitchOn (double intensity, unsigned int time) |
| | Executes the SwitchOn RPC. More...
|
| |
| void | SwitchOff () |
| | Executes the SwitchOff RPC. More...
|
| |
| bool | IsTurningOn () |
| | Check if controller is switching the lamp on. More...
|
| |
| bool | IsTurningOff () |
| | Check if controller is switching the lamp off. More...
|
| |
| bool | IsOn () |
| | Check if lamp is on. More...
|
| |
| bool | IsOff () |
| | Check if lamp is off. More...
|
| |
| virtual void | ReadStatus (LampControllerData &status, bool force_read=true) |
| | Read status from the controller. More...
|
| |
| void | Listener (fcf::common::VectorVariant ¶ms) |
| | Callback to manageUpdateStatus(); changes on the monitored items. More...
|
| |
| virtual std::string | GetRpcError (const short error_code) const |
| |
| | DeviceLcsIf (std::shared_ptr< IDeviceConfig > config, DataContext &data_ctx) |
| | DeviceLcsIf constructor. More...
|
| |
| virtual void | RegisterComm (std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::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 void | ReadConfig (const std::vector< std::string > &stat_map_vector, const std::vector< std::string > &rpc_map_vector) |
| | Read the configuration. More...
|
| |
| virtual bool | IsNotReady () |
| | Check if controller is in Standby/NotReady state. More...
|
| |
| virtual bool | IsDisabling () |
| | Check if controller is in Disabling state. More...
|
| |
| virtual bool | IsHwFailure () |
| | Check if controller is in Hardware Failure. More...
|
| |
| virtual void | Init () |
| | Executes the Init RPC. More...
|
| |
| virtual void | Enable () |
| | Executes the Enable RPC. More...
|
| |
| virtual void | Disable () |
| | Executes the Disable RPC. More...
|
| |
| virtual void | Stop () |
| | Executes the Stop RPC. More...
|
| |
| virtual void | Reset () |
| | Executes the Reset RPC. More...
|
| |
| virtual void | StartMonitoring () |
| | Start monitoring of controller attributes. More...
|
| |
| virtual void | StopMonitoring () |
| | Stop monitoring of controller attributes. More...
|
| |
| virtual std::string | GetHwError (int &error_code, const bool update=false) |
| | Get error message. More...
|
| |
| std::string | GetMapValue (std::string category, std::string key) |
| | Get mapping valLampConfigue. More...
|
| |
| fcf::common::Dispatcher< fcf::common::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 () |
| | Get a pointer of device configuration. More...
|
| |
|
| 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, fcf::common::VectorVariant &attr_list) |
| |
| int | ReadErrorCode () |
| |
| void | GetStates (int &state, int &substate) |
| | Get states (state and substate) of the controller. More...
|
| |
| void | StoreUaNames (const std::vector< std::pair< std::string, unsigned int >> &ualist) |
| | StoreUaNames. More...
|
| |
| void | StoreAttribute (const std::string key, const fcf::common::Variant &value, int attribute) |
| | Store the updated into the DB. More...
|
| |
template<typename TOPIC_TYPE = fcfif::LampTopicUnion>
class fcf::devmgr::lamp::LampLcsIf< TOPIC_TYPE >
Lamp Local Control System (LCS) Interface (IF) class.
This class manages the lamp connection to the LCS encapsulating all basic communication with the controller or the simulator.
Each RPC call is synchronous but it only starts the action in the controller. The controller will return successfully if the action can be started, not that the action was completed.
The completion of the action must be monitored by reading the status of the controller but this is out of the scope of this class.
template<typename TOPIC_TYPE = fcfif::LampTopicUnion>
Callback to manageUpdateStatus(); changes on the monitored items.
- Parameters
-
| [in] | params | Vector containing the list of atributes that have changed |
This method implement the actions associated to the events originated from the monitoring of attributes.
This method is storing in the database the values that have changed. It also publish the events for the clients via zeroMQ.
Implements fcf::devmgr::common::DeviceLcsIf.