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

local ffxiv_ipc_garden_status = Proto("ffxiv_ipc_garden_status", "FFXIV-IPC Garden Status")

local garden_status_fields = {
  type        = ProtoField.uint8("ffxiv_ipc_garden_status.type", "Type", base.DEC),
  house_index = ProtoField.uint8("ffxiv_ipc_garden_status.house_index", "HouseIndex", base.DEC),
  section     = ProtoField.uint16("ffxiv_ipc_garden_status.section", "Section", base.DEC),
  seed1       = ProtoField.uint16("ffxiv_ipc_garden_status.seed1", "Seed1", base.DEC),
  seed2       = ProtoField.uint16("ffxiv_ipc_garden_status.seed2", "Seed2", base.DEC),
  seed3       = ProtoField.uint16("ffxiv_ipc_garden_status.seed3", "Seed3", base.DEC),
  seed4       = ProtoField.uint16("ffxiv_ipc_garden_status.seed4", "Seed4", base.DEC),
  seed5       = ProtoField.uint16("ffxiv_ipc_garden_status.seed5", "Seed5", base.DEC),
  seed6       = ProtoField.uint16("ffxiv_ipc_garden_status.seed6", "Seed6", base.DEC),
  seed7       = ProtoField.uint16("ffxiv_ipc_garden_status.seed7", "Seed7", base.DEC),
  seed8       = ProtoField.uint16("ffxiv_ipc_garden_status.seed8", "Seed8", base.DEC),
  status1     = ProtoField.uint8("ffxiv_ipc_garden_status.status1", "Status1", base.DEC),
  status2     = ProtoField.uint8("ffxiv_ipc_garden_status.status2", "Status2", base.DEC),
  status3     = ProtoField.uint8("ffxiv_ipc_garden_status.status3", "Status3", base.DEC),
  status4     = ProtoField.uint8("ffxiv_ipc_garden_status.status4", "Status4", base.DEC),
  status5     = ProtoField.uint8("ffxiv_ipc_garden_status.status5", "Status5", base.DEC),
  status6     = ProtoField.uint8("ffxiv_ipc_garden_status.status6", "Status6", base.DEC),
  status7     = ProtoField.uint8("ffxiv_ipc_garden_status.status7", "Status7", base.DEC),
  status8     = ProtoField.uint8("ffxiv_ipc_garden_status.status8", "Status8", base.DEC),
}

ffxiv_ipc_garden_status.fields = garden_status_fields

function ffxiv_ipc_garden_status.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_garden_status, tvbuf)
  pktinfo.cols.info:set("Garden Status")

  local len = tvbuf:len()

  -- dissect the type field
  local type_tvbr = tvbuf:range(0, 1)
  local type_val  = type_tvbr:le_uint()
  tree:add_le(garden_status_fields.type, type_tvbr, type_val)

  local type_display = ", Type: " .. type_val
  pktinfo.cols.info:append(type_display)
  tree:append_text(type_display)

  -- dissect the house_index field
  local house_index_tvbr = tvbuf:range(1, 1)
  local house_index_val  = house_index_tvbr:le_uint()
  tree:add_le(garden_status_fields.house_index, house_index_tvbr, house_index_val)

  local house_index_display = ", HouseIndex: " .. house_index_val
  pktinfo.cols.info:append(house_index_display)
  tree:append_text(house_index_display)

  -- dissect the section field
  local section_tvbr = tvbuf:range(2, 2)
  local section_val  = section_tvbr:le_uint()
  tree:add_le(garden_status_fields.section, section_tvbr, section_val)

  local section_display = ", Section: " .. section_val
  pktinfo.cols.info:append(section_display)
  tree:append_text(section_display)

  -- dissect the seed1 field
  local seed1_tvbr = tvbuf:range(8, 2)
  local seed1_val  = seed1_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed1, seed1_tvbr, seed1_val)

  -- dissect the seed2 field
  local seed2_tvbr = tvbuf:range(10, 2)
  local seed2_val  = seed2_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed2, seed2_tvbr, seed2_val)

  -- dissect the seed3 field
  local seed3_tvbr = tvbuf:range(12, 2)
  local seed3_val  = seed3_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed3, seed3_tvbr, seed3_val)

  -- dissect the seed4 field
  local seed4_tvbr = tvbuf:range(14, 2)
  local seed4_val  = seed4_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed4, seed4_tvbr, seed4_val)

  -- dissect the seed5 field
  local seed5_tvbr = tvbuf:range(16, 2)
  local seed5_val  = seed5_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed5, seed5_tvbr, seed5_val)

  -- dissect the seed6 field
  local seed6_tvbr = tvbuf:range(18, 2)
  local seed6_val  = seed6_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed6, seed6_tvbr, seed6_val)

  -- dissect the seed7 field
  local seed7_tvbr = tvbuf:range(20, 2)
  local seed7_val  = seed7_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed7, seed7_tvbr, seed7_val)

  -- dissect the seed8 field
  local seed8_tvbr = tvbuf:range(24, 2)
  local seed8_val  = seed8_tvbr:le_uint()
  tree:add_le(garden_status_fields.seed8, seed8_tvbr, seed8_val)

  -- dissect the status1 field
  local status1_tvbr = tvbuf:range(26, 1)
  local status1_val  = status1_tvbr:le_uint()
  tree:add_le(garden_status_fields.status1, status1_tvbr, status1_val)

  -- dissect the status2 field
  local status2_tvbr = tvbuf:range(27, 1)
  local status2_val  = status2_tvbr:le_uint()
  tree:add_le(garden_status_fields.status2, status2_tvbr, status2_val)

  -- dissect the status3 field
  local status3_tvbr = tvbuf:range(28, 1)
  local status3_val  = status3_tvbr:le_uint()
  tree:add_le(garden_status_fields.status3, status3_tvbr, status3_val)

  -- dissect the status4 field
  local status4_tvbr = tvbuf:range(29, 1)
  local status4_val  = status4_tvbr:le_uint()
  tree:add_le(garden_status_fields.status4, status4_tvbr, status4_val)

  -- dissect the status5 field
  local status5_tvbr = tvbuf:range(30, 1)
  local status5_val  = status5_tvbr:le_uint()
  tree:add_le(garden_status_fields.status5, status5_tvbr, status5_val)

  -- dissect the status6 field
  local status6_tvbr = tvbuf:range(31, 1)
  local status6_val  = status6_tvbr:le_uint()
  tree:add_le(garden_status_fields.status6, status6_tvbr, status6_val)

  -- dissect the status7 field
  local status7_tvbr = tvbuf:range(32, 1)
  local status7_val  = status7_tvbr:le_uint()
  tree:add_le(garden_status_fields.status7, status7_tvbr, status7_val)

  -- dissect the status8 field
  local status8_tvbr = tvbuf:range(33, 1)
  local status8_val  = status8_tvbr:le_uint()
  tree:add_le(garden_status_fields.status8, status8_tvbr, status8_val)

  return len
end