14
OPERATION MANUAL
Recveis the answer from the interface as a bytearray
This command is helpful when the answer from the interface should be processed fur-
ther. No check takes place.
Example: ba = com.recv_bytes()
get_runtime:
Returns the runtime of the last command that has been received. The runtime is the
time of a command send till echo (if there is an echo).
Example: runtime = com.get_runtime()
get_max_runtime:
Returns the maximum runtime of all the commands that has been send and received.
Example: max_runtime = com.get_max_runtime()
get_min_runtime:
Returns the minimum runtime of all the commands that has been send and received.
Example: min_runtime = com.get_min_runtime()
get_avg_runtime:
Returns the average runtime of all the commands that has been send and received.
Example: avg_runtime = com.get_avg_runtime()
get_nr_cmds_sent:
Returns the number of commands sent since the initialization of the Com object
Example: nr_commands = com.get_nr_cmds_sent()
get_nr_answers:
Returns the number of answers received since the initialization of the Com object
Example: nr_answers = com.get_nr_answers()
get_nr_timeouts:
Returns the number of timeouts occurred since the initialization of the Com object
Example: nr_timeouts = com.get_nr_timeouts()
get_std_deviation:
Returns the standard deviation from the runtime
Example: std_dev = com.get_std_deviation()
5.2 PB Object (PB Commands)
Namespace: from softcheck.pb_commands import PbCom
To construct a new PbCom class - which is used for communication with PB commands
with the device - the following arguments are needed:
Example: pb = PbCom(com)
Example2: pb = PbCom(com, 1)
The 1st parameter must be a configured Com object.
As 2nd parameter the verbosity level can be given. "1" means that the program ex-
plains what goes wrong in case of an error.
3rd parameter: When set to True (default), the program throws an exception in case of
an error, otherwise the program goes on.
int2hexstr:
converts the value of an pb command to a hex string.
The first argument is the number, the second gives the number of bytes used for
transformation
Return value is the hex string.
pb.int2hexstr(number, 16)
check:
checks if the value of a pb command is like expected
The first argument is the value of the command to check, the second the value of the
PB command expected.
Return value True if check is o.k.
pb.check(30, 1)
check_range:
checks if the value of the pb command is within the range expected
pySoftcheck
Liability for errors and misprints excluded.
pySoftcheck.01.20171002.2
Summary of Contents for Pilot ONE
Page 1: ...Operation Manual ...
Page 2: ......