Introduction
Reference Documents
- [RD1]
- Central Control System Development Standards;
FCF Interface
FCF interface, fcfif
, is the interface to be used by the FCF
Device Manager. This interface shall be used whenever you want to control
or monitor devices using FCF component.
This documentation provides an overview of the interface. For data structures only the data members are documented, not the accessors generated by MAL. Similarly names are not fully qualified as it is different across the supported languages.
Constraints
The FCF interfaces have been defined under the following constraints imposed by CII MAL/RAD:
CII MAL does not support optionals. This is huge limitation for a generic software like FCF. Some of the implications is that in some cases a complete structure has to be serialized even in one attribute is needed.
RAD can only accepts one parameter for commands. So if a command needs more than one parameter, one should use structs and use the parameters as fields of the struct.
CII MAL does not support defaults, this means you need to fill up properly all fields of your structs used as payload for your commands.
The FCF interface includes some simple commands to control devices. These commands are to be used for maintenance or troubleshooting and not for normal operations.
Interfaces
- class fcfif.AppCmds
FCF Command interface.
- Recover() String
Command that tries to recover from error state produced by one or more devices. It will attempt to bring all devices to operational state. You can do the same going back to reset or ready state and coming back to operational.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- DevNames() String
Command to get the list of devices managed by the server (Devmgr).
- Returns:
A string with the list of devices.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- DevInfo() String
Command to get general information of devices managed by the server (Devmgr).
- Returns:
A string with the list of device tuple {device, type}.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- DevStatus(devices) String
Command to get status of one or more devices. The status is a list of parameters with their current values, e.g. motor position.
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with the list of device parameters.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- GetConfig() String
Command to get actual server configuration. Reply is sent using the CII ConfigNg format (stream).
- Returns:
A CII Config-Ng stream with the server configuration.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- Setup(payload) String
Command to setup devices run-time parameters. Reply is sent to the originator when devices have completed the new configuration, e.g. motor is in position.
- Parameters:
payload – vector of run-time configurations to be applied to the devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- Simulate(devices) String
Command to simulate one or more devices. You may put a device in simulation if you want to use the simulator instead of the real hardware. This is useful to validate the interface of the device during development.
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- StopSim(devices) String
Command to stop simulation for one or more devices.
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- Ignore(devices) String
Command to ignore one or more devices. You can ignore a device if hardware is not available or damaged. When the device is ignored, its status is not considered by the Devmgr.
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- HwInit(devices) String
Command for HW direct control (maintenance/troubleshooting) It triggers the controller (PLC) initialisation for one or more devices.
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- HwEnable(devices) String
Command for HW direct control (maintenance/troubleshooting) It moves one or more controller (PLC) to operational state (from state ready).
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- HwDisable(devices) String
Command for HW direct control (maintenance/troubleshooting) It moves one or more controller (PLC) to ready state (from state operational).
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- HwReset(devices) String
Command for HW direct control (maintenance/troubleshooting) It triggers the controller (PLC) reset for one or more devices.
- Parameters:
devices – vector of strings with the list of devices.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- Open(devname) String
Command that triggers the open of a shutter device.
- Parameters:
devname – string with the device name of shutter to be open.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- Close(devname) String
Command that triggers the close of a shutter device.
- Parameters:
devname – string with the device name of shutter to be closed.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- SwitchOn(params) String
Command that triggers the switch on for a lamp device. The params is of type SwitchOnParams.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- SwitchOff(devname) String
Command that triggers the switch off of a lamp device.
- Parameters:
devname – string with the device name of lamp to be switched off.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- MoveAbs(params) String
Command that triggers the move of a motor to an absolute. The params is of type MoveAbsParams. position.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- MoveByName(params) String
Command that triggers the move of a motor to named position. The params is of type MoveByNameParams.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- StartTrack(params) String
Command that triggers the tracking of derotator device. The params is of type StartTrackParams.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- StopTrack(devname) String
Command that triggers the stop of a tracking device.
- Parameters:
devname – string with the device name of derotator to stop tracking.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- TrackOffset(params) String
Command to send an offset to a derotator device during tracking. The params is of type TrackOffsetParams.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- SetTipTilt(params) String
Set tip/tilt of a piezo device. The params is of type SetTipTiltParams.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
- SetCustom(params) String
Set run-time parameters of a custom device using JSON format. The params is of type SetCustomParams.
- Parameters:
params – structure that contains the parameters for the command.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
fcfif::ExceptionErr – if a failure occurrs.
Data Structures
- class fcfif.ExceptionErr
Exception class thrown in case an error is encountered while handling a request.
- code: int
Exception (error) code allocated to the specific exception; 0 if no code is allocated.
- desc: str
Description of the exception (diagnostics).
- class fcfif.SwitchOnParams
Structure for the parameters of the SwitchOn Command.
- devname: string
Device name
- intensity: double
Lamp intensity. Only for lamps with this feature. Intensity is in percentage.
- time: uint32_t
Time before automatic switch off. When value is zero, lamp is never switched off. Time is in seconds.
- class fcfif.MoveAbsParams
Structure for the parameters of the MoveAbs Command.
- devname: string
Device name.
- position: double
Target position in SI.
- class fcfif.MoveByNameParams
Structure for the parameters of the MoveByName Command. If the position is not defined, an error will be returned.
- devname: string
Device name.
- name: string
Named position.
- class fcfif.StartTrackParams
Structure for the parameters of the StartTrack Command.
- devname: string
Device name.
- mode: string
Tracking mode.
- class fcfif.TrackOffsetParams
Structure for the parameters of the TrackOffset Command.
- devname: string
Device name.
- offset: double
Tracking offset to be applied in SI units.