`platoonFunctions.lua`
> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.
This Source Code Form is subject to the terms of the bCDDL, v. 1.1. If a copy of the bCDDL was not distributed with this file, You can obtain one at http://beamng.com/bCDDL-1.1.txt
Module variable: M
Hooks
onExtensionLoadedonUpdate
Exported Functions
M.onExtensionLoaded()
Line 358
Returns: M
M.onUpdate(dtReal, dtSim, dtRaw)
Line 332
Public interface
Returns: M
M.leavePlatoon(leaderID, vid)
Line 243
M.loadWithID(leaderID, vid, speed, debugFlag)
Line 192
end of Platoon Architecure file replacement code--------------------------------
M.joinWithID(leaderID, vid, speed, debugFlag)
Line 220
M.changeSpeed(speed)
Line 38
M.launchPlatoon(leaderID, leaderMode, speed)
Line 250
M.endPlatoon(platoonID)
Line 258
M.leaderExitPlatoon(leaderID)
Line 273
ADDED for NFSA
M.splitPlatoon(leaderID, vehicleID)
Line 301
M.createPlatoon(leaderID, sensorID)
Line 44
start Platoon Architecure file replacement code-----------------------------
M.addVehicleToPlatoon(leaderID, vehicleID, sensorID)
Line 73
Function to add a vehicle to the platoon based on the leader's ID
M.removeVehicleFromPlatoon(vehiclesData)
Line 121
Function to remove a vehicle from a platoon based on the leader's ID
M.changePlatoonLeaderID(oldleaderID)
Line 155
M.printPlatoons()
Line 179
M.getVehicleIndex(leaderID, vehicleID)
Line 52
Returns: i -- Return the index of the vehicle in the platoon
M.joinInBetween(leaderID, relayVehicleID, externalVehicleID, speed, debugFlag)
Line 313
M.getRelayVehiclesID(leaderID, vehicleIndex)
Line 107
M.addVehicleInPlatoon(leaderID, index, vehicleID, sensorID)
Line 90
Exported Variables
M.onExtensionUnloaded
Line 359 - unload
M.load
Line 361 - load
M.leaderExitPlatoonByPlatoonID
Line 367 - leaderExitPlatoonByPlatoonID
M.leaderExitPlatoonByLeaderID
Line 368 - leaderExitPlatoonByLeaderID
Internal Functions
Show internal functions
changeSpeed(speed)(line 38)createPlatoon(leaderID, sensorID)(line 44)start Platoon Architecure file replacement code-----------------------------
getVehicleIndex(leaderID, vehicleID)(line 52)addVehicleToPlatoon(leaderID, vehicleID, sensorID)(line 73)Function to add a vehicle to the platoon based on the leader's ID
addVehicleInPlatoon(leaderID, index, vehicleID, sensorID)(line 90)getRelayVehiclesID(leaderID, vehicleIndex)(line 107)removeVehicleFromPlatoon(vehiclesData)(line 121)Function to remove a vehicle from a platoon based on the leader's ID
changePlatoonLeaderID(oldleaderID)(line 155)printPlatoons()(line 179)loadWithID(leaderID, vid, speed, debugFlag)(line 192)end of Platoon Architecure file replacement code--------------------------------
joinWithID(leaderID, vid, speed, debugFlag)(line 220)leavePlatoon(leaderID, vid)(line 243)launchPlatoon(leaderID, leaderMode, speed)(line 250)endPlatoon(platoonID)(line 258)leaderExitPlatoon(leaderID)(line 273)ADDED for NFSA
splitPlatoon(leaderID, vehicleID)(line 301)joinInBetween(leaderID, relayVehicleID, externalVehicleID, speed, debugFlag)(line 313)onUpdate(dtReal, dtSim, dtRaw)(line 332)