tango_simlib.examples modules

tango_simlib.examples.mkat_vds module

tango_simlib.examples.mkat_vds.main()[source]

tango_simlib.examples.weather1 module

tango_simlib.examples.weather1.main()[source]

tango_simlib.examples.weather2 module

tango_simlib.examples.weather2.main()[source]

tango_simlib.examples.weather3 module

tango_simlib.examples.weather3.main()[source]

tango_simlib.examples.override_class module

An example of the user-defined override class.

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: future.types.newobject.newobject

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

action_slew(model, tango_dev=None, data_input=None)[source]

The Dish is tracking the commanded pointing positions within the specified TRACK pointing accuracy.

data_input: list
[Timestamp] [azimuth] [elevation]
pre_update(sim_model, sim_time, dt)[source]
class tango_simlib.examples.override_class.OverrideVds[source]

Bases: future.types.newobject.newobject

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_stop(model, tango_dev=None, data_input=None)[source]

Stop camera.

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.
action_trapupdate(model, tango_dev=None, data_input=None)[source]

Update trap. this request is called by a script.

data_input : str
Trap update from a script (8, ‘on’).
action_zoom(model, tango_dev=None, data_input=None)[source]

Zoom camera to a specified direction or specified position.

data_input[0] : str
zoom_direction e.g. ‘tele’, ‘wide’, ‘to’.
data_input[1] : str
Optional argument, zoom_position; a stringified numeral.
class tango_simlib.examples.override_class.OverrideWeather[source]

Bases: future.types.newobject.newobject

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.

action_multiplystringby3(model, tango_dev=None, data_input=None)[source]

Takes a string and multiplies it by a constant integer value of 3.

action_off(model, tango_dev=None, data_input=None)[source]

Changes the State of the device to OFF.

action_on(model, tango_dev=None, data_input=None)[source]

Changes the State of the device to ON.

class tango_simlib.examples.override_class.OverrideWeatherSimControl[source]

Bases: future.types.newobject.newobject

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_setoffrainstorm(model, tango_dev=None, data_input=None)[source]
test_action_setoffwindstorm(model, tango_dev=None, data_input=None)[source]
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.

test_action_stoprainfall(model, tango_dev=None, data_input=None)[source]

Totally sets the simulated quantity rainfall to a constant value of zero.

test_action_stoprainstorm(model, tango_dev=None, data_input=None)[source]
test_action_stopwindstorm(model, tango_dev=None, data_input=None)[source]
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.