ProtocolMessage.cpp
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 #include "ProtocolMessage.h"
19 #include <string.h>
20 
21 // ========================================================================== ;
22 // ;
23 // ---- constructors / destructor ------------------------------------------- ;
24 // ;
25 // ========================================================================== ;
26 
28  m_uiMessageId(0),
29  m_ucMessageLength(0),
30  m_ucMessageState(0),
31  m_bRTRFlag(false),
32  m_fTime(0.0),
33  m_iModuleId(0)
34 {
35 }
36 
38  m_uiMessageId(rclProtocolMessage.m_uiMessageId),
39  m_ucMessageLength(rclProtocolMessage.m_ucMessageLength),
40  m_ucMessageState(rclProtocolMessage.m_ucMessageState),
41  m_bRTRFlag(rclProtocolMessage.m_bRTRFlag),
42  m_fTime(rclProtocolMessage.m_fTime),
43  m_iModuleId(rclProtocolMessage.m_iModuleId)
44 {
45  memcpy(m_aucMessageData, rclProtocolMessage.m_aucMessageData, m_ucMessageLength);
46 }
47 
49 {
50 }
51 
52 // ========================================================================== ;
53 // ;
54 // ---- operators ----------------------------------------------------------- ;
55 // ;
56 // ========================================================================== ;
57 
59 {
60  m_uiMessageId = rclProtocolMessage.m_uiMessageId;
61  m_ucMessageLength = rclProtocolMessage.m_ucMessageLength;
62  m_ucMessageState = rclProtocolMessage.m_ucMessageState;
63  m_bRTRFlag = rclProtocolMessage.m_bRTRFlag;
64  m_fTime = rclProtocolMessage.m_fTime;
65  m_iModuleId = rclProtocolMessage.m_iModuleId;
66  memcpy(m_aucMessageData, rclProtocolMessage.m_aucMessageData, m_ucMessageLength);
67  return *this;
68 }
69 
unsigned char m_ucMessageState
unsigned char m_aucMessageData[8]
CProtocolMessage & operator=(const CProtocolMessage &rclProtocolMessage)
unsigned char m_ucMessageLength
unsigned long m_uiMessageId
~CProtocolMessage()
destructor
CProtocolMessage()
default constructor


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