source: pacpussensors/trunk/driver/dataFrame.cpp@ 127

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

Integration of new modules:

  • GPS NMEA0183 decoder
  • Span CPT Decoder

Update of:

File size: 1.3 KB
Line 
1#include "sensor/dataFrame.h"
2
3
4#include <string.h>
5
6
7DataFrame::DataFrame( const char * frame, int length, road_time_t frameTime, road_timerange_t frameTimerange )
8: length_ (length), time_ (frameTime), timerange_(frameTimerange)
9{
10 data_ = new char[length];
11 memcpy(data_, frame, length);
12}
13
14
15
16DataFrame::~DataFrame ()
17{
18 if (data_ != NULL)
19 delete[] data_;
20}
21
22/*
23int DataFrame::getFrame(const char * frame)
24{
25 return 0;
26}
27
28
29road_time_t DataFrame::getTime()
30{
31 return 0;
32}
33
34
35road_timerange_t DataFrame::getTimerange()
36{
37 return 0;
38}
39*/
40
41/* QString getFrame() const { return data; }
42 road_time_t getFrameTime() const { return time; }
43 road_timerange_t getFrameTimerange() const { return timerange; }
44 void setFrame(QString const frame) { data = frame; }
45 void setFrameTime(road_time_t const t) { time = t;}
46 void setFrameTimerange(road_timerange_t const tr) { timerange = tr; }
47*/
48/*
49
50DataFrame& DataFrame::operator= (const DataFrame& frame)
51{
52
53
54 // f->time_ = time_;
55/*
56
57 char * data; = new char[frame.getFrame()] ;
58
59 f->data_*/
60
61
62
63/*
64 const string & string:: opérator =(const string &s) {
65
66delete [] mystr;
67mylen=s.mylen;
68mystr=new char [mylen+1];
69strcpy (mystr,s.mystr);
70return *this;
71}
72}
73
74
75//dest = source;*/
Note: See TracBrowser for help on using the repository browser.