Class: Nl::Linux::NetShaper::AttributeSets::Handle

Inherits:
AttributeSet
  • Object
show all
Defined in:
nl-linux/generated/nl/linux/net_shaper.rb

Defined Under Namespace

Classes: Attribute, Id, Scope

Constant Summary

Constants inherited from AttributeSet

AttributeSet::SELECTOR_NAMES

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AttributeSet

#<<, #[], build_attributes, decode, #encode, #initialize

Constructor Details

This class inherits a constructor from Nl::AttributeSet

Class Method Details

.by_name(name) ⇒ Attribute

Looks up Attribute class by name.

Parameters:

  • name (Symbol)

Returns:



314
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 314

def by_name(name); BY_NAME.fetch(name); end

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



320
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 320

def by_type(type); BY_TYPE.fetch(type); end

Instance Method Details

#id ⇒ Integer

Numeric identifier of a shaper. The id semantic depends on the scope. For queue scope it's the queue id and for node scope it's the node identifier.

Returns:

  • (Integer)

See Also:



307
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 307

def id; self[:"id"]&.value; end

#scope ⇒ Integer

Defines the shaper id interpretation.

Known enum values are defined in Enums::Scope.

Returns:

  • (Integer)

See Also:



300
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 300

def scope; self[:"scope"]&.value; end