Classes | Public Member Functions | Public Attributes | List of all members
diagnostic_updater._diagnostic_updater.DiagnosticTaskVector Class Reference
Inheritance diagram for diagnostic_updater._diagnostic_updater.DiagnosticTaskVector:
Inheritance graph
[legend]

Classes

class  DiagnosticTaskInternal
 

Public Member Functions

def __init__ (self)
 
def add (self, *args)
 
def addedTaskCallback (self, task)
 
def removeByName (self, name)
 

Public Attributes

 lock
 
 tasks
 

Detailed Description

Internal use only.

Base class for :class:`Updater` and self_test::Dispatcher.
The class manages a collection of diagnostic updaters. It contains the
common functionality used for producing diagnostic updates and for
self-tests.

:ivar tasks: List of tasks
:vartype tasks: list of :class:`DiagnosticTask`
:ivar threading.Lock lock: The lock protecting the enclosed list of tasks.

Definition at line 162 of file _diagnostic_updater.py.

Constructor & Destructor Documentation

◆ __init__()

def diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.__init__ (   self)

Reimplemented in diagnostic_updater._diagnostic_updater.Updater.

Definition at line 189 of file _diagnostic_updater.py.

Member Function Documentation

◆ add()

def diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.add (   self,
args 
)
Add a task to the :class:`DiagnosticTaskVector`.

Usage:

`add(task)`: where task is a DiagnosticTask

`add(name, fn)`: add a DiagnosticTask embodied by a name and function

Definition at line 202 of file _diagnostic_updater.py.

◆ addedTaskCallback()

def diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.addedTaskCallback (   self,
  task 
)
Allows an action to be taken when a task is added. The :class:`Updater` class
uses this to immediately publish a diagnostic that says that the node
is loading.

:param DiagnosticTask task: the added task.

Reimplemented in diagnostic_updater._diagnostic_updater.Updater.

Definition at line 193 of file _diagnostic_updater.py.

◆ removeByName()

def diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.removeByName (   self,
  name 
)
Removes a task based on its name.

Removes the first task that matches the specified name. (New in
version 1.1.2)

:param str name: Name of the task to remove.
:return: Returns true if a task matched and was removed.
:rtype: bool

Definition at line 220 of file _diagnostic_updater.py.

Member Data Documentation

◆ lock

diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.lock

Definition at line 191 of file _diagnostic_updater.py.

◆ tasks

diagnostic_updater._diagnostic_updater.DiagnosticTaskVector.tasks

Definition at line 190 of file _diagnostic_updater.py.


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


diagnostic_updater
Author(s): Kevin Watts, Brice Rebsamen , Jeremy Leibs, Blaise Gassend
autogenerated on Tue May 6 2025 02:17:37