source: pacpussensors/trunk/CanGateway/CanFrameBase.h@ 81

Last change on this file since 81 was 62, checked in by DHERBOMEZ Gérald, 10 years ago

correction of path

File size: 1022 bytes
Line 
1/*********************************************************************
2// created: 2008/2/28 - 16:47
3// filename: CanFrame.h
4//
5// author: Gerald Dherbomez
6// Copyright Heudiasyc UMR UTC/CNRS 6599
7//
8// version: $Id: $
9//
10// purpose: Abstract class
11//
12*********************************************************************/
13
14#pragma once
15#ifndef CANFRAMEBASE_H
16#define CANFRAMEBASE_H
17
18#include "driver/CanDriverBase.h"
19
20namespace pacpus {
21
22class CanFrameBase
23{
24public:
25 CanFrameBase(){}
26 ~CanFrameBase(){}
27
28 void setData(TimestampedCanFrame d) { d_ = d; }
29 virtual void decode() = 0;
30 virtual void * data() = 0;
31 virtual int size() = 0;
32 void setRoadTime(road_time_t rdt) { d_.time = rdt; }
33 void setTimeRange(road_timerange_t tmr) { d_.timerange = tmr; }
34 road_time_t time(){ return d_.time;}
35 road_timerange_t timerange(){ return d_.timerange;}
36
37protected:
38 TimestampedCanFrame d_;
39
40private:
41
42};
43
44}
45
46#endif // CANFRAMEBASE_H
Note: See TracBrowser for help on using the repository browser.