ErrorReporting.h File Reference
#include <atomic>
#include <condition_variable>
#include <filesystem>
#include <fstream>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <thread>
#include <ArmarXCore/core/logging/Logging.h>
#include <ArmarXCore/core/util/PropagateConst.h>
#include "SlaveIdentifier.h"
+ Include dependency graph for ErrorReporting.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Entry
 Brief description of class Entry. More...
 
class  Reporter
 Brief description of class Reporter. More...
 
class  Reporting
 Brief description of class Reporting. More...
 

Namespaces

namespace  armarx
 This file offers overloads of toIce() and fromIce() functions for STL container types.
 
namespace  armarx::control
 
namespace  armarx::control::ethercat
 
namespace  armarx::control::ethercat::reporting
 

Macros

#define _detail_BUS_REPORT_CONSTRUCTION(bin, ...)
 
#define _detail_DEVICE_REPORT_CONSTRUCTION(devName, ...)
 
#define _detail_GENERAL_REPORT_CONSTRUCTION(...)
 
#define _detail_SLAVE_REPORT_CONSTRUCTION(_sid, ...)
 
#define BUS_DEBUG(bin, ...)
 
#define BUS_ERROR(bin, ...)
 
#define BUS_ERROR_LOCAL(reporter, bin, ...)
 
#define BUS_FATAL_AND_THROW(bin, ...)
 
#define BUS_INFO(bin, ...)
 
#define BUS_WARNING(bin, ...)
 
#define BUS_WARNING_LOCAL(reporter, bin, ...)
 
#define DEVICE_ERROR(deviceName, ...)
 
#define DEVICE_ERROR_LOCAL(reporter, deviceName, ...)
 
#define DEVICE_FATAL_AND_THROW(deviceName, ...)
 
#define DEVICE_INFO(deviceName, ...)
 
#define DEVICE_WARNING(deviceName, ...)
 
#define DEVICE_WARNING_LOCAL(reporter, deviceName, ...)
 
#define GENERAL_DEBUG(...)
 
#define GENERAL_ERROR(...)
 
#define GENERAL_INFO(...)
 
#define GENERAL_WARNING(...)
 
#define SLAVE_DEBUG(sid, ...)
 
#define SLAVE_ERROR(sid, ...)
 
#define SLAVE_ERROR_LOCAL(reporter, sid, ...)
 
#define SLAVE_FATAL_AND_THROW(sid, ...)
 
#define SLAVE_INFO(sid, ...)
 
#define SLAVE_WARNING(sid, ...)
 
#define SLAVE_WARNING_LOCAL(reporter, sid, ...)
 

Typedefs

using Reporting = reporting::Reporting
 
using ReportingEntry = reporting::Entry
 
using ReportingType = reporting::Type
 

Enumerations

enum class  Severity {
  Debug , Info , Warning , Error ,
  Fatal
}
 The Severity enum. More...
 
enum class  Type { Bus , Slave , Device , General }
 The Type enum. More...
 

Functions

std::ostream & operator<< (std::ostream &stream, const Severity &rhs)
 
std::ostream & operator<< (std::ostream &stream, const Type &rhs)
 

Macro Definition Documentation

◆ _detail_BUS_REPORT_CONSTRUCTION

#define _detail_BUS_REPORT_CONSTRUCTION ( bin,
... )
Value:
.errorType(armarx::control::ethercat::ReportingType::Bus) \
.metaInfo(__FILE__, __LINE__, ARMARX_FUNCTION) \
.message(__VA_ARGS__) \
#define ARMARX_FUNCTION
Definition Logging.h:122
Entry & message(const char *fmt, T... args)
Entry & busIterationNumber(std::uint64_t iteration)
Entry & metaInfo(const char *file, int line, const char *function)
reporting::Entry ReportingEntry

Definition at line 294 of file ErrorReporting.h.

◆ _detail_DEVICE_REPORT_CONSTRUCTION

#define _detail_DEVICE_REPORT_CONSTRUCTION ( devName,
... )
Value:
.errorType(armarx::control::ethercat::ReportingType::Device) \
.metaInfo(__FILE__, __LINE__, ARMARX_FUNCTION) \
.message(__VA_ARGS__) \
.deviceName(devName)
Entry & deviceName(const char *deviceName)

Definition at line 352 of file ErrorReporting.h.

◆ _detail_GENERAL_REPORT_CONSTRUCTION

#define _detail_GENERAL_REPORT_CONSTRUCTION ( ...)
Value:
.errorType(armarx::control::ethercat::ReportingType::General) \
.metaInfo(__FILE__, __LINE__, ARMARX_FUNCTION) \
.message(__VA_ARGS__)

Definition at line 273 of file ErrorReporting.h.

◆ _detail_SLAVE_REPORT_CONSTRUCTION

#define _detail_SLAVE_REPORT_CONSTRUCTION ( _sid,
... )
Value:
.errorType(armarx::control::ethercat::ReportingType::Slave) \
.metaInfo(__FILE__, __LINE__, ARMARX_FUNCTION) \
.message(__VA_ARGS__) \
Entry & slaveIdentifier(SlaveIdentifier sid)

Definition at line 323 of file ErrorReporting.h.

◆ BUS_DEBUG

#define BUS_DEBUG ( bin,
... )
Value:

Definition at line 301 of file ErrorReporting.h.

◆ BUS_ERROR

#define BUS_ERROR ( bin,
... )

◆ BUS_ERROR_LOCAL

#define BUS_ERROR_LOCAL ( reporter,
bin,
... )
Value:
(reporter).reportError(_detail_BUS_REPORT_CONSTRUCTION(bin, __VA_ARGS__))

Definition at line 319 of file ErrorReporting.h.

◆ BUS_FATAL_AND_THROW

#define BUS_FATAL_AND_THROW ( bin,
... )

◆ BUS_INFO

#define BUS_INFO ( bin,
... )

◆ BUS_WARNING

#define BUS_WARNING ( bin,
... )

◆ BUS_WARNING_LOCAL

#define BUS_WARNING_LOCAL ( reporter,
bin,
... )
Value:
(reporter).reportWarning(_detail_BUS_REPORT_CONSTRUCTION(bin, __VA_ARGS__))

Definition at line 317 of file ErrorReporting.h.

◆ DEVICE_ERROR

#define DEVICE_ERROR ( deviceName,
... )
Value:

Definition at line 365 of file ErrorReporting.h.

◆ DEVICE_ERROR_LOCAL

#define DEVICE_ERROR_LOCAL ( reporter,
deviceName,
... )
Value:
(reporter).reportError(_detail_DEVICE_REPORT_CONSTRUCTION(deviceName, __VA_ARGS__))

Definition at line 374 of file ErrorReporting.h.

◆ DEVICE_FATAL_AND_THROW

#define DEVICE_FATAL_AND_THROW ( deviceName,
... )

◆ DEVICE_INFO

#define DEVICE_INFO ( deviceName,
... )

◆ DEVICE_WARNING

#define DEVICE_WARNING ( deviceName,
... )

◆ DEVICE_WARNING_LOCAL

#define DEVICE_WARNING_LOCAL ( reporter,
deviceName,
... )
Value:
(reporter).reportWarning(_detail_DEVICE_REPORT_CONSTRUCTION(deviceName, __VA_ARGS__))

Definition at line 372 of file ErrorReporting.h.

◆ GENERAL_DEBUG

#define GENERAL_DEBUG ( ...)
Value:

Definition at line 279 of file ErrorReporting.h.

◆ GENERAL_ERROR

#define GENERAL_ERROR ( ...)

◆ GENERAL_INFO

#define GENERAL_INFO ( ...)

◆ GENERAL_WARNING

#define GENERAL_WARNING ( ...)

◆ SLAVE_DEBUG

#define SLAVE_DEBUG ( sid,
... )
Value:

Definition at line 330 of file ErrorReporting.h.

◆ SLAVE_ERROR

#define SLAVE_ERROR ( sid,
... )

◆ SLAVE_ERROR_LOCAL

#define SLAVE_ERROR_LOCAL ( reporter,
sid,
... )
Value:
(reporter).reportError(_detail_SLAVE_REPORT_CONSTRUCTION(sid, __VA_ARGS__))

Definition at line 348 of file ErrorReporting.h.

◆ SLAVE_FATAL_AND_THROW

#define SLAVE_FATAL_AND_THROW ( sid,
... )

◆ SLAVE_INFO

#define SLAVE_INFO ( sid,
... )

◆ SLAVE_WARNING

#define SLAVE_WARNING ( sid,
... )

◆ SLAVE_WARNING_LOCAL

#define SLAVE_WARNING_LOCAL ( reporter,
sid,
... )
Value:
(reporter).reportWarning(_detail_SLAVE_REPORT_CONSTRUCTION(sid, __VA_ARGS__))

Definition at line 346 of file ErrorReporting.h.