GE Lua Documentation

Press F to search!

encodeDoubleArray

Definition


-- @/lua/common/lpack.lua:71

local function encodeDoubleArray(tbl)
  local tsize = #tbl + 1 - (tbl[0] == nil and 1 or 0)
  return ffi.string(ffi.new(daType, tsize, tbl), 8 * tsize)
end

Callers

@/lua/vehicle/controller/tech/cosimulationCoupling.lua
      createMessage()
      udpSendSocket:send(lpack.encodeDoubleArray(msgOut))
      sendCtr, stepsSinceLastSend = sendCtr + 1, 0
          createMessage()
          udpSendSocket:send(lpack.encodeDoubleArray(msgOut))
          sendCtr, stepsSinceLastSend = sendCtr + 1, 0
@/lua/vehicle/controller/tech/vehicleSystemsCoupling.lua
local function sendUDP()
  local serialisedMsg = lpack.encodeDoubleArray(messageToSimulink)
  udpSendSocket:send(serialisedMsg)