RTC Toolkit
1.0.0
Main Page
Related Pages
Modules
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
~
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
~
Variables
a
c
d
e
f
h
i
l
m
n
o
p
r
s
t
v
w
Typedefs
a
c
d
f
l
m
o
p
r
s
t
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
v
w
Functions
b
c
d
e
f
g
l
m
o
p
r
s
t
w
Variables
Typedefs
Enumerations
Enumerator
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
reusableComponents
telRepub
src
mudpiProcessingError.hpp
Go to the documentation of this file.
1
11
#ifndef RTCTK_REUSABLECOMPONENT_TELREPUB_MUDPIPROCESSORERROR_HPP_
12
#define RTCTK_REUSABLECOMPONENT_TELREPUB_MUDPIPROCESSORERROR_HPP_
13
14
15
#include <system_error>
16
17
namespace
rtctk::telRepub
{
18
23
enum class
MudpiProcessingError
24
{
28
TopicIdOutOfRange = 1,
29
33
FrameIdOutOfRange,
34
38
SynchronizingSample,
39
43
MissingFrame,
44
48
TopicTooLong,
49
53
QueueOverflow
,
54
};
55
56
62
class
MudpiProcessorErrorCategory
:
public
std::error_category {
66
const
char
* name()
const
noexcept
override
{
67
return
"MudpiProcessingError"
;
68
}
69
73
std::string message(
int
ev)
const
noexcept
override
{
74
switch
(
static_cast<
MudpiProcessingError
>
(ev)) {
75
case
MudpiProcessingError::TopicIdOutOfRange:
76
return
"TopicId out of range"
;
77
case
MudpiProcessingError::FrameIdOutOfRange:
78
return
"FrameId out of range"
;
79
case
MudpiProcessingError::SynchronizingSample:
80
return
"Synchronizing sample due to Missing (jumped) sample(s)"
;
81
case
MudpiProcessingError::MissingFrame:
82
return
"Missing (skipped) frame in a sample"
;
83
case
MudpiProcessingError::TopicTooLong:
84
return
"Topic too long"
;
85
case
MudpiProcessingError::QueueOverflow
:
86
return
"Queue Overflow"
;
87
default
:
88
return
"unknown"
;
89
}
90
}
91
92
virtual
bool
equivalent(
const
std::error_code& code,
93
int
condition)
const
noexcept
override
{
94
return
false
;
95
}
96
};
97
103
inline
const
std::error_category&
GetMudpiProcessorErrorCategory
() {
104
static
const
MudpiProcessorErrorCategory
inst{};
105
return
inst;
106
}
107
113
inline
std::error_code
make_error_code
(
MudpiProcessingError
e) {
// NOLINT
114
return
{
static_cast<
int
>
(e),
GetMudpiProcessorErrorCategory
()};
115
}
116
117
}
// closing namespace rtctk::telRepub
118
119
namespace
std
{
120
template
<>
121
struct
is_error_code_enum<
rtctk
::
telRepub::MudpiProcessingError
> : true_type {};
122
}
// namespace std
123
124
125
126
#endif //RTCTK_REUSABLECOMPONENT_TELREPUB_MUDPIPROCESSORERROR_HPP_
127
128
129
rtctk::telRepub
Definition:
ddsPubThread.hpp:27
rtctk::telRepub::MudpiProcessorErrorCategory
MUDPI Processor error category.
Definition:
mudpiProcessingError.hpp:62
rtctk::telRepub::GetMudpiProcessorErrorCategory
const std::error_category & GetMudpiProcessorErrorCategory()
MudpiProcessing error category.
Definition:
mudpiProcessingError.hpp:103
rtctk::telRepub::MudpiProcessingError
MudpiProcessingError
MUDPI Processor errors.
Definition:
mudpiProcessingError.hpp:24
rtctk::telRepub::MudpiProcessingError::TopicIdOutOfRange
@ TopicIdOutOfRange
TopicId out of range.
rtctk::telRepub::make_error_code
std::error_code make_error_code(MudpiProcessingError e)
Create std::error_code from ProcessingError.
Definition:
mudpiProcessingError.hpp:113
std
Definition:
mudpiProcessingError.hpp:119
rtctk
Definition:
agnostictopicifPubSubTypes.cpp:31
Generated by
1.8.20