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

Test client for the publish subscribe test. More...

Inheritance diagram for hlcc_pubsub_test.HlccPubSubClient:

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 test_entity_uri_generic (self, entity, uri, wait_s=2)
 Will subscribe to a topic given the uri and entity We expect to receive data right after subscription.
 
def test_entity_uri_app_status (self, entity, uri, expected_apps)
 Will subscribe to a topic given the uri and entity We expect to receive data right after subscription.
 
int test_hlcc_pub_sub (self)
 Check if it is possible to read the last published value of each one of the topics published by hlcc.
 

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

 args
 
 telifsim_std_cmds
 
 eltpk_std_cmds
 

Detailed Description

Test client for the publish subscribe test.

Constructor & Destructor Documentation

◆ __init__()

def hlcc_pubsub_test.HlccPubSubClient.__init__ (   self,
  args,
  log_level = logging.DEBUG 
)

Member Function Documentation

◆ main()

def hlcc_pubsub_test.HlccPubSubClient.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:]

◆ parse_args()

def hlcc_pubsub_test.HlccPubSubClient.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:]

◆ test_entity_uri_app_status()

def hlcc_pubsub_test.HlccPubSubClient.test_entity_uri_app_status (   self,
  entity,
  uri,
  expected_apps 
)

Will subscribe to a topic given the uri and entity We expect to receive data right after subscription.

For this topic there are a few subscribers so we will also check if received from the expected ones.

Parameters
entityentity classname (fully qualified), e.g. "ModCcsinsif.Ccsinsif.AltAz"
uripublisher address, e.g. "dds.ps:///TELIF_CCS_TRG_OBS_ALTAZ"
expected_appslist of application names expected in the status data

◆ test_entity_uri_generic()

def hlcc_pubsub_test.HlccPubSubClient.test_entity_uri_generic (   self,
  entity,
  uri,
  wait_s = 2 
)

Will subscribe to a topic given the uri and entity We expect to receive data right after subscription.

We consider test succeeded if we received data but we will not check the data received.

Parameters
entityentity classname (fully qualified), e.g. "ModCcsinsif.Ccsinsif.AltAz"
uripublisher address, e.g. "dds.ps:///TELIF_CCS_TRG_OBS_ALTAZ"

◆ test_hlcc_pub_sub()

int hlcc_pubsub_test.HlccPubSubClient.test_hlcc_pub_sub (   self)

Check if it is possible to read the last published value of each one of the topics published by hlcc.

◆ verify_response()

def hlcc_pubsub_test.HlccPubSubClient.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

◆ args

hlcc_pubsub_test.HlccPubSubClient.args

◆ eltpk_std_cmds

hlcc_pubsub_test.HlccPubSubClient.eltpk_std_cmds

◆ telifsim_std_cmds

hlcc_pubsub_test.HlccPubSubClient.telifsim_std_cmds

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