Class: Melos::Struct::PSKLabel

Inherits:
Base
  • Object
show all
Defined in:
lib/melos/struct/structs.rb

Constant Summary collapse

STRUCT =
[
  [:id, :class, Melos::Struct::PreSharedKeyID],
  [:index, :uint16],
  [:count, :uint16]
]

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#deserialize_select_elem_with_context, #initialize, #raw

Constructor Details

This class inherits a constructor from Melos::Struct::Base

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



315
316
317
# File 'lib/melos/struct/structs.rb', line 315

def count
  @count
end

#idObject (readonly)

Returns the value of attribute id.



315
316
317
# File 'lib/melos/struct/structs.rb', line 315

def id
  @id
end

#indexObject (readonly)

Returns the value of attribute index.



315
316
317
# File 'lib/melos/struct/structs.rb', line 315

def index
  @index
end

Class Method Details

.create(id:, index:, count:) ⇒ Object



322
323
324
325
326
327
328
# File 'lib/melos/struct/structs.rb', line 322

def self.create(id:, index:, count:)
  new_instance = self.allocate
  new_instance.instance_variable_set(:@id, id)
  new_instance.instance_variable_set(:@index, index)
  new_instance.instance_variable_set(:@count, count)
  new_instance
end