Last change
on this file since 108 was 86, checked in by phudelai, 9 years ago |
Socket:
- Despecialisation de PacpusUDPSocket (anciennement spécialisée Airplug)
- Ajout d'une classe UDPSocket
CanDriver:
- Préparation au code du driver CAN Softing
- Ajout des libs pour la compilation
|
File size:
1.4 KB
|
Line | |
---|
1 | /*********************************************************************
|
---|
2 | // created: 2015/04/29
|
---|
3 | // filename: SoftingCanDriver.h
|
---|
4 | //
|
---|
5 | // author: Pierre Hudelaine
|
---|
6 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
7 | //
|
---|
8 | // version: $Id: $
|
---|
9 | //
|
---|
10 | // purpose: driver interface to use softing hardware
|
---|
11 | *********************************************************************/
|
---|
12 |
|
---|
13 |
|
---|
14 | #ifndef SOFTINGCANDRIVER_H
|
---|
15 | #define SOFTINGCANDRIVER_H
|
---|
16 |
|
---|
17 | #include <string>
|
---|
18 | #include <windows.h>
|
---|
19 |
|
---|
20 | #include "CanDriverBase.h"
|
---|
21 | #include "CanL2.h"
|
---|
22 | #include "../CanGatewayConfig.h"
|
---|
23 |
|
---|
24 | // Parameters using in automotive
|
---|
25 | #define TSEG1 11
|
---|
26 | #define TSEG2 4
|
---|
27 | #define PRESCALER_500 1
|
---|
28 | #define PRESCALER_125 4
|
---|
29 | #define SJW 1
|
---|
30 | #define SAMPLES 1
|
---|
31 | #define ACCEPTANCE_CODE_STD 0x0000
|
---|
32 | #define ACCEPTANCE_MASK_STD 0x0000
|
---|
33 | #define ACCEPTANCE_CODE_XTD 0x00000000
|
---|
34 | #define ACCEPTANCE_MASK_XTD 0x00000000
|
---|
35 | #define OUTPUT_CONTROL 0xFA
|
---|
36 | #define ACKNOLEDGMENT 1
|
---|
37 | #define ERRORFRAME 0
|
---|
38 |
|
---|
39 |
|
---|
40 | class CANGATEWAY_API SoftingCanDriver
|
---|
41 | : public CanDriverBase
|
---|
42 | {
|
---|
43 | public:
|
---|
44 | SoftingCanDriver(void);
|
---|
45 | ~SoftingCanDriver(void);
|
---|
46 |
|
---|
47 |
|
---|
48 | short initPort (void);
|
---|
49 | short cleanUpPort (void);
|
---|
50 | short sendFrame (struct CanFrame frame);
|
---|
51 | short receiveFrame (struct CanFrame &frame);
|
---|
52 | void waitReceivingFrame(void);
|
---|
53 |
|
---|
54 | void displayHardware(void);
|
---|
55 |
|
---|
56 | protected:
|
---|
57 |
|
---|
58 | private:
|
---|
59 |
|
---|
60 |
|
---|
61 | };
|
---|
62 |
|
---|
63 | #endif // SOFTINGCANDRIVER_H |
---|
Note:
See
TracBrowser
for help on using the repository browser.