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

local ffxiv_ipc_company_board = Proto("ffxiv_ipc_company_board", "FFXIV-IPC Company Board")

local company_board_fields = {
  unknown = ProtoField.uint8("ffxiv_ipc_company_board.unknown", "Unknown", base.DEC),
  content = ProtoField.string("ffxiv_ipc_company_board.content", "Content", base.UNICODE),
}

ffxiv_ipc_company_board.fields = company_board_fields

function ffxiv_ipc_company_board.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_company_board, tvbuf)
  pktinfo.cols.info:set("Company Board")

  local len = tvbuf:len()

  -- dissect the unknown field
  local unknown_tvbr = tvbuf:range(0, 1)
  local unknown_val  = unknown_tvbr:le_uint()
  tree:add_le(company_board_fields.unknown, unknown_tvbr, unknown_val)

  -- dissect the content field
  local content_tvbr = tvbuf:range(1)
  local content_val  = content_tvbr:string(ENC_UTF_8)
  tree:add(company_board_fields.content, content_tvbr, content_val)

  return len
end