Namespaces | Macros | Functions | Variables
pal_statistics_macros.h File Reference
#include <pal_statistics/pal_statistics.h>
#include <pal_statistics/registration_utils.h>
Include dependency graph for pal_statistics_macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 pal_statistics
 

Macros

#define GET_4TH_ARG(arg1, arg2, arg3, arg4, ...)   arg4
 
#define GET_5TH_ARG(arg1, arg2, arg3, arg4, arg5, ...)   arg5
 
#define PUBLISH_ASYNC_STATISTICS(TOPIC)   pal_statistics::getRegistry(TOPIC)->publishAsync();
 
#define PUBLISH_CUSTOM_STATISTIC(TOPIC, ID, VALUE)   pal_statistics::getRegistry(TOPIC)->publishCustomStatistic(ID, VALUE)
 
#define PUBLISH_CUSTOM_STATISTICS_MSG(TOPIC, MSG)   pal_statistics::getRegistry(TOPIC)->publishCustomStatistics(MSG)
 
#define PUBLISH_STATISTICS(TOPIC)   pal_statistics::getRegistry(TOPIC)->publish();
 
#define REGISTER_MACRO_CHOOSER(...)
 
#define REGISTER_VARIABLE(...)   REGISTER_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
 
#define REGISTER_VARIABLE_3_ARGS(TOPIC, ID, VARIABLE)   customRegister(*pal_statistics::getRegistry(TOPIC), ID, VARIABLE);
 
#define REGISTER_VARIABLE_4_ARGS(TOPIC, ID, VARIABLE, BOOKKEEPING)   customRegister(*pal_statistics::getRegistry(TOPIC), ID, VARIABLE, BOOKKEEPING);
 
#define REGISTER_VARIABLE_SIMPLE(TOPIC, VARIABLE, BOOKKEEPING)   customRegister(*pal_statistics::getRegistry(TOPIC), #VARIABLE, VARIABLE, BOOKKEEPING);
 
#define START_PUBLISH_THREAD(TOPIC)   pal_statistics::getRegistry(TOPIC)->startPublishThread();
 
#define UNREGISTER_MACRO_CHOOSER(...)
 
#define UNREGISTER_VARIABLE(...)   UNREGISTER_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
 
#define UNREGISTER_VARIABLE_2_ARGS(TOPIC, ID)   pal_statistics::getRegistry(TOPIC)->unregisterVariable(ID);
 
#define UNREGISTER_VARIABLE_3_ARGS(TOPIC, ID, BOOKKEEPING)   pal_statistics::getRegistry(TOPIC)->unregisterVariable(ID, BOOKKEEPING);
 

Functions

boost::shared_ptr< StatisticsRegistry > pal_statistics::getRegistry (const std::string &topic)
 

Variables

constexpr char DEFAULT_STATISTICS_TOPIC [] = "pal_statistics"
 

Macro Definition Documentation

◆ GET_4TH_ARG

#define GET_4TH_ARG (   arg1,
  arg2,
  arg3,
  arg4,
  ... 
)    arg4

Definition at line 77 of file pal_statistics_macros.h.

◆ GET_5TH_ARG

#define GET_5TH_ARG (   arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  ... 
)    arg5

Definition at line 49 of file pal_statistics_macros.h.

◆ PUBLISH_ASYNC_STATISTICS

#define PUBLISH_ASYNC_STATISTICS (   TOPIC)    pal_statistics::getRegistry(TOPIC)->publishAsync();

Definition at line 63 of file pal_statistics_macros.h.

◆ PUBLISH_CUSTOM_STATISTIC

#define PUBLISH_CUSTOM_STATISTIC (   TOPIC,
  ID,
  VALUE 
)    pal_statistics::getRegistry(TOPIC)->publishCustomStatistic(ID, VALUE)

Definition at line 67 of file pal_statistics_macros.h.

◆ PUBLISH_CUSTOM_STATISTICS_MSG

#define PUBLISH_CUSTOM_STATISTICS_MSG (   TOPIC,
  MSG 
)    pal_statistics::getRegistry(TOPIC)->publishCustomStatistics(MSG)

Definition at line 69 of file pal_statistics_macros.h.

◆ PUBLISH_STATISTICS

#define PUBLISH_STATISTICS (   TOPIC)    pal_statistics::getRegistry(TOPIC)->publish();

Definition at line 61 of file pal_statistics_macros.h.

◆ REGISTER_MACRO_CHOOSER

#define REGISTER_MACRO_CHOOSER (   ...)
Value:

Definition at line 50 of file pal_statistics_macros.h.

◆ REGISTER_VARIABLE

#define REGISTER_VARIABLE (   ...)    REGISTER_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)

Definition at line 54 of file pal_statistics_macros.h.

◆ REGISTER_VARIABLE_3_ARGS

#define REGISTER_VARIABLE_3_ARGS (   TOPIC,
  ID,
  VARIABLE 
)    customRegister(*pal_statistics::getRegistry(TOPIC), ID, VARIABLE);

Definition at line 44 of file pal_statistics_macros.h.

◆ REGISTER_VARIABLE_4_ARGS

#define REGISTER_VARIABLE_4_ARGS (   TOPIC,
  ID,
  VARIABLE,
  BOOKKEEPING 
)    customRegister(*pal_statistics::getRegistry(TOPIC), ID, VARIABLE, BOOKKEEPING);

Definition at line 46 of file pal_statistics_macros.h.

◆ REGISTER_VARIABLE_SIMPLE

#define REGISTER_VARIABLE_SIMPLE (   TOPIC,
  VARIABLE,
  BOOKKEEPING 
)    customRegister(*pal_statistics::getRegistry(TOPIC), #VARIABLE, VARIABLE, BOOKKEEPING);

Definition at line 57 of file pal_statistics_macros.h.

◆ START_PUBLISH_THREAD

#define START_PUBLISH_THREAD (   TOPIC)    pal_statistics::getRegistry(TOPIC)->startPublishThread();

Definition at line 65 of file pal_statistics_macros.h.

◆ UNREGISTER_MACRO_CHOOSER

#define UNREGISTER_MACRO_CHOOSER (   ...)

◆ UNREGISTER_VARIABLE

#define UNREGISTER_VARIABLE (   ...)    UNREGISTER_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)

Definition at line 84 of file pal_statistics_macros.h.

◆ UNREGISTER_VARIABLE_2_ARGS

#define UNREGISTER_VARIABLE_2_ARGS (   TOPIC,
  ID 
)    pal_statistics::getRegistry(TOPIC)->unregisterVariable(ID);

Definition at line 72 of file pal_statistics_macros.h.

◆ UNREGISTER_VARIABLE_3_ARGS

#define UNREGISTER_VARIABLE_3_ARGS (   TOPIC,
  ID,
  BOOKKEEPING 
)    pal_statistics::getRegistry(TOPIC)->unregisterVariable(ID, BOOKKEEPING);

Definition at line 74 of file pal_statistics_macros.h.

Variable Documentation

◆ DEFAULT_STATISTICS_TOPIC

constexpr char DEFAULT_STATISTICS_TOPIC[] = "pal_statistics"
constexpr

MIT License

Copyright (c) 2019 PAL Robotics S.L.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 31 of file pal_statistics_macros.h.

GET_4TH_ARG
#define GET_4TH_ARG(arg1, arg2, arg3, arg4,...)
Definition: pal_statistics_macros.h:77
UNREGISTER_VARIABLE_2_ARGS
#define UNREGISTER_VARIABLE_2_ARGS(TOPIC, ID)
Definition: pal_statistics_macros.h:72
REGISTER_VARIABLE_3_ARGS
#define REGISTER_VARIABLE_3_ARGS(TOPIC, ID, VARIABLE)
Definition: pal_statistics_macros.h:44
UNREGISTER_VARIABLE_3_ARGS
#define UNREGISTER_VARIABLE_3_ARGS(TOPIC, ID, BOOKKEEPING)
Definition: pal_statistics_macros.h:74
GET_5TH_ARG
#define GET_5TH_ARG(arg1, arg2, arg3, arg4, arg5,...)
Definition: pal_statistics_macros.h:49
REGISTER_VARIABLE_4_ARGS
#define REGISTER_VARIABLE_4_ARGS(TOPIC, ID, VARIABLE, BOOKKEEPING)
Definition: pal_statistics_macros.h:46


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