ITS
LongPositionVector.h
Go to the documentation of this file.
1 
16 #ifndef LongPositionVector_H
17 #define LongPositionVector_H
18 
19 #include <GnAddr.h>
20 #include <ShortPositionVector.h>
21 #include <QByteArray>
22 #include <QDataStream>
23 
25 {
26 public:
30  enum e_helper
31  {
33  };
34 
35 
36  /* Constructors */
50  LongPositionVector(GnAddr gnA, quint32 tmstmp, qint32 lat, qint32 lon, quint16 paiSpeed, quint16 head);
62  LongPositionVector(GnAddr gnA, quint32 tmstmp, qint32 lat, qint32 lon, quint8 pai, quint16 speed, quint16 head);
73  LongPositionVector(char* data, int *offset);
74 
75  /* API */
76 
87  quint64 extract(uchar* packet);
88 
93  QByteArray toHex();
94 
95  /* Getters */
100  GnAddr gnAddr() const {return m_gnAddr;}
105  quint32 timestamp() const {return m_timestamp;}
110  qint32 latitude() const {return m_latitude;}
115  qint32 longitude() const {return m_longitude;}
120  quint16 pai_Speed() const {return m_pai_Speed;}
125  quint8 pai() const {return (m_pai_Speed & 0x8000) >> 15;}
130  quint16 speed() const {return (m_pai_Speed & 0x7FF);}
135  quint16 heading() const {return m_heading;}
136 
137 private:
139  quint32 m_timestamp;
140  qint32 m_latitude;
141  qint32 m_longitude;
142  quint16 m_pai_Speed;
143  quint16 m_heading;
144 };
145 
146 #endif // _LongPositionVector_H_
GeoNet Address class.
LongPositionVector & operator=(const LongPositionVector &other)
operator = Overload of = operator
quint16 speed() const
speed Speed field getter (15 bits)
SPV definition.
e_helper
The e_helper enum is used to help to have sizes.
quint32 timestamp() const
timestamp Timestamp field getter
GnAddr gnAddr() const
gnAddr GnAddr field getter
quint16 heading() const
heading Heading field getter
quint64 extract(uchar *packet)
extract Fill the LongPositionVector with values contained in the packet
LongPositionVector()
LongPositionVector Default constructor.
quint16 pai_Speed() const
pai_Speed Pai_Speed field getter (16 bits)
qint32 latitude() const
latitude Latitude field getter
QByteArray toHex()
toHex Create a QByteArray containing the hexadecimal format of the LongPositionVector.
Definition: GnAddr.h:28
quint8 pai() const
pai Pai field getter (1 bit)
qint32 longitude() const
longitude Longitude field getter