ProtocolMessage.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2012 SCHUNK GmbH & Co. KG
00003  * Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *   http://www.apache.org/licenses/LICENSE-2.0
00010 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #include "ProtocolMessage.h"
00019 #include <string.h>
00020 
00021 // ========================================================================== ;
00022 //                                                                            ;
00023 // ---- constructors / destructor ------------------------------------------- ;
00024 //                                                                            ;
00025 // ========================================================================== ;
00026 
00027 CProtocolMessage::CProtocolMessage() : 
00028                                                 m_uiMessageId(0), 
00029                                                 m_ucMessageLength(0), 
00030                                                 m_ucMessageState(0), 
00031                                                 m_bRTRFlag(false), 
00032                                                 m_fTime(0.0),
00033                                                 m_iModuleId(0)
00034 {
00035 }
00036 
00037 CProtocolMessage::CProtocolMessage(const CProtocolMessage& rclProtocolMessage) : 
00038                                                 m_uiMessageId(rclProtocolMessage.m_uiMessageId), 
00039                                                 m_ucMessageLength(rclProtocolMessage.m_ucMessageLength), 
00040                                                 m_ucMessageState(rclProtocolMessage.m_ucMessageState), 
00041                                                 m_bRTRFlag(rclProtocolMessage.m_bRTRFlag), 
00042                                                 m_fTime(rclProtocolMessage.m_fTime),
00043                                                 m_iModuleId(rclProtocolMessage.m_iModuleId)
00044 {
00045         memcpy(m_aucMessageData, rclProtocolMessage.m_aucMessageData, m_ucMessageLength);
00046 }
00047 
00048 CProtocolMessage::~CProtocolMessage()
00049 {
00050 }
00051 
00052 // ========================================================================== ;
00053 //                                                                            ;
00054 // ---- operators ----------------------------------------------------------- ;
00055 //                                                                            ;
00056 // ========================================================================== ;
00057 
00058 CProtocolMessage& CProtocolMessage::operator=(const CProtocolMessage& rclProtocolMessage)
00059 {
00060         m_uiMessageId = rclProtocolMessage.m_uiMessageId;
00061         m_ucMessageLength = rclProtocolMessage.m_ucMessageLength;
00062         m_ucMessageState = rclProtocolMessage.m_ucMessageState;
00063         m_bRTRFlag = rclProtocolMessage.m_bRTRFlag;
00064         m_fTime = rclProtocolMessage.m_fTime;
00065         m_iModuleId = rclProtocolMessage.m_iModuleId;
00066         memcpy(m_aucMessageData, rclProtocolMessage.m_aucMessageData, m_ucMessageLength);
00067         return *this;
00068 }
00069 


schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:13