src
Device
ProtocolMessage.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 SCHUNK GmbH & Co. KG
3
* Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef CPROTOCOLMESSAGE_H
19
#define CROTOCOLMESSAGE_H
20
21
#include "../Util/GlobalDefines.h"
22
23
class
CProtocolMessage
24
{
25
public
:
26
27
// ---- public data ----------------------------------------------------- ;
28
29
unsigned
long
m_uiMessageId
;
// Identifier 11-/29-Bit
30
// 11 bit in low word, 29 bit complete
31
unsigned
char
m_ucMessageLength
;
// number of data bytes (0-8)
32
unsigned
char
m_aucMessageData
[8];
// Array for up to 8 data bytes
33
unsigned
char
m_ucMessageState
;
// Bit coded information for state
34
bool
m_bRTRFlag
;
// RTR-Bit: 0=Dataframe, 1=Remoteframe
35
double
m_fTime
;
// time stamp in sec
36
int
m_iModuleId
;
// module bus address
37
38
// ---- constructors / destructor --------------------------------------- ;
39
41
CProtocolMessage
();
43
CProtocolMessage
(
const
CProtocolMessage
& rclProtocolMessage);
45
~CProtocolMessage
();
46
// ---- operators ------------------------------------------------------ ;
47
48
// assignment operator
49
CProtocolMessage
&
operator=
(
const
CProtocolMessage
& rclProtocolMessage);
50
};
51
52
typedef
struct
53
{
54
unsigned
char
m_aucMessageId[2];
55
unsigned
char
m_aucMessageData[8];
56
unsigned
char
m_ucMessageLength
;
57
}
CRS232Message
;
58
59
typedef
union
60
{
61
unsigned
char
aucData[4];
62
char
acData[4];
63
unsigned
short
auiData[2];
64
short
aiData[2];
65
unsigned
long
uiData
;
66
long
iData
;
67
float
fData
;
68
}
CProtocolData
;
69
70
#endif
CProtocolMessage::m_ucMessageState
unsigned char m_ucMessageState
Definition:
ProtocolMessage.h:33
CRS232Message
Definition:
ProtocolMessage.h:52
CProtocolMessage::operator=
CProtocolMessage & operator=(const CProtocolMessage &rclProtocolMessage)
Definition:
ProtocolMessage.cpp:58
CProtocolData
Definition:
ProtocolMessage.h:59
CProtocolMessage::m_ucMessageLength
unsigned char m_ucMessageLength
Definition:
ProtocolMessage.h:31
CProtocolData::fData
float fData
Definition:
ProtocolMessage.h:67
CProtocolMessage::m_uiMessageId
unsigned long m_uiMessageId
Definition:
ProtocolMessage.h:29
CProtocolMessage::m_iModuleId
int m_iModuleId
Definition:
ProtocolMessage.h:36
CProtocolData::uiData
unsigned long uiData
Definition:
ProtocolMessage.h:65
CRS232Message::m_ucMessageLength
unsigned char m_ucMessageLength
Definition:
ProtocolMessage.h:56
CProtocolMessage::CProtocolMessage
CProtocolMessage()
default constructor
Definition:
ProtocolMessage.cpp:27
CProtocolMessage
Definition:
ProtocolMessage.h:23
CProtocolMessage::m_fTime
double m_fTime
Definition:
ProtocolMessage.h:35
CProtocolMessage::~CProtocolMessage
~CProtocolMessage()
destructor
Definition:
ProtocolMessage.cpp:48
CProtocolMessage::m_aucMessageData
unsigned char m_aucMessageData[8]
Definition:
ProtocolMessage.h:32
CProtocolData::iData
long iData
Definition:
ProtocolMessage.h:66
CProtocolMessage::m_bRTRFlag
bool m_bRTRFlag
Definition:
ProtocolMessage.h:34
schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Sat May 7 2022 02:17:13