Class: Pio::Lldp::ChassisIdTlv
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Pio::Lldp::ChassisIdTlv
- Defined in:
- lib/pio/lldp/chassis_id_tlv.rb
Overview
Chassis ID TLV
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pio/lldp/chassis_id_tlv.rb', line 18 def get tmp_chassis_id = chassis_id case subtype when 4 mac_address when 7 BinData::Uint64be.read tmp_chassis_id else tmp_chassis_id end end |
#set(value) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/pio/lldp/chassis_id_tlv.rb', line 31 def set(value) self.chassis_id = if subtype == 7 BinData::Uint64be.new(value).to_binary_s else value end end |