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

local ffxiv_ipc_content_finder_member_status = Proto("ffxiv_ipc_content_finder_member_status", "FFXIV-IPC Content Finder Member Status")

local content_finder_member_status_fields = {
  content_id     = ProtoField.uint16("ffxiv_ipc_content_finder_member_status.content_id", "contentId", base.DEC),
  unknown1       = ProtoField.uint16("ffxiv_ipc_content_finder_member_status.unknown1", "unknown1", base.DEC),
  status         = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.status", "status", base.DEC),
  current_tank   = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.current_tank", "currentTank", base.DEC),
  current_dps    = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.current_dps", "currentDps", base.DEC),
  current_healer = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.current_healer", "currentHealer", base.DEC),
  estimated_time = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.estimated_time", "estimatedTime", base.DEC),
  unknown20      = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.unknown20", "unknown20", base.DEC),
  unknown21      = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.unknown21", "unknown21", base.DEC),
  unknown22      = ProtoField.uint8("ffxiv_ipc_content_finder_member_status.unknown22", "unknown22", base.DEC),
  unknown3       = ProtoField.uint32("ffxiv_ipc_content_finder_member_status.unknown3", "unknown3", base.DEC),
}

ffxiv_ipc_content_finder_member_status.fields = content_finder_member_status_fields

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

  local len = tvbuf:len()

  -- dissect the content_id field
  local content_id_tvbr = tvbuf:range(0, 2)
  local content_id_val  = content_id_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.content_id, content_id_tvbr, content_id_val)

  -- dissect the unknown1 field
  local unknown1_tvbr = tvbuf:range(2, 2)
  local unknown1_val  = unknown1_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.unknown1, unknown1_tvbr, unknown1_val)

  -- dissect the status field
  local status_tvbr = tvbuf:range(4, 1)
  local status_val  = status_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.status, status_tvbr, status_val)

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

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

  -- dissect the current_healer field
  local current_healer_tvbr = tvbuf:range(7, 1)
  local current_healer_val  = current_healer_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.current_healer, current_healer_tvbr, current_healer_val)

  -- dissect the estimated_time field
  local estimated_time_tvbr = tvbuf:range(8, 1)
  local estimated_time_val  = estimated_time_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.estimated_time, estimated_time_tvbr, estimated_time_val)

  -- dissect the unknown20 field
  local unknown20_tvbr = tvbuf:range(9, 1)
  local unknown20_val  = unknown20_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.unknown20, unknown20_tvbr, unknown20_val)

  -- dissect the unknown21 field
  local unknown21_tvbr = tvbuf:range(9, 1)
  local unknown21_val  = unknown21_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.unknown21, unknown21_tvbr, unknown21_val)

  -- dissect the unknown22 field
  local unknown22_tvbr = tvbuf:range(9, 1)
  local unknown22_val  = unknown22_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.unknown22, unknown22_tvbr, unknown22_val)

  -- dissect the unknown3 field
  local unknown3_tvbr = tvbuf:range(12, 4)
  local unknown3_val  = unknown3_tvbr:le_uint()
  tree:add_le(content_finder_member_status_fields.unknown3, unknown3_tvbr, unknown3_val)

  return len
end