object @user

child :jamblasters do
  attributes :id, :user_id, :serial_no, :client_id, :ipv6_link_local, :ipv4_link_local, :display_name
end

node :same_network_jamblasters  do
  if @connection
    jamblasters = @connection.same_network_jamblasters
    result = []
    jamblasters.each do |jamblaster|
      result.push ({id: jamblaster.id, user_id: jamblaster.user_id, serial_no: jamblaster.serial_no, client_id: jamblaster.client_id, ipv4_link_local: jamblaster.ipv4_link_local, ipv6_link_local: jamblaster.ipv6_link_local, display_name: jamblaster.display_name})
    end
    result
  else
    []
  end
end
