VE Lua Documentation

Press F to search!

getDevices

Definition


-- @/lua/vehicle/powertrain.lua:882

local function getDevices()
  return powertrainDevices
end

Callers

@/lua/vehicle/extensions/simpleTripApp.lua
local function shouldExtensionLoad()
  return next(wheels.wheels) or not tableIsEmpty(powertrain.getDevices())
end
@/lua/vehicle/energyStorage.lua

  for _, device in pairs(powertrain.getDevices()) do
    if device.energyStorage then

  for _, device in pairs(powertrain.getDevices()) do
    if device.energyStorage then
@/lua/vehicle/controller/tech/cosimulationCoupling.lua
-- Gathers the Powertrain properties for the outgoing message.
local function gatherPowertrainProperties() master[4] = powertrain.getDevices() end
local function powertrainName2Ids(name)
  for k, dev in pairs(powertrain.getDevices()) do
    if string.find(name, dev.name) then
@/lua/vehicle/extensions/tech/vehicleSearcher.lua
  local pData = {}
  for _, device in pairs(powertrain.getDevices()) do
    pData[device.name] = {
@/lua/vehicle/extensions/vehicleStatsLogger.lua
local function updateDeviceStates()
  devices = powertrain.getDevices()
end
@/lua/vehicle/controller/tech/powertrainSensor.lua
  local latestReading = {}
  for _, device in pairs(powertrain.getDevices()) do
    local deviceData = {inputAV = device.inputAV, gearRatio = device.gearRatio, isBroken = device.isBroken, mode = device.mode}