-
Notifications
You must be signed in to change notification settings - Fork 0
/
VehicleData.py
129 lines (94 loc) · 3.36 KB
/
VehicleData.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
"""
A container for extended information for a vehicle
@version: 15.02.2012
@status: final
@author: Mathias Baur
@contact: [email protected]
"""
class C2XVehicleData ():
"""
Vehicle Data Object: A container for extended information for a V2X vehicle
"""
STATUS_NONE = 0
STATUS_WARNED = 1
STATUS_BROKEN_DOWN = 2
STATUS_IN_JAM = 3
STATUS_CAM_JAM_RECOGNITION = 4
STATUS_APPROACH = 5
STATUS_IN_CONSTRUCTIONSITE = 6
STATUS_RESET = 7
__desiredSpeed = -1
__desiredLane = 0
__oldPosition = None
__currentPosition = None
__storedMsg = None
__trace = None
__fcdList = None
__status = STATUS_NONE
__receivedDENMessages = []
__msgRelevanceHandler = None
__currentMsgAggregat = None
__displayValidityTime = 0.0
__currentDisplayContent = None
__driveability = 0.0
def __init__ (self,desSpeed,trace,driveability=0):
"""Constructor"""
self.__desiredSpeed = desSpeed
self.__trace = trace
self.__driveability = driveability
def setDesiredSpeed(self,desSpeed):
self.__desiredSpeed = desSpeed
def getDesiredSpeed(self):
return self.__desiredSpeed
def setDesiredLane(self,desLane):
self.__desiredLane = desLane
def getDesiredLane(self):
return self.__desiredLane
def getCurrentPosition(self):
return self.__currentPosition
def setCurrentPosition(self, position):
self.__currentPosition = position
def getOldPosition(self):
return self.__oldPosition
def setOldPosition(self, position):
self.__oldPosition = position
def setTrace(self,trace):
self.__trace = trace
def getTrace(self):
return self.__trace
def setFcdList(self,fcdList):
self.__fcdList = fcdList
def getFcdList(self):
return self.__fcdList
def getStatus(self):
return self.__status
def setStatus(self, status):
self.__status = status
def setDriveability(self,driveability):
self.__driveability = driveability
def getDriveability(self):
return self.__driveability
def setStoredMsg(self,storedMsg):
self.__storedMsg = storedMsg
def getStoredMsg(self):
return self.__storedMsg
def getReceivedDENMessages(self):
return self.__receivedDENMessages
def clearReceivedDENMessages(self):
self.__receivedDENMessages = []
def getMsgRelevanceHandler(self):
return self.__msgRelevanceHandler
def setMsgRelevanceHandler(self, msgRelevanceHandler):
self.__msgRelevanceHandler = msgRelevanceHandler
def getCurrentMsgAggregat(self):
return self.__currentMsgAggregat
def setCurrentMsgAggregat(self, currentMsgAggregat):
self.__currentMsgAggregat = currentMsgAggregat
def getDisplayValidityTime(self):
return self.__displayValidityTime
def setDisplayValidityTime(self, displayValidityTime):
self.__displayValidityTime = displayValidityTime
def getCurrentDisplayContent(self):
return self.__currentDisplayContent
def setCurrentDisplayContent(self, currentDisplayContent):
self.__currentDisplayContent = currentDisplayContent