hbp_nrp_excontrol.StateMachineRunner module

This module contains the start script of a state machine process

class StateMachineRunner(sm_id, path)[source]

Bases: object

Class encapsulating a running application to expose a state machine

get_result(request)[source]

Gets the result of the state machine

static get_state(request)[source]

Gets the current state machines current state

Parameters

request – The mandatory ROS request parameter

init()[source]

Initializes the current state machine runner

initialize_sm(request)[source]

Initializes the current state machine

Parameters

request – The mandatory ROS request parameter

restart(request)[source]

Restarts the current state machine

Parameters

request – The mandatory ROS request parameter

send_error(msg, error_type, severity=1, line_number=- 1, offset=- 1, line_text='')[source]

Sends an error message to clients

Parameters
  • msg – The error message

  • severity – The severity of the error

  • error_type – The error type, e.g. “Compile”

  • line_number – The line number where the error occurred

  • offset – The offset

  • line_text – The text of the line causing the error

start(request)[source]

Starts the current state machine

Parameters

request – The mandatory ROS request parameter

stop(request)[source]

Stops the current state machine

Parameters

request – The mandatory ROS request parameter

main()[source]

Runs the state machine runner

print_full_stack_trace(sig, frame)[source]

Log the stack trace of all the threads

Parameters
  • sig – The received signal

  • frame – The current stack frame

set_up_logger(logfile_name, verbose=False)[source]

Configure the root logger of the CLE application

Param

logfile_name: name of the file created to collect logs

Param

verbose: increase logging verbosity