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
unsigned long m_uiTimeOut
Definition: CP5X11Device.h:39
int reinit(unsigned char ucBaudRateId)
unsigned char m_teaser
Definition: CP5X11Device.h:40
int getDeviceError(int iErrorState)
int setMessageId(unsigned long uiMessageId)
CCP5X11Device()
default constructor
void setTimeOut(unsigned long uiTimeOut)
int writeDevice(CProtocolMessage &rclProtocolMessage)
virtual ~CCP5X11Device()
destructor
int readDevice(CProtocolMessage &rclProtocolMessage)
int clearReadQueue()
CStopWatch m_clTimer
Definition: CP5X11Device.h:41
unsigned char m_access
Definition: CP5X11Device.h:37
CCP5X11Device & operator=(const CCP5X11Device &rclCP5X11Device)
unsigned char m_hDevice
Definition: CP5X11Device.h:36


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