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

local ffxiv_ipc_faux_hollow_block = Proto("ffxiv_ipc_faux_hollow_block", "FFXIV-IPC FauxHollowBlock")

local faux_hollow_block_fields = {
  row    = ProtoField.uint32("ffxiv_ipc_faux_hollow_block.row", "Row", base.DEC),
  column = ProtoField.uint32("ffxiv_ipc_faux_hollow_block.column", "Column", base.DEC),
}

ffxiv_ipc_faux_hollow_block.fields = faux_hollow_block_fields

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

  local len = tvbuf:len()

  -- dissect the row field
  local row_tvbr = tvbuf:range(0, 4)
  local row_val  = row_tvbr:le_uint()
  tree:add_le(faux_hollow_block_fields.row, row_tvbr, row_val)

  local row_display = ", Row: " .. row_val
  pktinfo.cols.info:append(row_display)
  tree:append_text(row_display)

  -- dissect the column field
  local column_tvbr = tvbuf:range(4, 4)
  local column_val  = column_tvbr:le_uint()
  tree:add_le(faux_hollow_block_fields.column, column_tvbr, column_val)

  local column_display = ", Column: " .. column_val
  pktinfo.cols.info:append(column_display)
  tree:append_text(column_display)

  return len
end