Notebook helper subpackage (ska_tangoctl.notebook_helper)
Read information from Tango database.
- ska_tangoctl.notebook_helper.check_command(dev: Any, c_name: str | None) bool [source]
Check a command for a Tango device.
- Parameters:
dev – device handle
c_name – command name
- Returns:
true when command is OK
- ska_tangoctl.notebook_helper.check_tango(tango_fqdn: str, tango_port: int = 10000) int [source]
Check Tango host address.
- Parameters:
tango_fqdn – fully qualified domain name
tango_port – port number
- Returns:
error condition
- ska_tangoctl.notebook_helper.get_obs_state(obs_stat: int) str [source]
Display Python enumerated type for observing state.
- Parameters:
obs_stat – observing state numeric value
- Returns:
state description
- ska_tangoctl.notebook_helper.run_command(dev: Any, cmd: str) None [source]
Run command and print output.
- Parameters:
dev – Tango device
cmd – command name
- Returns:
None
- ska_tangoctl.notebook_helper.set_tango_admin(dev: Any, dev_adm: bool, sleeptime: int = 2) bool [source]
Write admin mode for a Tango device.
- Parameters:
dev – Tango device
dev_adm – admin mode flag
sleeptime – seconds to sleep
- Returns:
True when device is in admin mode
- ska_tangoctl.notebook_helper.show_attribute_value_scalar(prefix: str, attrib_value: str) None [source]
Print attribute scalar value.
- Parameters:
prefix – data prefix string
attrib_value – attribute value
- ska_tangoctl.notebook_helper.show_attribute_value_spectrum(prefix: str, attrib_value: str) None [source]
Print attribute spectrum value.
- Parameters:
prefix – data prefix string
attrib_value – attribute value
- ska_tangoctl.notebook_helper.show_attributes(evrythng: int, fforce: bool, a_name: str | None) None [source]
Display information about Tango devices.
- Parameters:
evrythng – flag for markdown output
fforce – get commands and attributes regadrless of state
a_name – filter attribute name
- ska_tangoctl.notebook_helper.show_command_inputs(tango_host: str, tgo_in_type: str) None [source]
Display commands with given input type.
- Parameters:
tango_host – Tango database host address and port
tgo_in_type – input type, e.g. Uninitialised
- Returns:
error condition
- ska_tangoctl.notebook_helper.show_commands(evrythng: int, fforce: bool, c_name: str | None) None [source]
Display information about Tango devices.
- Parameters:
evrythng – flag for markdown output
fforce – get commands and attributes regadrless of state
c_name – filter command name
- ska_tangoctl.notebook_helper.show_device(device: str, fforce: bool) int [source]
Display Tango device in text format.
- Parameters:
device – device name
fforce – get commands and attributes regadrless of state
- Returns:
one if device is on, otherwise zero
- ska_tangoctl.notebook_helper.show_device_markdown(device: str) int [source]
Display Tango device in mark-down format.
- Parameters:
device – device name
- Returns:
one if device is on, otherwise zero
- ska_tangoctl.notebook_helper.show_device_query(device: str, fforce: bool) int [source]
Display Tango device in text format.
- Parameters:
device – device name
fforce – get commands and attributes regadrless of state
- Returns:
one if device is on, otherwise zero
- ska_tangoctl.notebook_helper.show_device_state(device: str) int [source]
Display Tango device name only.
- Parameters:
device – device name
- Returns:
error condition
- ska_tangoctl.notebook_helper.show_devices(evrythng: int, fforce: bool, itype: str | None) None [source]
Display information about Tango devices.
- Parameters:
evrythng – flag for markdown output
fforce – get commands and attributes regadrless of state
itype – filter device name
- ska_tangoctl.notebook_helper.show_long_running_command(dev: Any) int [source]
Display long-running command.
- Parameters:
dev – Tango device handle
- Returns:
error condition