|
hlcc 2.0.0-beta2+pre1
|
Test client for the telif process. More...
Public Member Functions | |
| def | __init__ (self, args, log_level=logging.DEBUG) |
| def | verify_response (self, response, expected_reply=None, expected_exception=None) |
| Verify if the expected response is contained in the actual 'replies' or in the 'exception' that are in the response dictionary. | |
| def | offset_setsky (self, args) |
| Setup connection and sends SkyOffset commands to server. | |
| def | preset_telescope_altaz (self, alt_degree, az_degree) |
| Presets telescope to a RaDec that corresponds to the the given AltAz at the present moment. | |
| def | offset_telescope (self, ra_rad, dec_rad) |
| Sends an offset command to telescope. | |
| def | compute_offset (self, delta_ra, delta_dec) |
| Read the current RaDec and compute what the new RaDec should be after offset is applied. | |
| def | check_current_target_radec (self, expected_ra, expected_dec, tolerance) |
| Check if the current RadDec is what was expected. | |
| def | get_oldb_content (self, str uri) |
| Get the content of the specified uri in the Oldb. | |
| def | offset_setsky_test_mode_no_sequence (self, args) |
| Configures telifsim to handle offset commands natively from telifsim without any external script. | |
| def | offset_setsky_test_mode_headless (self, args) |
| Configures telifsim to handle offset commands using a sequence and running it locally in a sequencer issued by the seqtool run command. | |
| def | offset_setsky_test_mode_gui (self, args) |
| Configures telifsim to handle offset commands using a sequence and running it in a sequencer already started. | |
| def | offset_setsky_test_mode_py_script (self, args) |
| Configures telifsim to handle offset commands using a simple python script (no sequence) that runs directly from telifsim by using Pybind11 embedded interpreter. | |
| def | offset_setsky_test_mode_direct (self, args) |
| Configures telifsim to handle offset commands using a sequence and running it directly from telifsim (no sequencer server) by using Pybind11 embedded interpreter. | |
| def | offset_setsky_standard_test (self, args) |
| Setup connection and sends test commands to server in 2 different situations: | |
Static Public Member Functions | |
| def | parse_args (arguments) |
| Static methods implementing MAIN () behavior in the class with parsing of command line arguments This allows testing from modular test the full behavior, including main startup. | |
| def | main (arguments) |
| Execute the main using the command line arguments passed as a list. | |
Public Attributes | |
| oldb_client | |
| service_std_cmds | |
| service_commands | |
| service_metadaq | |
| service_sim_cmds | |
| pk_service_std_cmds | |
| pk_service_commands | |
Test client for the telif process.
| def telifsim_sky_offset.TelifsimClient.__init__ | ( | self, | |
| args, | |||
log_level = logging.DEBUG |
|||
| ) |
| def telifsim_sky_offset.TelifsimClient.check_current_target_radec | ( | self, | |
| expected_ra, | |||
| expected_dec, | |||
| tolerance | |||
| ) |
Check if the current RadDec is what was expected.
| expected_ra | Ra offset in radians |
| expected_dec | Dec offset in radians |
| tolerance | tolerance used in the RaDec comparison |
| def telifsim_sky_offset.TelifsimClient.compute_offset | ( | self, | |
| delta_ra, | |||
| delta_dec | |||
| ) |
Read the current RaDec and compute what the new RaDec should be after offset is applied.
| delta_ra | Ra offset in radians |
| delta_dec | Dec offset in radians |
| def telifsim_sky_offset.TelifsimClient.get_oldb_content | ( | self, | |
| str | uri | ||
| ) |
Get the content of the specified uri in the Oldb.
| uri | str, oldb address |
|
static |
Execute the main using the command line arguments passed as a list.
If you pass the command line arguments, first remove argv[0] by passing:
| def telifsim_sky_offset.TelifsimClient.offset_setsky | ( | self, | |
| args | |||
| ) |
Setup connection and sends SkyOffset commands to server.
args is the set of arguments passed on the command line.
| def telifsim_sky_offset.TelifsimClient.offset_setsky_standard_test | ( | self, | |
| args | |||
| ) |
Setup connection and sends test commands to server in 2 different situations:
| def telifsim_sky_offset.TelifsimClient.offset_setsky_test_mode_direct | ( | self, | |
| args | |||
| ) |
Configures telifsim to handle offset commands using a sequence and running it directly from telifsim (no sequencer server) by using Pybind11 embedded interpreter.
In this case we import the sequencer libraries and run the sequence there.
| def telifsim_sky_offset.TelifsimClient.offset_setsky_test_mode_gui | ( | self, | |
| args | |||
| ) |
Configures telifsim to handle offset commands using a sequence and running it in a sequencer already started.
In this case we query consul for the sequencer server address and port, open a socket connection with it to load and start the sequence.
| def telifsim_sky_offset.TelifsimClient.offset_setsky_test_mode_headless | ( | self, | |
| args | |||
| ) |
Configures telifsim to handle offset commands using a sequence and running it locally in a sequencer issued by the seqtool run command.
| def telifsim_sky_offset.TelifsimClient.offset_setsky_test_mode_no_sequence | ( | self, | |
| args | |||
| ) |
Configures telifsim to handle offset commands natively from telifsim without any external script.
| def telifsim_sky_offset.TelifsimClient.offset_setsky_test_mode_py_script | ( | self, | |
| args | |||
| ) |
Configures telifsim to handle offset commands using a simple python script (no sequence) that runs directly from telifsim by using Pybind11 embedded interpreter.
| def telifsim_sky_offset.TelifsimClient.offset_telescope | ( | self, | |
| ra_rad, | |||
| dec_rad | |||
| ) |
Sends an offset command to telescope.
| ra_rad | Ra offset to be applied |
| dec_rad | Dec offset to be applied |
|
static |
Static methods implementing MAIN () behavior in the class with parsing of command line arguments This allows testing from modular test the full behavior, including main startup.
Parses the command line arguments passed as a list If you pass the command line arguments, first remove argv[0] by passing:
| def telifsim_sky_offset.TelifsimClient.preset_telescope_altaz | ( | self, | |
| alt_degree, | |||
| az_degree | |||
| ) |
Presets telescope to a RaDec that corresponds to the the given AltAz at the present moment.
| alt_degree | Altitude in degree. Altitude operational range is from +20 to +88.5 deg |
| az_degree | Azimuth in degree. Azimuth operational range is from -180 to +360 deg |
| def telifsim_sky_offset.TelifsimClient.verify_response | ( | self, | |
| response, | |||
expected_reply = None, |
|||
expected_exception = None |
|||
| ) |
Verify if the expected response is contained in the actual 'replies' or in the 'exception' that are in the response dictionary.
Returns true if positive.
| telifsim_sky_offset.TelifsimClient.oldb_client |
| telifsim_sky_offset.TelifsimClient.pk_service_commands |
| telifsim_sky_offset.TelifsimClient.pk_service_std_cmds |
| telifsim_sky_offset.TelifsimClient.service_commands |
| telifsim_sky_offset.TelifsimClient.service_metadaq |
| telifsim_sky_offset.TelifsimClient.service_sim_cmds |
| telifsim_sky_offset.TelifsimClient.service_std_cmds |