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

Test client for the eltpk process. More...

Public Member Functions

def __init__ (self, log_level=logging.DEBUG)
 
def get_service_client (self, uri, cls, qos=QOS_RR_DEFAULT, mal_specific_properties=None)
 Get from factory client for given URI.
 
def send_command_single (self, cmd_name, cmd_func, args='NOT_SET', datetime.timedelta timeout=datetime.timedelta(milliseconds=1000))
 Sends a command to the server and rises an exception in case of failure.
 
dict send_command_single_no_ex (self, cmd_name, cmd_func, args='NOT_SET', datetime.timedelta timeout=datetime.timedelta(milliseconds=1000))
 Sends a command to the server, but does not rises an exception in case of failure.
 
def get_reply_with_result (self, future, datetime.timedelta timeout=datetime.timedelta(milliseconds=1000))
 Waits a given timeout for a future to return with the final payload.
 

Public Attributes

 logger
 

Static Public Attributes

None rr_mal = None
 
None factory = None
 

Detailed Description

Test client for the eltpk process.

Constructor & Destructor Documentation

◆ __init__()

def utils.client.Client.__init__ (   self,
  log_level = logging.DEBUG 
)

Member Function Documentation

◆ get_reply_with_result()

def utils.client.Client.get_reply_with_result (   self,
  future,
datetime.timedelta   timeout = datetime.timedelta(milliseconds=1000) 
)

Waits a given timeout for a future to return with the final payload.

Parameters
futurethe future object to wait for
timeouttimeout as datetime.timedelta. Default is 1000ms
Exceptions
mal.TimeoutExceptionon timeout

◆ get_service_client()

def utils.client.Client.get_service_client (   self,
  uri,
  cls,
  qos = QOS_RR_DEFAULT,
  mal_specific_properties = None 
)

Get from factory client for given URI.

◆ send_command_single()

def utils.client.Client.send_command_single (   self,
  cmd_name,
  cmd_func,
  args = 'NOT_SET',
datetime.timedelta   timeout = datetime.timedelta(milliseconds=1000) 
)

Sends a command to the server and rises an exception in case of failure.

Parameters
timeouttimeout as datetime.timedelta. Default is 1000ms
Returns
: the reply from the command @rise: any exception from the command

◆ send_command_single_no_ex()

dict utils.client.Client.send_command_single_no_ex (   self,
  cmd_name,
  cmd_func,
  args = 'NOT_SET',
datetime.timedelta   timeout = datetime.timedelta(milliseconds=1000) 
)

Sends a command to the server, but does not rises an exception in case of failure.

Instead it returns the repr(ex) of the received exception

Parameters
timeout: timeout as datetime.timedelta. Default is 1000ms
Returns
: reply, repr(ex) (reply is None in case of error repr(ex) is not if no error.

Member Data Documentation

◆ factory

None utils.client.Client.factory = None
static

◆ logger

utils.client.Client.logger

◆ rr_mal

None utils.client.Client.rr_mal = None
static

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