Public Member Functions | Public Attributes | List of all members
pal_statistics.statistics_registry.StatisticsRegistry Class Reference
Inheritance diagram for pal_statistics.statistics_registry.StatisticsRegistry:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, topic)
 
def createFullMsg (self)
 
def createOptimizedMsgs (self)
 
def publish (self)
 
def publishCustomStatistic (self, name, value)
 
def publishCustomStatistics (self, msg)
 
def registerFunction (self, name, func, registration_list=None)
 
def unregister (self, name)
 

Public Attributes

 full_pub
 
 functions
 
 last_names_version
 
 names_changed
 
 names_pub
 
 topic
 
 values_pub
 

Detailed Description

Definition at line 43 of file statistics_registry.py.

Constructor & Destructor Documentation

◆ __init__()

def pal_statistics.statistics_registry.StatisticsRegistry.__init__ (   self,
  topic 
)

Definition at line 45 of file statistics_registry.py.

Member Function Documentation

◆ createFullMsg()

def pal_statistics.statistics_registry.StatisticsRegistry.createFullMsg (   self)
Create and return a message after reading all registrations

Definition at line 119 of file statistics_registry.py.

◆ createOptimizedMsgs()

def pal_statistics.statistics_registry.StatisticsRegistry.createOptimizedMsgs (   self)
Create and return a names, values message after reading all registrations

Definition at line 132 of file statistics_registry.py.

◆ publish()

def pal_statistics.statistics_registry.StatisticsRegistry.publish (   self)

Definition at line 88 of file statistics_registry.py.

◆ publishCustomStatistic()

def pal_statistics.statistics_registry.StatisticsRegistry.publishCustomStatistic (   self,
  name,
  value 
)
Publishes a one-time statistic

Definition at line 101 of file statistics_registry.py.

◆ publishCustomStatistics()

def pal_statistics.statistics_registry.StatisticsRegistry.publishCustomStatistics (   self,
  msg 
)
Publishes a one-time statistics msg

Definition at line 113 of file statistics_registry.py.

◆ registerFunction()

def pal_statistics.statistics_registry.StatisticsRegistry.registerFunction (   self,
  name,
  func,
  registration_list = None 
)
Registers a function that will be called to read the value to
be published when the publish() method is called

@param registration_list: If not None, will be extended to include a
Registration object for the registered function

The function takes no arguments and returns a value convertable to float
It can also be used to register a variable using lambda

registerFunction("my_function", self.my_function)
registerFunction("my_variable", (lambda: variable))

Definition at line 59 of file statistics_registry.py.

◆ unregister()

def pal_statistics.statistics_registry.StatisticsRegistry.unregister (   self,
  name 
)
Unregisters a function or variable so it's no longer read

Definition at line 78 of file statistics_registry.py.

Member Data Documentation

◆ full_pub

pal_statistics.statistics_registry.StatisticsRegistry.full_pub

Definition at line 48 of file statistics_registry.py.

◆ functions

pal_statistics.statistics_registry.StatisticsRegistry.functions

Definition at line 47 of file statistics_registry.py.

◆ last_names_version

pal_statistics.statistics_registry.StatisticsRegistry.last_names_version

Definition at line 52 of file statistics_registry.py.

◆ names_changed

pal_statistics.statistics_registry.StatisticsRegistry.names_changed

Definition at line 51 of file statistics_registry.py.

◆ names_pub

pal_statistics.statistics_registry.StatisticsRegistry.names_pub

Definition at line 49 of file statistics_registry.py.

◆ topic

pal_statistics.statistics_registry.StatisticsRegistry.topic

Definition at line 46 of file statistics_registry.py.

◆ values_pub

pal_statistics.statistics_registry.StatisticsRegistry.values_pub

Definition at line 50 of file statistics_registry.py.


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


pal_statistics
Author(s):
autogenerated on Fri Aug 2 2024 08:29:35