mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
of14: Add port mod optical property
Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
77fd419441
commit
55b89f0bd8
@ -5121,6 +5121,30 @@ class OFPPortModPropEthernet(StringifyMixin):
|
||||
return buf
|
||||
|
||||
|
||||
class OFPPortModPropOptical(StringifyMixin):
|
||||
def __init__(self, type_=None, length=None, configure=None,
|
||||
freq_lmda=None, fl_offset=None, grid_span=None,
|
||||
tx_pwr=None):
|
||||
self.type = type_
|
||||
self.length = length
|
||||
self.configure = configure
|
||||
self.freq_lmda = freq_lmda
|
||||
self.fl_offset = fl_offset
|
||||
self.grid_span = grid_span
|
||||
self.tx_pwr = tx_pwr
|
||||
|
||||
def serialize(self):
|
||||
# fixup
|
||||
self.length = struct.calcsize(
|
||||
ofproto.OFP_PORT_MOD_PROP_OPTICAL_PACK_STR)
|
||||
|
||||
buf = bytearray()
|
||||
msg_pack_into(ofproto.OFP_PORT_MOD_PROP_OPTICAL_PACK_STR, buf, 0,
|
||||
self.type, self.length, self.configure, self.freq_lmda,
|
||||
self.fl_offset, self.grid_span, self.tx_pwr)
|
||||
return buf
|
||||
|
||||
|
||||
@_set_msg_type(ofproto.OFPT_PORT_MOD)
|
||||
class OFPPortMod(MsgBase):
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user