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 
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 
43  CProtocolMessage(const CProtocolMessage& rclProtocolMessage);
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;
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;
69 
70 #endif
unsigned char m_ucMessageState
unsigned char m_aucMessageData[8]
CProtocolMessage & operator=(const CProtocolMessage &rclProtocolMessage)
unsigned char m_ucMessageLength
unsigned long m_uiMessageId
unsigned long uiData
unsigned char m_ucMessageLength
~CProtocolMessage()
destructor
CProtocolMessage()
default constructor


schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Mon Nov 25 2019 03:48:19