m2etis
0.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
MessageType.h
Go to the documentation of this file.
1
/*
2
Copyright (2016) Michael Baer, Daniel Bonrath, All rights reserved.
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
22
#ifndef __M2ETIS_MESSAGE_MESSAGETYPE_H__
23
#define __M2ETIS_MESSAGE_MESSAGETYPE_H__
24
25
#include <cstdint>
26
27
namespace
m2etis
{
28
namespace
message {
29
30
// Mask to calculate the message Number
31
static
const
uint32_t
MSG_TYPE_MASK
= 65535;
// bit 0-15
32
static
const
uint32_t
ACTION_TYPE_MASK
= 4294901760;
// bit 16-31
33
34
// Defining type for messages on a certain channel. May change on embedded architectures. Therefore defined here as typedef
35
typedef
uint32_t
MessageType
;
36
37
enum
ActionType
: uint32_t {
38
NONE
= 1<<16,
// 65536
39
SUBSCRIBE
= 1<<17,
// 131072
40
UNSUBSCRIBE
= 1<<18,
// 262144
41
PUBLISH
= 1<<19,
// 524288
42
CONTROL
= 1<<20,
// 1048576
43
NOTIFY
= 1<<21,
// 2097152
44
JOIN
= 1<<22,
// 4194304
45
STATE
= 1<<23,
// 8388608
46
LEAVE
= 1<<24,
// 16777216
47
};
48
49
}
/* namespace message */
50
}
/* namespace m2etis */
51
52
#endif
/* __M2ETIS_MESSAGE_MESSAGETYPE_H__ */
53
m2etis::message::CONTROL
Definition:
MessageType.h:42
m2etis::message::MSG_TYPE_MASK
static const uint32_t MSG_TYPE_MASK
Definition:
MessageType.h:31
m2etis::message::JOIN
Definition:
MessageType.h:44
m2etis::message::NONE
Definition:
MessageType.h:38
m2etis::message::NOTIFY
Definition:
MessageType.h:43
m2etis::message::UNSUBSCRIBE
Definition:
MessageType.h:40
m2etis::message::PUBLISH
Definition:
MessageType.h:41
m2etis::message::LEAVE
Definition:
MessageType.h:46
m2etis
Definition:
DetMergeConfigTest.h:20
m2etis::message::SUBSCRIBE
Definition:
MessageType.h:39
m2etis::message::STATE
Definition:
MessageType.h:45
m2etis::message::MessageType
uint32_t MessageType
Definition:
MessageType.h:35
m2etis::message::ActionType
ActionType
Definition:
MessageType.h:37
m2etis::message::ACTION_TYPE_MASK
static const uint32_t ACTION_TYPE_MASK
Definition:
MessageType.h:32
Projekte
m2etis
library
include
m2etis
message
MessageType.h
Generated on Mon Jan 25 2016 01:06:05 for m2etis by
1.8.9.1