hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
telifsim_sky_offset.TelifsimClient Class Reference

Test client for the telif process. More...

Inheritance diagram for telifsim_sky_offset.TelifsimClient:

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
 

Detailed Description

Test client for the telif process.

Constructor & Destructor Documentation

◆ __init__()

def telifsim_sky_offset.TelifsimClient.__init__ (   self,
  args,
  log_level = logging.DEBUG 
)

Member Function Documentation

◆ check_current_target_radec()

def telifsim_sky_offset.TelifsimClient.check_current_target_radec (   self,
  expected_ra,
  expected_dec,
  tolerance 
)

Check if the current RadDec is what was expected.

Parameters
expected_raRa offset in radians
expected_decDec offset in radians
tolerancetolerance used in the RaDec comparison
Returns
True if expected value is within the tolerance of the current value

◆ compute_offset()

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.

Parameters
delta_raRa offset in radians
delta_decDec offset in radians
Returns
Final Ra, Dec in radians

◆ get_oldb_content()

def telifsim_sky_offset.TelifsimClient.get_oldb_content (   self,
str  uri 
)

Get the content of the specified uri in the Oldb.

Parameters
uristr, oldb address
Returns
Value read from Oldb in the given address

◆ main()

def telifsim_sky_offset.TelifsimClient.main (   arguments)
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:

sys.argv[1:]

◆ offset_setsky()

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.

◆ offset_setsky_standard_test()

def telifsim_sky_offset.TelifsimClient.offset_setsky_standard_test (   self,
  args 
)

Setup connection and sends test commands to server in 2 different situations:

  • Telescope not tracking (Not ready) - command should fail
  • Telescope tracking - Command should succeed

◆ offset_setsky_test_mode_direct()

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.

◆ offset_setsky_test_mode_gui()

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.

◆ offset_setsky_test_mode_headless()

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.

◆ offset_setsky_test_mode_no_sequence()

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.

◆ offset_setsky_test_mode_py_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.

◆ offset_telescope()

def telifsim_sky_offset.TelifsimClient.offset_telescope (   self,
  ra_rad,
  dec_rad 
)

Sends an offset command to telescope.

Parameters
ra_radRa offset to be applied
dec_radDec offset to be applied

◆ parse_args()

def telifsim_sky_offset.TelifsimClient.parse_args (   arguments)
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:

sys.argv[1:]

◆ preset_telescope_altaz()

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.

Parameters
alt_degreeAltitude in degree. Altitude operational range is from +20 to +88.5 deg
az_degreeAzimuth in degree. Azimuth operational range is from -180 to +360 deg

◆ verify_response()

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.

Member Data Documentation

◆ oldb_client

telifsim_sky_offset.TelifsimClient.oldb_client

◆ pk_service_commands

telifsim_sky_offset.TelifsimClient.pk_service_commands

◆ pk_service_std_cmds

telifsim_sky_offset.TelifsimClient.pk_service_std_cmds

◆ service_commands

telifsim_sky_offset.TelifsimClient.service_commands

◆ service_metadaq

telifsim_sky_offset.TelifsimClient.service_metadaq

◆ service_sim_cmds

telifsim_sky_offset.TelifsimClient.service_sim_cmds

◆ service_std_cmds

telifsim_sky_offset.TelifsimClient.service_std_cmds

The documentation for this class was generated from the following file: