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 
CProtocolMessage::m_ucMessageState
unsigned char m_ucMessageState
Definition: ProtocolMessage.h:33
CProtocolMessage::operator=
CProtocolMessage & operator=(const CProtocolMessage &rclProtocolMessage)
Definition: ProtocolMessage.cpp:58
CProtocolMessage::m_ucMessageLength
unsigned char m_ucMessageLength
Definition: ProtocolMessage.h:31
CProtocolMessage::m_uiMessageId
unsigned long m_uiMessageId
Definition: ProtocolMessage.h:29
CProtocolMessage::m_iModuleId
int m_iModuleId
Definition: ProtocolMessage.h:36
ProtocolMessage.h
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
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