source: pacpussensors/trunk/CanGateway/driver/VectorCanDriver.h@ 76

Last change on this file since 76 was 1, checked in by DHERBOMEZ Gérald, 12 years ago

ajout des capteurs CanGateway et Alasca

File size: 2.3 KB
RevLine 
[1]1/********************************************************************
2// created: 2006/08/07 - 14:14
3// filename: VectorCanDriver.h
4//
5// author: Gerald Dherbomez
6//
7// version: $Id: VectorCanDriver.h 1203 2012-08-02 11:58:15Z morasjul $
8//
9// purpose: Inherits from the CanDriver class
10// Reimplement all the virtual members of the CanDriverBase
11// class in order to be used with the Vector driver.
12// platform : Windows specific
13//
14*********************************************************************/
15
16#ifndef _VECTORCANDRIVER_H_
17#define _VECTORCANDRIVER_H_
18
19#include <windows.h>
20
21#include "CanDriverBase.h"
22#include "VCanD.h"
23
24class VectorCanDriver
25 : public CanDriverBase
26{
27public:
28 VectorCanDriver(void);
29 VectorCanDriver(unsigned int gHwTypeT, Vaccess gChannelMaskT, unsigned int gCanIdT, unsigned int gBitRateT,int gHwChannelT);
30 VectorCanDriver(int channel);
31 VectorCanDriver(int channel, unsigned int bitRate);
32 VectorCanDriver(char * /*dummy1*/, char * /*dummy2*/) {} // DON'T USE
33 ~VectorCanDriver(void);
34
35 Vstatus initPort (void);
36 Vstatus cleanUpPort (void);
37
38 Vstatus AcceptId(int id);
39 Vstatus AcceptIdRange(int deb,int fin);
40 //Vstatus sendFrame (unsigned char, unsigned char, unsigned char *, int);
41 //Vstatus receiveFrame (unsigned char *, unsigned char *, unsigned char *, int *);
42 Vstatus sendFrame (struct CanFrame frame);
43 Vstatus receiveFrame (struct CanFrame &frame);
44 void waitReceivingFrame(void);
45
46protected:
47
48private:
49 VportHandle gPortHandle; /*!< Handle to the AC2PCI CAN Card */
50 Vaccess gChannelMask; /*!< Mask to select the channel of the card (channel 0 or 1) */
51 Vaccess gPermissionMask; /*!< Mask of the channel selected */
52 unsigned int gCanId; /*!< Identificator of the CAN frame send by the card */
53 unsigned int gBitRate; /*!< Variable which defined the bitrate of the card */
54 unsigned int gHwType; /*!< Defined the type of the hardware use for CAN communication. for the moment the only possible value is HWTYPE_CANAC2PCI for the AC2PCI CAN Card */
55 int gHwChannel; /*!< Defined the channel of the card what we want used (channel 0 or 1) */
56 HANDLE gEventHandle; /*!< Handle on a windows event for known if a CAN frame is present on the frame's buffer of the card */
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.