libdoip
0.1.0
DoIP (Diagnostics over Internet Protocol) ISO 13400 C++17 Library
DoIPServerEvent.h
Go to the documentation of this file.
1
#ifndef DOIPEVENT_H
2
#define DOIPEVENT_H
3
4
#include <iostream>
5
6
namespace
doip
{
7
8
// DoIP Events
9
enum class
DoIPServerEvent
{
10
// Message events
11
RoutingActivationReceived
,
12
AliveCheckResponseReceived
,
13
DiagnosticMessageReceived
,
14
DiagnosticMessageReceivedDownstream
,
15
CloseRequestReceived
,
16
17
// Timer events
18
Initial_inactivity_timeout
,
19
GeneralInactivityTimeout
,
20
AliveCheckTimeout
,
21
DownstreamTimeout
,
22
23
// Error events
24
InvalidMessage
,
25
SocketError
26
};
27
28
// Stream operator for DoIPServerEvent
29
inline
std::ostream &
operator<<
(std::ostream &os,
DoIPServerEvent
event) {
30
switch
(event) {
31
case
DoIPServerEvent::RoutingActivationReceived
:
32
return
os <<
"RoutingActivationReceived"
;
33
case
DoIPServerEvent::AliveCheckResponseReceived
:
34
return
os <<
"AliveCheckResponseReceived"
;
35
case
DoIPServerEvent::DiagnosticMessageReceived
:
36
return
os <<
"DiagnosticMessageReceived"
;
37
case
DoIPServerEvent::DiagnosticMessageReceivedDownstream
:
38
return
os <<
"DiagnosticMessageReceivedDownstream"
;
39
case
DoIPServerEvent::CloseRequestReceived
:
40
return
os <<
"CloseRequestReceived"
;
41
case
DoIPServerEvent::Initial_inactivity_timeout
:
42
return
os <<
"Initial_inactivity_timeout"
;
43
case
DoIPServerEvent::GeneralInactivityTimeout
:
44
return
os <<
"GeneralInactivityTimeout"
;
45
case
DoIPServerEvent::AliveCheckTimeout
:
46
return
os <<
"AliveCheckTimeout"
;
47
case
DoIPServerEvent::InvalidMessage
:
48
return
os <<
"InvalidMessage"
;
49
case
DoIPServerEvent::SocketError
:
50
return
os <<
"SocketError"
;
51
case
DoIPServerEvent::DownstreamTimeout
:
52
return
os <<
"DownstreamTimeout"
;
53
default
:
54
return
os <<
"Unknown("
<<
static_cast<
int
>
(event) <<
")"
;
55
}
56
}
57
}
// namespace doip
58
59
#endif
/* DOIPEVENT_H */
doip
Definition:
AnsiColors.h:3
doip::DoIPServerEvent
DoIPServerEvent
Definition:
DoIPServerEvent.h:9
doip::DoIPServerEvent::DownstreamTimeout
@ DownstreamTimeout
doip::DoIPServerEvent::AliveCheckTimeout
@ AliveCheckTimeout
doip::DoIPServerEvent::DiagnosticMessageReceivedDownstream
@ DiagnosticMessageReceivedDownstream
doip::DoIPServerEvent::AliveCheckResponseReceived
@ AliveCheckResponseReceived
doip::DoIPServerEvent::RoutingActivationReceived
@ RoutingActivationReceived
doip::DoIPServerEvent::DiagnosticMessageReceived
@ DiagnosticMessageReceived
doip::DoIPServerEvent::CloseRequestReceived
@ CloseRequestReceived
doip::DoIPServerEvent::Initial_inactivity_timeout
@ Initial_inactivity_timeout
doip::DoIPServerEvent::SocketError
@ SocketError
doip::DoIPServerEvent::InvalidMessage
@ InvalidMessage
doip::DoIPServerEvent::GeneralInactivityTimeout
@ GeneralInactivityTimeout
doip::operator<<
std::ostream & operator<<(std::ostream &os, const ByteArray &arr)
Stream operator for ByteArray.
Definition:
ByteArray.h:303
inc
DoIPServerEvent.h
Generated by
1.9.1