ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
hardware_monitor.hardware_monitor_api Namespace Reference

Functions

str _ts ()
 
def _store (str host, str kind, dict data)
 
def _ensure_path ()
 
def _make_executor (ctx)
 
def _spin_node (node, ctx)
 
def _run_node_thread (str node_name)
 
def _start_node_supervisor ()
 
def _start_ros_subscribers ()
 
Blueprint get_hardware_monitor_blueprint (str url_prefix='/api/hardware')
 

Variables

 logger = logging.getLogger(__name__)
 
 _PKG_DIR = os.path.dirname(os.path.abspath(__file__))
 
 _PKG_PARENT = os.path.dirname(_PKG_DIR)
 
 dict
 
 _hosts_lock = threading.Lock()
 
 _node_lock = threading.Lock()
 
bool _supervisor_started = False
 
bool _ros_subscriber_started = False
 
 _latched
 

Detailed Description

hardware_monitor_api.py

Flask blueprint for the hardware monitor cluster API.

Nodes are launched in-process in threads rather than via `ros2 run`, so they
work regardless of whether `ros2` is on PATH or the workspace is sourced in
the shell that started the Flask server.

Function Documentation

◆ _ensure_path()

def hardware_monitor.hardware_monitor_api._ensure_path ( )
private
Here is the caller graph for this function:

◆ _make_executor()

def hardware_monitor.hardware_monitor_api._make_executor (   ctx)
private
Return a SingleThreadedExecutor bound to ctx.
Here is the caller graph for this function:

◆ _run_node_thread()

def hardware_monitor.hardware_monitor_api._run_node_thread ( str  node_name)
private
Here is the call graph for this function:

◆ _spin_node()

def hardware_monitor.hardware_monitor_api._spin_node (   node,
  ctx 
)
private
Spin a node using an executor tied to its context.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _start_node_supervisor()

def hardware_monitor.hardware_monitor_api._start_node_supervisor ( )
private
Here is the caller graph for this function:

◆ _start_ros_subscribers()

def hardware_monitor.hardware_monitor_api._start_ros_subscribers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _store()

def hardware_monitor.hardware_monitor_api._store ( str  host,
str  kind,
dict  data 
)
private
Here is the call graph for this function:

◆ _ts()

str hardware_monitor.hardware_monitor_api._ts ( )
private
Here is the caller graph for this function:

◆ get_hardware_monitor_blueprint()

Blueprint hardware_monitor.hardware_monitor_api.get_hardware_monitor_blueprint ( str   url_prefix = '/api/hardware')
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _hosts_lock

hardware_monitor.hardware_monitor_api._hosts_lock = threading.Lock()
private

◆ _latched

hardware_monitor.hardware_monitor_api._latched
private

◆ _node_lock

hardware_monitor.hardware_monitor_api._node_lock = threading.Lock()
private

◆ _PKG_DIR

hardware_monitor.hardware_monitor_api._PKG_DIR = os.path.dirname(os.path.abspath(__file__))
private

◆ _PKG_PARENT

hardware_monitor.hardware_monitor_api._PKG_PARENT = os.path.dirname(_PKG_DIR)
private

◆ _ros_subscriber_started

bool hardware_monitor.hardware_monitor_api._ros_subscriber_started = False
private

◆ _supervisor_started

bool hardware_monitor.hardware_monitor_api._supervisor_started = False
private

◆ dict

hardware_monitor.hardware_monitor_api.dict

◆ logger

hardware_monitor.hardware_monitor_api.logger = logging.getLogger(__name__)