adding channel id config
Change-Id: I215a6311e1d31c57b5fdf2cd2f10bba5a22737e2
diff --git a/voltha/adapters/microsemi/PAS5211_comm.py b/voltha/adapters/microsemi/PAS5211_comm.py
index 2167a9d..0529fbe 100644
--- a/voltha/adapters/microsemi/PAS5211_comm.py
+++ b/voltha/adapters/microsemi/PAS5211_comm.py
@@ -57,16 +57,18 @@
class PAS5211Communication(object):
- def __init__(self, dst_mac, init = 0, iface = None):
+ def __init__(self, dst_mac, channel_id = -1, init=0, iface = None):
self.iface = iface
self.dst_mac = dst_mac
self.seqgen = sequence_generator(init)
self.src_mac = determine_src_mac(self.iface)
+ self.channel_id = channel_id
def communicate(self, msg, timeout=1, **kwargs):
if self.src_mac is not None:
frame = constructPAS5211Frames(msg, self.seqgen.next(), self.src_mac,
- self.dst_mac, **kwargs)
+ self.dst_mac, channel_id=self.channel_id,
+ **kwargs)
return srp1(frame, timeout=timeout, iface=self.iface)
else:
log.info('Unknown src mac for {}'.format(self.iface))
diff --git a/voltha/adapters/microsemi/RubyAdapter.py b/voltha/adapters/microsemi/RubyAdapter.py
index f12cbed..bc1d0be 100644
--- a/voltha/adapters/microsemi/RubyAdapter.py
+++ b/voltha/adapters/microsemi/RubyAdapter.py
@@ -33,6 +33,7 @@
log = structlog.get_logger()
_ = third_party
+# Move to configuration... eventually
olt_conf = { 'olts' : { 'id' : 0, 'mac' : '00:0c:d5:00:01:00'}, 'iface' : 'eth3'}
@implementer(IAdapterInterface)