tango_simlib.examples modules¶
tango_simlib.examples.override_class module¶
An example of the user-defined override class. @author MeerKAT CAM team <cam@ska.ac.za>
-
exception
tango_simlib.examples.override_class.
DishSimError
[source]¶ Bases:
exceptions.Exception
Raised when a Dish simulator action could not be executed.
-
class
tango_simlib.examples.override_class.
OverrideDish
[source]¶ Bases:
object
-
AZIM_DRIVE_MAX_RATE
= 2.0¶
-
ELEV_DRIVE_MAX_RATE
= 1.0¶
-
action_configureband1
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the CONFIGURE Dish Element Mode, and returns to the caller. To configure the Dish to operate in frequency band 1. On completion of the band configuration, Dish will automatically revert to the previous Dish mode (OPERATE or STANDBY-FP).
- data_input: str
- timestamp
-
action_configureband2
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the CONFIGURE Dish Element Mode, and returns to the caller. To configure the Dish to operate in frequency band 2. On completion of the band configuration, Dish will automatically revert to the previous Dish mode (OPERATE or STANDBY-FP).
- data_input: str
- timestamp
-
action_configureband3
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the CONFIGURE Dish Element Mode, and returns to the caller. To configure the Dish to operate in frequency band 3. On completion of the band configuration, Dish will automatically revert to the previous Dish mode (OPERATE or STANDBY-FP).
- data_input: str
- timestamp
-
action_configureband4
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the CONFIGURE Dish Element Mode, and returns to the caller. To configure the Dish to operate in frequency band 4. On completion of the band configuration, Dish will automatically revert to the previous Dish mode (OPERATE or STANDBY-FP).
- data_input: str
- timestamp
-
action_configureband5
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the CONFIGURE Dish Element Mode, and returns to the caller. To configure the Dish to operate in frequency band 5. On completion of the band configuration, Dish will automatically revert to the previous Dish mode (OPERATE or STANDBY-FP).
- data_input: str
- timestamp
-
action_lowpower
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the LOW power state. All subsystems go into a low power state to power only the essential equipment. Specifically the Helium compressor will be set to a low power consumption, and the drives will be disabled. When issued a STOW command while in LOW power, the DS controller should be able to turn the drives on, stow the dish and turn the drives off again. The purpose of this mode is to enable the observatory to perform power management (load curtailment), and also to conserve energy for non-operating dishes.
data_input: None
-
action_setmaintenancemode
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the MAINTENANCE Dish Element Mode, and returns to the caller. To go into a state that is safe to approach the Dish by a maintainer, and to enable the Engineering interface to allow direct access to low level control and monitoring by engineers and maintainers. This mode will also enable engineers and maintainers to upgrade SW and FW. Dish also enters this mode when an emergency stop button is pressed.
data_input: None
-
action_setoperatemode
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the OPERATE Dish Element Mode, and returns to the caller. This mode fulfils the main purpose of the Dish, which is to point to designated directions while capturing data and transmitting it to CSP.
data_input: None
-
action_setstandbyfpmode
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the STANDBY-FP Dish Element Mode, and returns to the caller. To prepare all subsystems for active observation, once a command is received by TM to go to the FULL_POWER mode.
data_input: None
-
action_setstandbylpmode
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the STANDBY-LP Dish Element Mode, and returns to the caller. Standby_LP is the default mode when the Dish is configured for low power consumption, and is the mode wherein Dish ends after a start up procedure.
data_input: None
-
action_setstowmode
(model, tango_dev=None, data_input=None)[source]¶ This command triggers the Dish to transition to the STOW Dish Element Mode, and returns to the caller. To point the dish in a direction that minimises the wind loads on the structure, for survival in strong wind conditions. The Dish is able to observe in the stow position, for the purpose of transient detection.
data_input: None
-
-
class
tango_simlib.examples.override_class.
OverrideVds
[source]¶ Bases:
object
An example of the override class for the TANGO device class ‘MKATVDS’. It provides all the implementations of the command handler functions for the commands specified in the POGO generated XMI data description file.
-
action_camerapoweron
(model, tango_dev=None, data_input=None)[source]¶ Switch camera electronics on or off.
- data_input[0] : str
- ‘on’ or ‘off’ value.
-
action_floodlighton
(model, tango_dev=None, data_input=None)[source]¶ Set floodlight to a on or off.
- data_input[0] : str
- ‘on’ or ‘off’ value.
-
action_focus
(model, tango_dev=None, data_input=None)[source]¶ Focuses camera to a specified direction or specified position.
- data_input[0] : str
- focus direction e.g. ‘far’, ‘near’, ‘to’.
- data_input[1] : str
- Optional argument, focus position; a stringified integer numeral.
-
action_pan
(model, tango_dev=None, data_input=None)[source]¶ Drive camera to a pan direction(left or right) or pan to specified position.
- data_input[0] : str
- pan direction e.g. ‘left’, ‘right’, ‘to’.
- data_input[1] : str
- Optional argument, pan position; a stringified integer numeral.
-
action_presetclear
(model, tango_dev=None, data_input=None)[source]¶ Clear the specified preset.
- data_input[0] : str
- receptor name (from m000 to m063).
-
action_presetgoto
(model, tango_dev=None, data_input=None)[source]¶ Go to preset stored position(pan, tilt, zoom).
- data_input[0] : str
- receptor name (from m000 to m063).
-
action_presetset
(model, tango_dev=None, data_input=None)[source]¶ Set the position which the camera is at currently as preset position.
- data_input[0] : str
- receptor name (from m000 to m063).
-
action_tilt
(model, tango_dev=None, data_input=None)[source]¶ Drive camera to a tilt direction or specified position.
- data_input[0] : str
- tilt_direction e.g. ‘up’, ‘down’, ‘to’.
- data_input[1] : str
- Optional argument, tilt_position; a stringified integer numeral.
-
-
class
tango_simlib.examples.override_class.
OverrideWeather
[source]¶ Bases:
object
An example of the override class for the TANGO device class ‘Weather’. It provides all the implementations of the command handler functions for the commands specified in the POGO generated XMI data description file.
-
action_add
(model, tango_dev=None, data_input=None)[source]¶ Add two or more numbers together and return their sum.
-
-
class
tango_simlib.examples.override_class.
OverrideWeatherSimControl
[source]¶ Bases:
object
An example of the override class for the TANGO device class ‘SimControl’. It provides all the implementations of the command handler functions for the commands required to stimulate a running TANGO device in real time.
-
test_action_setattributemaxvalue
(model, tango_dev=None, data_input=None)[source]¶ This command sets an attribute value to its maximum value to set its quality to Alarm state to warning.
-
test_action_simulatefaultdevicestate
(model, tango_dev=None, data_input=None)[source]¶ This command sets the current device state to fault/on.
-
test_action_stimulateattributeconfigurationerror
(model, tango_dev=None, data_input=None)[source]¶ This command sets the attribute maximum allowed value to be the same as that minimum allowed value.
-
test_action_stopquantitysimulation
(model, tango_dev=None, data_input=None)[source]¶ Totally sets the simulated quantities` values to a constant value of zero.
-
-
exception
tango_simlib.examples.override_class.
VdsSimError
[source]¶ Bases:
exceptions.Exception
Raised when a Video Display System simulator action could not be executed.
-
exception
tango_simlib.examples.override_class.
WeatherSimError
[source]¶ Bases:
exceptions.Exception
Raised when a Weather simulator action could not be executed.