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

local ffxiv_ipc_content_finder_progress = Proto("ffxiv_ipc_content_finder_progress", "FFXIV-IPC Content Finder Progress")

local content_finder_progress_fields = {
  unknown1       = ProtoField.uint32("ffxiv_ipc_content_finder_progress.unknown1", "Unknown1", base.DEC),
  unknown2       = ProtoField.uint16("ffxiv_ipc_content_finder_progress.unknown2", "Unknown2", base.DEC),
  wait_order     = ProtoField.uint8("ffxiv_ipc_content_finder_progress.wait_order", "WaitOrder", base.DEC),
  wait_time      = ProtoField.uint8("ffxiv_ipc_content_finder_progress.wait_time", "WaitTime", base.DEC),
  current_tank   = ProtoField.uint8("ffxiv_ipc_content_finder_progress.current_tank", "CurrentTank", base.DEC),
  require_tank   = ProtoField.uint8("ffxiv_ipc_content_finder_progress.require_tank", "RequireTank", base.DEC),
  current_health = ProtoField.uint8("ffxiv_ipc_content_finder_progress.current_health", "CurrentHealth", base.DEC),
  require_health = ProtoField.uint8("ffxiv_ipc_content_finder_progress.require_health", "RequireHealth", base.DEC),
  current_dps    = ProtoField.uint8("ffxiv_ipc_content_finder_progress.current_dps", "CurrentDPS", base.DEC),
  require_dps    = ProtoField.uint8("ffxiv_ipc_content_finder_progress.require_dps", "RequireDPS", base.DEC),
  unknown4       = ProtoField.uint16("ffxiv_ipc_content_finder_progress.unknown4", "Unknown4", base.DEC),
}

ffxiv_ipc_content_finder_progress.fields = content_finder_progress_fields

function ffxiv_ipc_content_finder_progress.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_content_finder_progress, tvbuf)
  pktinfo.cols.info:set("Content Finder Progress")

  local len = tvbuf:len()

  -- dissect the unknown1 field
  local unknown1_tvbr = tvbuf:range(0, 4)
  local unknown1_val  = unknown1_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.unknown1, unknown1_tvbr, unknown1_val)

  -- dissect the unknown2 field
  local unknown2_tvbr = tvbuf:range(4, 2)
  local unknown2_val  = unknown2_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.unknown2, unknown2_tvbr, unknown2_val)

  -- dissect the wait_order field
  local wait_order_tvbr = tvbuf:range(6, 1)
  local wait_order_val  = wait_order_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.wait_order, wait_order_tvbr, wait_order_val)

  -- dissect the wait_time field
  local wait_time_tvbr = tvbuf:range(7, 1)
  local wait_time_val  = wait_time_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.wait_time, wait_time_tvbr, wait_time_val)

  -- dissect the current_tank field
  local current_tank_tvbr = tvbuf:range(8, 1)
  local current_tank_val  = current_tank_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.current_tank, current_tank_tvbr, current_tank_val)

  -- dissect the require_tank field
  local require_tank_tvbr = tvbuf:range(9, 1)
  local require_tank_val  = require_tank_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.require_tank, require_tank_tvbr, require_tank_val)

  -- dissect the current_health field
  local current_health_tvbr = tvbuf:range(10, 1)
  local current_health_val  = current_health_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.current_health, current_health_tvbr, current_health_val)

  -- dissect the require_health field
  local require_health_tvbr = tvbuf:range(11, 1)
  local require_health_val  = require_health_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.require_health, require_health_tvbr, require_health_val)

  -- dissect the current_dps field
  local current_dps_tvbr = tvbuf:range(12, 1)
  local current_dps_val  = current_dps_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.current_dps, current_dps_tvbr, current_dps_val)

  -- dissect the require_dps field
  local require_dps_tvbr = tvbuf:range(13, 1)
  local require_dps_val  = require_dps_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.require_dps, require_dps_tvbr, require_dps_val)

  -- dissect the unknown4 field
  local unknown4_tvbr = tvbuf:range(14, 2)
  local unknown4_val  = unknown4_tvbr:le_uint()
  tree:add_le(content_finder_progress_fields.unknown4, unknown4_tvbr, unknown4_val)

  return len
end