Class: Pio::Lldp::PortIdTlv
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Pio::Lldp::PortIdTlv
- Defined in:
- lib/pio/lldp/port_id_tlv.rb
Overview
Port ID TLV
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/pio/lldp/port_id_tlv.rb', line 16 def get tmp_id = port_id if subtype == 7 BinData::Uint32be.read tmp_id else tmp_id end end |
#set(value) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/pio/lldp/port_id_tlv.rb', line 26 def set(value) self.port_id = if subtype == 7 BinData::Uint32be.new(value).to_binary_s else value end end |