CanPeakSys.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef CANPEAKSYS_INCLUDEDEF_H
19 #define CANPEAKSYS_INCLUDEDEF_H
20 //-----------------------------------------------
21 #include <cob_generic_can/CanItf.h>
22 #include <libpcan/libpcan.h>
23 #include <cob_utilities/IniFile.h>
24 //-----------------------------------------------
25 
26 class CanPeakSys : public CanItf
27 {
28 public:
29  // --------------- Interface
30  CanPeakSys(const char* cIniFile);
31  ~CanPeakSys();
32  bool init_ret();
33  void init();
34  void destroy() {}
35  bool transmitMsg(CanMsg CMsg, bool bBlocking = true);
36  bool receiveMsg(CanMsg* pCMsg);
37  bool receiveMsgRetry(CanMsg* pCMsg, int iNrOfRetry);
38  bool receiveMsgTimeout(CanMsg* pCMsg, int nSecTimeout);
39  bool isObjectMode() { return false; }
40 
41 private:
42  // --------------- Types
43  HANDLE m_handle;
44 
48 
49  static const int c_iInterrupt;
50  static const int c_iPort;
51 };
52 //-----------------------------------------------
53 #endif
54 
bool receiveMsg(CanMsg *pCMsg)
Definition: CanPeakSys.cpp:147
bool transmitMsg(CanMsg CMsg, bool bBlocking=true)
Definition: CanPeakSys.cpp:117
void destroy()
Definition: CanPeakSys.h:34
void init()
Definition: CanPeakSys.cpp:58
static const int c_iPort
Definition: CanPeakSys.h:50
bool init_ret()
Definition: CanPeakSys.cpp:51
Definition: CanMsg.h:28
bool m_bInitialized
Definition: CanPeakSys.h:45
bool receiveMsgTimeout(CanMsg *pCMsg, int nSecTimeout)
Definition: CanPeakSys.cpp:229
Definition: CanItf.h:44
bool isObjectMode()
Definition: CanPeakSys.h:39
bool m_bSimuEnabled
Definition: CanPeakSys.h:47
static const int c_iInterrupt
Definition: CanPeakSys.h:49
bool receiveMsgRetry(CanMsg *pCMsg, int iNrOfRetry)
Definition: CanPeakSys.cpp:184
HANDLE m_handle
Definition: CanPeakSys.h:43
IniFile m_IniFile
Definition: CanPeakSys.h:46
CanPeakSys(const char *cIniFile)
Definition: CanPeakSys.cpp:32


cob_generic_can
Author(s): Christian Connette
autogenerated on Wed Apr 7 2021 02:11:52