-- This file is generated by tools/json2lua.js

local ffxiv_ipc_position3 = Proto("ffxiv_ipc_position3", "FFXIV-IPC POSITION3")

local position3_fields = {
  x = ProtoField.float("ffxiv_ipc_position3.x", "x", base.DEC),
  y = ProtoField.float("ffxiv_ipc_position3.y", "y", base.DEC),
  z = ProtoField.float("ffxiv_ipc_position3.z", "z", base.DEC),
}

ffxiv_ipc_position3.fields = position3_fields

function ffxiv_ipc_position3.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_position3, tvbuf)
  pktinfo.cols.info:set("POSITION3")

  local len = tvbuf:len()

  -- dissect the x field
  local x_tvbr = tvbuf:range(0, 4)
  local x_val  = x_tvbr:le_float()
  tree:add_le(position3_fields.x, x_tvbr, x_val)

  -- dissect the y field
  local y_tvbr = tvbuf:range(4, 4)
  local y_val  = y_tvbr:le_float()
  tree:add_le(position3_fields.y, y_tvbr, y_val)

  -- dissect the z field
  local z_tvbr = tvbuf:range(8, 4)
  local z_val  = z_tvbr:le_float()
  tree:add_le(position3_fields.z, z_tvbr, z_val)

  return len
end