Class: Nl::Linux::RtRule::Structs::FibRulePortRange

Inherits:
Struct
  • Object
show all
Defined in:
nl-linux/generated/nl/linux/rt_rule.rb,
nl-linux/generated/nl/linux/rt_rule.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end ⇒ Integer

Returns:

  • (Integer)


130
# File 'nl-linux/generated/nl/linux/rt_rule.rb', line 130

MEMBERS = Ractor.make_shareable({start: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil), end: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)})

#start ⇒ Integer

Returns:

  • (Integer)


130
# File 'nl-linux/generated/nl/linux/rt_rule.rb', line 130

MEMBERS = Ractor.make_shareable({start: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil), end: ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U16, check: nil)})

Class Method Details

.decode(decoder) ⇒ self

Decodes the struct.

Parameters:

Returns:

  • (self)


136
137
138
# File 'nl-linux/generated/nl/linux/rt_rule.rb', line 136

def self.decode(decoder)
  self.new(*MEMBERS.map {|name, datatype| datatype.decode(decoder) })
end

Instance Method Details

#encode(encoder) ⇒ void

This method returns an undefined value.

Encodes the struct.

Parameters:



144
145
146
# File 'nl-linux/generated/nl/linux/rt_rule.rb', line 144

def encode(encoder)
  MEMBERS.each {|name, datatype| datatype.encode(encoder, self.public_send(name)) }
end