CP5X11Device.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 CCP5X11DEVICE_H
19 #define CCP5X11DEVICE_H
20 
21 #include "../Device/ProtocolDevice.h"
22 #include "../Util/StopWatch.h"
23 
25 {
26  private:
27 
28  // ---- private data ---------------------------------------------------- ;
29 
30  // ---- private auxiliary functions ------------------------------------- ;
31 
32  protected:
33 
34  // ---- protected data -------------------------------------------------- ;
35 
36  unsigned char m_hDevice;
37  unsigned char m_access;
38 
39  unsigned long m_uiTimeOut;
40  unsigned char m_teaser;
42 
43  // ---- protected auxiliary functions ----------------------------------- ;
44 
45  int getDeviceError(int iErrorState);
46  int setBaudRate();
47  int setMessageId(unsigned long uiMessageId);
48  int clearReadQueue();
49  int reinit(unsigned char ucBaudRateId);
50  int readDevice(CProtocolMessage& rclProtocolMessage);
51  int writeDevice(CProtocolMessage& rclProtocolMessage);
52 
53  public:
54 
55  // ---- public data ----------------------------------------------------- ;
56 
57 
58 
59  // ---- constructors / destructor --------------------------------------- ;
60 
62  CCP5X11Device();
64  CCP5X11Device(const CCP5X11Device& rclCP5X11Device);
66  virtual ~CCP5X11Device();
67 
68  // ---- operators ------------------------------------------------------- ;
69 
70  // assignment operator
71  CCP5X11Device& operator=(const CCP5X11Device& rclCP5X11Device);
72 
73  // ---- query functions ------------------------------------------------- ;
74 
75  // ---- modify functions ------------------------------------------------ ;
76 
77  void setTimeOut(unsigned long uiTimeOut);
78 
79  // ---- I/O functions --------------------------------------------------- ;
80 
81 
82  // ---- exec functions -------------------------------------------------- ;
83 
84  int init();
85  int init(const char* acInitString);
86  int exit();
87 };
88 
89 #endif
CProtocolDevice
Definition: ProtocolDevice.h:29
CStopWatch
Definition: StopWatch.h:40
CCP5X11Device
Definition: CP5X11Device.h:24
CCP5X11Device::~CCP5X11Device
virtual ~CCP5X11Device()
destructor
Definition: CP5X11Device.cpp:209
CCP5X11Device::CCP5X11Device
CCP5X11Device()
default constructor
Definition: CP5X11Device.cpp:199
CCP5X11Device::m_uiTimeOut
unsigned long m_uiTimeOut
Definition: CP5X11Device.h:39
CCP5X11Device::init
int init()
Definition: CP5X11Device.cpp:254
CCP5X11Device::clearReadQueue
int clearReadQueue()
Definition: CP5X11Device.cpp:49
CCP5X11Device::setTimeOut
void setTimeOut(unsigned long uiTimeOut)
Definition: CP5X11Device.cpp:237
CCP5X11Device::exit
int exit()
Definition: CP5X11Device.cpp:373
CCP5X11Device::getDeviceError
int getDeviceError(int iErrorState)
Definition: CP5X11Device.cpp:32
CCP5X11Device::setBaudRate
int setBaudRate()
Definition: CP5X11Device.cpp:37
CCP5X11Device::reinit
int reinit(unsigned char ucBaudRateId)
Definition: CP5X11Device.cpp:55
CCP5X11Device::operator=
CCP5X11Device & operator=(const CCP5X11Device &rclCP5X11Device)
Definition: CP5X11Device.cpp:219
CProtocolMessage
Definition: ProtocolMessage.h:23
CCP5X11Device::m_clTimer
CStopWatch m_clTimer
Definition: CP5X11Device.h:41
CCP5X11Device::setMessageId
int setMessageId(unsigned long uiMessageId)
Definition: CP5X11Device.cpp:43
CCP5X11Device::m_teaser
unsigned char m_teaser
Definition: CP5X11Device.h:40
CCP5X11Device::m_hDevice
unsigned char m_hDevice
Definition: CP5X11Device.h:36
CCP5X11Device::readDevice
int readDevice(CProtocolMessage &rclProtocolMessage)
Definition: CP5X11Device.cpp:61
CCP5X11Device::m_access
unsigned char m_access
Definition: CP5X11Device.h:37
CCP5X11Device::writeDevice
int writeDevice(CProtocolMessage &rclProtocolMessage)
Definition: CP5X11Device.cpp:149


schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Sat May 7 2022 02:17:13