ITS
LocationTableEntry.cpp
Go to the documentation of this file.
1 #include "LocationTableEntry.h"
2 
4 {
5  m_isNeighbour = 0;
6  m_version = 0;
7  m_stationType = 0;
8  m_lastTimestamp = 0;
9  m_lsPending = false;
10  for(int i = 0 ; i < 6 ; i++)
11  m_llAddr[i] = 0x00;
13  m_sequenceNumber = 0;
14 }
15 
16 LocationTableEntry::LocationTableEntry(LongPositionVector lpv, quint8 version, quint8 stationType, uchar* llAddr, bool* isNeighbour, bool lsPending, quint32 lastTimestamp, quint16 sequenceNumber)
17 {
22  for(int i=0; i<6; i++)
23  m_llAddr[i] = llAddr[i];
24  m_lpv = lpv;
25  m_lsPending = lsPending;
27 }
28 
30 {
31 }
32 
34 {
35  quint16 m_sequenceNumber = 0;
36 
37 
38  printf("\n"
39  "lastTimestamp: %u\n"
40  "version: %d\n"
41  "stationType: %d\n"
42  "macAddr: %x:%x:%x:%x:%x:%x\n"
43  "lpv=\n"
44  "\tgnAddr=\n"
45  "\t\tmid: %x:%x:%x:%x:%x:%x\n"
46  "\t\tMSTSCC: %d\n"
47  "\theading: %d\n"
48  "\tlatitude: %d\n"
49  "\tlongitude: %d\n"
50  "\tpai_speed: %d\n"
51  "\ttimestamp: %d\n"
52  "lsPending: %d\n"
53  "sequenceNumber: %d\n\n",
55  m_version,
57  m_llAddr[0], m_llAddr[1], m_llAddr[2], m_llAddr[3], m_llAddr[4], m_llAddr[5],
58  m_lpv.gnAddr().mid(0), m_lpv.gnAddr().mid(1), m_lpv.gnAddr().mid(2), m_lpv.gnAddr().mid(3), m_lpv.gnAddr().mid(4), m_lpv.gnAddr().mid(5),
60  m_lpv.heading(),
61  m_lpv.latitude(),
62  m_lpv.longitude(),
63  m_lpv.pai_Speed(),
64  m_lpv.timestamp(),
67  );
68 }
Location table entry definition.
LongPositionVector m_lpv
uchar m_llAddr[6]
bool * isNeighbour() const
isNeighbour Is the ITS-S my neighbour?
bool m_lsPending
quint32 timestamp() const
timestamp Timestamp field getter
quint16 m_sequenceNumber
LocationTableEntry()
LocationTableEntry LocationTableEntry constructor.
GnAddr gnAddr() const
gnAddr GnAddr field getter
quint16 heading() const
heading Heading field getter
quint8 m_stationType
uchar * llAddr()
llAddr LL address getter.
quint8 m_version
quint8 * mid()
mid MID field getter.
Definition: GnAddr.h:121
quint16 MStationTypeCountryCode() const
MStationTypeCountryCode Manually StationType CountryCode field getter.
Definition: GnAddr.h:116
quint8 version() const
version Version getter.
quint16 pai_Speed() const
pai_Speed Pai_Speed field getter (16 bits)
quint8 stationType() const
stationType Station type getter.
qint32 latitude() const
latitude Latitude field getter
quint32 lastTimestamp() const
lastTimestamp Last entry timestamp getter.
void print()
print Prints the entry informations.
bool * m_isNeighbour
~LocationTableEntry()
~LocationTableEntry LocationTableEntry destructor.
quint16 sequenceNumber() const
sequenceNumber Entry sequence number getter.
qint32 longitude() const
longitude Longitude field getter
quint32 m_lastTimestamp