-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhil.py
326 lines (297 loc) · 18.9 KB
/
hil.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
import binascii
import socket
import sys
import time
import struct
import array
class HIL:
### Globals
SENDER_HASH_ID = 3364240679
SERVER_TCP_IP = '172.100.1.99' # DevSim or MainSim IP address, 100 for Dev and 99 for Main
SERVER_TCP_PORT = 31
SENDER_CLIENT_NAME = 'HiLClientOne\0'
BUFFER_SIZE = 1024
CONNECTED = False
REG_ACKNW = False
SCENARIO_RUNNING = False
NBACK_MESSAGE = 110
SCENARIO_TYPE_MESSAGE = 101
NBACK_TRIG = False
SCENARIO_TYPE_TRIG = False
SOCKET = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
TICK_RATE = 0.5 # in seconds
TICK_TIME = time.time()
TICK_COUNT = 1
<<<<<<< HEAD
VEHICLE_UPDATE_RATE = 0.25 # 4Hz in seconds
VEHICLE_UPDATE_TIME = time.time()
VEHICLE_AI_UPDATE_TIME = time.time() + 0.125
# Change this to suit your scenario; the vehicle id can be found in IOS->Tools->Object List->Look for top record
# VEHICLE_ID = 3268448171 # Motorway ID
# VEHICLE_ID2 = 2961788977 # Urban ID
# VEHICLE_ID3 = 3714039844 # Motorway Lead
# VEHICLE_ID4 = 877936871 # Urban Lead
=======
VEHICLE_UPDATE_RATE = 0.033 # in seconds
VEHICLE_UPDATE_TIME = time.time()
VEHICLE_ID = 3268448171 # Change this to suit your scenario; the vehicle id can be found in IOS->Tools->Object List->Look for top record
>>>>>>> 8beb788e94142b79e48300f8a1edd44969057393
MESSAGE = ''
### Messages
regMsgIDBytes = (0xFFFF0016).to_bytes(4, byteorder = 'little')
tickMsgIDBytes = (0xFFFF0010).to_bytes(4, byteorder = 'little')
regAckwMsgBytes = (0xFFFF0017).to_bytes(4, byteorder = 'little')
runMsgIDBytes = (0xFFFF000C).to_bytes(4, byteorder = 'little')
runAckwMsgIDBytes = (0xFFFF000E).to_bytes(4, byteorder = 'little')
stopMsgIDBytes = (0xFFFF000D).to_bytes(4, byteorder = 'little')
stopAckwMsgIDBytes = (0xFFFF000F).to_bytes(4, byteorder = 'little')
VEHICLE_UPDATE_MESSAGE = (0xFFFF0005).to_bytes(4, byteorder = 'little')
VEHICLE_AI_UPDATE_MESSAGE = (0xFFFF0004).to_bytes(4, byteorder = 'little')
VEHICLE_OWN_ID = (0xFFFFFFFF).to_bytes(4, byteorder = 'little')
EVENT_IN_V2 = (0xFFFF0015).to_bytes(4, byteorder = 'little')
MANUAL_CONTROL_ID = (0xFFFF0019).to_bytes(4, byteorder = 'little')
MANUAL_CONTROL_DELAY = (0).to_bytes(8, byteorder = 'little')
clientNameBytes = b'HiLClientOne\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
senderHashIDBytes = (SENDER_HASH_ID).to_bytes(4, byteorder = 'little')
BitPad6 = (0x000000).to_bytes(6, byteorder = 'little')
BitPad8 = (0x00000000).to_bytes(8, byteorder = 'little')
BitPad4 = (0x0000).to_bytes(4, byteorder = 'little')
BitPad2 = (0x00).to_bytes(2, byteorder = 'little')
BitPad50 = (0x00).to_bytes(50, byteorder = 'little')
clientNameLenBytes = (len('HiLClientOne')).to_bytes(8, byteorder = 'little')
MANUAL_CONTROL_MESSAGE_SIZE = (len(BitPad4 + MANUAL_CONTROL_ID + senderHashIDBytes + BitPad4 + bytes(array.array('d', [time.clock()])) + MANUAL_CONTROL_DELAY)).to_bytes(4, byteorder = 'little')
### Message sizes
regMsgSize = (len(BitPad4 + regMsgIDBytes + senderHashIDBytes + BitPad4 + bytes(array.array('d', [time.clock()])) + clientNameLenBytes + clientNameBytes)).to_bytes(4, byteorder = 'little')
tickMsgSize = (len(BitPad4 + BitPad8 + tickMsgIDBytes + senderHashIDBytes + BitPad4 + bytes(array.array('d', [time.clock()])))).to_bytes(4, byteorder = 'little')
runAckwMsgSize = (len(BitPad4 + runAckwMsgIDBytes + senderHashIDBytes + BitPad4 + bytes(array.array('d', [time.clock()])))).to_bytes(4, byteorder = 'little')
stopAckwMsgSize = (len(BitPad4 + stopAckwMsgIDBytes + senderHashIDBytes + BitPad4 + bytes(array.array('d', [time.clock()])))).to_bytes(4, byteorder = 'little')
regMsgBytes = regMsgSize + regMsgIDBytes + senderHashIDBytes + BitPad4 + bytes(array.array('d', [time.clock()])) + clientNameLenBytes + clientNameBytes
### Functions
def connect(self):
try:
print("CLIENT: Connecting to the HIL server " + self.SERVER_TCP_IP + ":" + str(self.SERVER_TCP_PORT))
self.SOCKET.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, True)
self.SOCKET.connect((self.SERVER_TCP_IP, socket.htons(31)))
self.SOCKET.setblocking(False)
self.CONNECTED = True
print("HIL: Connected")
except TypeError:
print("HIL: Connection failed")
self.disconnect()
def disconnect(self):
self.SOCKET.close()
def registerClient(self):
print("CLIENT: Attempting to register")
while self.REG_ACKNW == False:
self.SOCKET.sendall(self.regMsgBytes)
self.readMessage()
if self.MESSAGE[4:8] == self.regAckwMsgBytes:
print('HIL: Acknowledgement received')
self.REG_ACKNW = True
def readMessage(self):
try:
self.MESSAGE = self.SOCKET.recv(self.BUFFER_SIZE)
#print("HIL: Message received " + str(self.MESSAGE))
except (socket.error):
# Process message read errors
return
def processMessages(self):
messageSizeBytes = self.MESSAGE[0:4]
messageIdBytes = self.MESSAGE[4:8]
messageSenderBytes = self.MESSAGE[8:12]
messageTimestampBytes = self.MESSAGE[16:24]
messageId = struct.unpack('<I', messageIdBytes)[0]
if self.SCENARIO_RUNNING == False:
if messageIdBytes == self.runMsgIDBytes:
print("HIL: Scenario RUN message received ")
runAckwMsgBytes = self.runAckwMsgSize + self.runAckwMsgIDBytes + self.senderHashIDBytes + self.BitPad4 + bytes(array.array('d', [time.clock()]))
self.SOCKET.sendall(runAckwMsgBytes)
print('CLIENT: Scenario RUN acknowledgement sent')
self.SCENARIO_RUNNING = True
<<<<<<< HEAD
self.NBACK_TRIG = False
self.SCENARIO_TYPE_TRIG = False
=======
>>>>>>> 8beb788e94142b79e48300f8a1edd44969057393
message = str(messageId)
return message
else:
if messageIdBytes == self.stopMsgIDBytes:
print("HIL: Scenario STOP message received ")
stopAckwMsgBytes = self.stopAckwMsgSize + self.stopAckwMsgIDBytes + self.senderHashIDBytes + self.BitPad4 + bytes(array.array('d', [time.clock()]))
self.SOCKET.sendall(stopAckwMsgBytes)
print('CLIENT: Scenario STOP acknowledgement sent')
self.SCENARIO_RUNNING = False
message = str(messageId)
return message
elif messageIdBytes == self.EVENT_IN_V2:
# avoid multiple triggers from single event trigger hence, delay this for a second after an initial detection
<<<<<<< HEAD
messageParam1 = struct.unpack('<I', self.MESSAGE[24:28])[0]
messageParam2 = struct.unpack('<I', self.MESSAGE[28:32])[0]
messageParam3 = struct.unpack('<d', self.MESSAGE[32:40])[0]
if messageParam1 == self.NBACK_MESSAGE and self.NBACK_TRIG == False:
print("HIL: NBACK triggered")
self.NBACK_TRIG = True
message = str(messageId)+","+str(messageParam1)+","+str(messageParam2)+","+str(messageParam3)
return message
elif messageParam1 == self.SCENARIO_TYPE_MESSAGE and self.SCENARIO_TYPE_TRIG == False:
print("HIL: Scenario type message")
self.SCENARIO_TYPE_TRIG = True
message = str(messageId)+","+str(messageParam1)+","+str(messageParam2)+","+str(messageParam3)
return message
# Driving Performance is disabled due to unreliable behaviour of XPI HIL Server
#elif messageIdBytes == self.VEHICLE_UPDATE_MESSAGE:
#if time.time() - self.VEHICLE_UPDATE_TIME >= self.VEHICLE_UPDATE_RATE:
#self.VEHICLE_UPDATE_TIME = time.time()
## print("Vehicle message")
#messageVehicleId = struct.unpack('<I', self.MESSAGE[24:28])[0]
#messageFlags = struct.unpack('<I', self.MESSAGE[28:32])[0]
#messageFlagBits = bin(messageFlags)
#messageHeadLight = messageFlagBits[-1]
#messageBrakeLight = messageFlagBits[-2]
#messageReverseLight = messageFlagBits[-3]
#messageFogLight = messageFlagBits[-4]
#messageLeftIndicator = messageFlagBits[-5]
#messageRightIndicator = messageFlagBits[-6]
#messageHordOn = messageFlagBits[-7]
#messageEngineOn = messageFlagBits[-8]
#messageWheelScreeching = messageFlagBits[-9]
#messageHiBeamOn = messageFlagBits[-10]
#messageHandBrake = messageFlagBits[-11]
#messagePositionLatitude = struct.unpack('<d', self.MESSAGE[32:40])[0]
#messagePositionLongitude = struct.unpack('<d', self.MESSAGE[40:48])[0]
#messagePositionElevation = struct.unpack('<d', self.MESSAGE[48:56])[0]
#messagePositionX = struct.unpack('<d', self.MESSAGE[56:64])[0]
#messagePositionY = struct.unpack('<d', self.MESSAGE[64:72])[0]
#messagePositionZ = struct.unpack('<d', self.MESSAGE[72:80])[0]
#messageOrientationX = struct.unpack('<d', self.MESSAGE[80:88])[0]
#messageOrientationY = struct.unpack('<d', self.MESSAGE[88:96])[0]
#messageOrientationZ = struct.unpack('<d', self.MESSAGE[96:104])[0]
#messageVelocityX = struct.unpack('<d', self.MESSAGE[104:112])[0]
#messageVelocityY = struct.unpack('<d', self.MESSAGE[112:120])[0]
#messageVelocityZ = struct.unpack('<d', self.MESSAGE[120:128])[0]
#messageAccelerationX = struct.unpack('<d', self.MESSAGE[128:136])[0]
#messageAccelerationY = struct.unpack('<d', self.MESSAGE[136:144])[0]
#messageAccelerationZ = struct.unpack('<d', self.MESSAGE[144:152])[0]
#messageAngularVelocityX = struct.unpack('<d', self.MESSAGE[152:160])[0]
#messageAngularVelocityY = struct.unpack('<d', self.MESSAGE[160:168])[0]
#messageAngularVelocityZ = struct.unpack('<d', self.MESSAGE[168:176])[0]
#messageSteeringAngle = struct.unpack('<d', self.MESSAGE[176:184])[0]
#messageRpm = struct.unpack('<d', self.MESSAGE[184:192])[0]
#messageAcceleratorPedal = struct.unpack('<d', self.MESSAGE[192:200])[0]
#messageBrakePedal = struct.unpack('<d', self.MESSAGE[200:208])[0]
#messageClutchPedal = struct.unpack('<d', self.MESSAGE[208:216])[0]
#messageSteeringWheelAngle = struct.unpack('<d', self.MESSAGE[216:224])[0]
## signed int, from 1 to 6 number coresponds to the gear, automatic park = 7, automatic drive = 8, reverse = -1
#messageGear = struct.unpack('<i', self.MESSAGE[224:228])[0]
##print("Vehicle id: " + str(messageVehicleId))
##print("Vehicle flags: " + str(messageHandBrake))
##print("Vehicle Acceleration: " + str(messageAcceleratorPedal))
##print("Vehicle RPM: " + str(messageRpm))
##print("Vehicle Steering Angle: " + str(messageSteeringWheelAngle))
#message = str(messageId)+","+str(messageVehicleId)+","+str(messageHeadLight)+","+str(messageBrakeLight)+","+str(messageReverseLight)+","+str(messageFogLight)+","+str(messageLeftIndicator)+","+str(messageRightIndicator)+","+str(messageHordOn)+","+str(messageEngineOn)+","+str(messageWheelScreeching)+","+str(messageHiBeamOn)+","+str(messageHandBrake)+","+str(messagePositionLatitude)+","+str(messagePositionLongitude)+","+str(messagePositionElevation)+","+str(messagePositionX)+","+str(messagePositionY)+","+str(messagePositionZ)+","+str(messageOrientationX)+","+str(messageOrientationY)+","+str(messageOrientationZ)+","+str(messageVelocityX)+","+str(messageVelocityY)+","+str(messageVelocityZ)+","+str(messageAccelerationX)+","+str(messageAccelerationY)+","+str(messageAccelerationZ)+","+str(messageAngularVelocityX)+","+str(messageAngularVelocityY)+","+str(messageAngularVelocityZ)+","+str(messageSteeringAngle)+","+str(messageRpm)+","+str(messageAcceleratorPedal)+","+str(messageBrakePedal)+","+str(messageClutchPedal)+","+str(messageSteeringWheelAngle)+","+str(messageGear)
#return message
#elif messageIdBytes == self.VEHICLE_AI_UPDATE_MESSAGE:
#if time.time() - self.VEHICLE_AI_UPDATE_TIME >= self.VEHICLE_UPDATE_RATE:
#self.VEHICLE_AI_UPDATE_TIME = time.time()
## print("Vehicle AI message")
#messageVehicleId = struct.unpack('<I', self.MESSAGE[24:28])[0]
#messagePositionLatitude = struct.unpack('<d', self.MESSAGE[32:40])[0]
#messagePositionLongitude = struct.unpack('<d', self.MESSAGE[40:48])[0]
#messagePositionElevation = struct.unpack('<d', self.MESSAGE[48:56])[0]
#messagePositionX = struct.unpack('<d', self.MESSAGE[56:64])[0]
#messagePositionY = struct.unpack('<d', self.MESSAGE[64:72])[0]
#messagePositionZ = struct.unpack('<d', self.MESSAGE[72:80])[0]
#messageOrientationX = struct.unpack('<d', self.MESSAGE[80:88])[0]
#messageOrientationY = struct.unpack('<d', self.MESSAGE[88:96])[0]
#messageOrientationZ = struct.unpack('<d', self.MESSAGE[96:104])[0]
#messageVelocityX = struct.unpack('<d', self.MESSAGE[104:112])[0]
#messageVelocityY = struct.unpack('<d', self.MESSAGE[112:120])[0]
#messageVelocityZ = struct.unpack('<d', self.MESSAGE[120:128])[0]
#messageAccelerationX = struct.unpack('<d', self.MESSAGE[128:136])[0]
#messageAccelerationY = struct.unpack('<d', self.MESSAGE[136:144])[0]
#messageAccelerationZ = struct.unpack('<d', self.MESSAGE[144:152])[0]
#messageAngularVelocityX = struct.unpack('<d', self.MESSAGE[152:160])[0]
#messageAngularVelocityY = struct.unpack('<d', self.MESSAGE[160:168])[0]
#messageAngularVelocityZ = struct.unpack('<d', self.MESSAGE[168:176])[0]
#messageSteeringAngle = struct.unpack('<d', self.MESSAGE[176:184])[0]
#messageRpm = struct.unpack('<d', self.MESSAGE[184:192])[0]
#message = str(messageId)+","+str(messageVehicleId)+","+str(messagePositionLatitude)+","+str(messagePositionLongitude)+","+str(messagePositionElevation)+","+str(messagePositionX)+","+str(messagePositionY)+","+str(messagePositionZ)+","+str(messageOrientationX)+","+str(messageOrientationY)+","+str(messageOrientationZ)+","+str(messageVelocityX)+","+str(messageVelocityY)+","+str(messageVelocityZ)+","+str(messageAccelerationX)+","+str(messageAccelerationY)+","+str(messageAccelerationZ)+","+str(messageAngularVelocityX)+","+str(messageAngularVelocityY)+","+str(messageAngularVelocityZ)+","+str(messageSteeringAngle)+","+str(messageRpm)
#return message
=======
print("HIL: Scenario event in v2 triggered")
messageParam1 = struct.unpack('<I', self.MESSAGE[24:28])[0]
messageParam2 = struct.unpack('<I', self.MESSAGE[28:32])[0]
messageParam3 = struct.unpack('<d', self.MESSAGE[32:40])[0]
message = str(messageId)+","+str(messageParam1)+","+str(messageParam2)+","+str(messageParam3)
return message
elif messageIdBytes == self.VEHICLE_UPDATE_MESSAGE:
messageVehicleId = struct.unpack('<I', self.MESSAGE[24:28])[0]
# Check if a message arrived from the trainee vehicle
# Also check against data rate
if messageVehicleId == self.VEHICLE_ID and time.time() - self.VEHICLE_UPDATE_TIME >= self.VEHICLE_UPDATE_RATE:
#print('HIL: Vehicle update received')
self.VEHICLE_UPDATE_TIME = time.time()
messageFlags = struct.unpack('<I', self.MESSAGE[28:32])[0]
messageFlagBits = bin(messageFlags)
messageHeadLight = messageFlagBits[-1]
messageBrakeLight = messageFlagBits[-2]
messageReverseLight = messageFlagBits[-3]
messageFogLight = messageFlagBits[-4]
messageLeftIndicator = messageFlagBits[-5]
messageRightIndicator = messageFlagBits[-6]
messageHordOn = messageFlagBits[-7]
messageEngineOn = messageFlagBits[-8]
messageWheelScreeching = messageFlagBits[-9]
messageHiBeamOn = messageFlagBits[-10]
messageHandBrake = messageFlagBits[-11]
messagePositionLatitude = struct.unpack('<d', self.MESSAGE[32:40])[0]
messagePositionLongitude = struct.unpack('<d', self.MESSAGE[40:48])[0]
messagePositionElevation = struct.unpack('<d', self.MESSAGE[48:56])[0]
messagePositionX = struct.unpack('<d', self.MESSAGE[56:64])[0]
messagePositionY = struct.unpack('<d', self.MESSAGE[64:72])[0]
messagePositionZ = struct.unpack('<d', self.MESSAGE[72:80])[0]
messageOrientationX = struct.unpack('<d', self.MESSAGE[80:88])[0]
messageOrientationY = struct.unpack('<d', self.MESSAGE[88:96])[0]
messageOrientationZ = struct.unpack('<d', self.MESSAGE[96:104])[0]
messageVelocityX = struct.unpack('<d', self.MESSAGE[104:112])[0]
messageVelocityY = struct.unpack('<d', self.MESSAGE[112:120])[0]
messageVelocityZ = struct.unpack('<d', self.MESSAGE[120:128])[0]
messageAccelerationX = struct.unpack('<d', self.MESSAGE[128:136])[0]
messageAccelerationY = struct.unpack('<d', self.MESSAGE[136:144])[0]
messageAccelerationZ = struct.unpack('<d', self.MESSAGE[144:152])[0]
messageAngularVelocityX = struct.unpack('<d', self.MESSAGE[152:160])[0]
messageAngularVelocityY = struct.unpack('<d', self.MESSAGE[160:168])[0]
messageAngularVelocityZ = struct.unpack('<d', self.MESSAGE[168:176])[0]
messageSteeringAngle = struct.unpack('<d', self.MESSAGE[176:184])[0]
messageRpm = struct.unpack('<d', self.MESSAGE[184:192])[0]
messageAcceleratorPedal = struct.unpack('<d', self.MESSAGE[192:200])[0]
messageBrakePedal = struct.unpack('<d', self.MESSAGE[200:208])[0]
messageClutchPedal = struct.unpack('<d', self.MESSAGE[208:216])[0]
messageSteeringWheelAngle = struct.unpack('<d', self.MESSAGE[216:224])[0]
# signed int, from 1 to 6 number coresponds to the gear, automatic park = 7, automatic drive = 8, reverse = -1
messageGear = struct.unpack('<i', self.MESSAGE[224:228])[0]
#print("Vehicle id: " + str(messageVehicleId))
#print("Vehicle flags: " + str(messageHandBrake))
#print("Vehicle Acceleration: " + str(messageAcceleratorPedal))
#print("Vehicle RPM: " + str(messageRpm))
#print("Vehicle Steering Angle: " + str(messageSteeringWheelAngle))
message = str(messageId)+","+str(messageVehicleId)+","+str(messageHeadLight)+","+str(messageBrakeLight)+","+str(messageReverseLight)+","+str(messageFogLight)+","+str(messageLeftIndicator)+","+str(messageRightIndicator)+","+str(messageHordOn)+","+str(messageEngineOn)+","+str(messageWheelScreeching)+","+str(messageHiBeamOn)+","+str(messageHandBrake)+","+str(messagePositionLatitude)+","+str(messagePositionLongitude)+","+str(messagePositionElevation)+","+str(messagePositionX)+","+str(messagePositionY)+","+str(messagePositionZ)+","+str(messageOrientationX)+","+str(messageOrientationY)+","+str(messageOrientationZ)+","+str(messageVelocityX)+","+str(messageVelocityY)+","+str(messageVelocityZ)+","+str(messageAccelerationX)+","+str(messageAccelerationY)+","+str(messageAccelerationZ)+","+str(messageAngularVelocityX)+","+str(messageAngularVelocityY)+","+str(messageAngularVelocityZ)+","+str(messageSteeringAngle)+","+str(messageRpm)+","+str(messageAcceleratorPedal)+","+str(messageBrakePedal)+","+str(messageClutchPedal)+","+str(messageSteeringWheelAngle)+","+str(messageGear)
return message
>>>>>>> 8beb788e94142b79e48300f8a1edd44969057393
def tick(self):
if time.time() - self.TICK_TIME >= self.TICK_RATE:
#print("TICK: " + str(self.TICK_COUNT))
self.TICK_TIME = time.time()
self.TICK_COUNT += 1
countBytes = (self.TICK_COUNT).to_bytes(8, byteorder = 'little')
tickMsgBytes = self.tickMsgSize + self.tickMsgIDBytes + self.senderHashIDBytes + self.BitPad4 + bytes(array.array('d', [time.clock()])) + countBytes
self.SOCKET.sendall(tickMsgBytes)
def manualControlMessage(self):
print('CLIENT: Manual control message sent')
messageBytes = self.MANUAL_CONTROL_MESSAGE_SIZE + self.MANUAL_CONTROL_ID + self.senderHashIDBytes + self.BitPad4 + bytes(array.array('d', [time.clock()])) + self.MANUAL_CONTROL_DELAY
self.SOCKET.sendall(messageBytes)
<<<<<<< HEAD
=======
>>>>>>> 8beb788e94142b79e48300f8a1edd44969057393