def start(self): """start propagation channel""" self._init() self._open() # Immediately send CFG cfg = ConfigurationMessage(self.gateway) cfg.data_encode(self.task.topology) self.send(cfg)
def start(self): """start propagation channel""" self._init() self._open() cfg = ConfigurationMessage() #cfg.data_encode(self.task._default_topology()) cfg.data_encode(self.task.topology) self._history['cfg_id'] = cfg.msgid self.send(cfg)
def start(self): """initial actions""" #print '[DBG] start' self._open() cfg = ConfigurationMessage() #cfg.data_encode(self.task._default_topology()) cfg.data_encode(self.task.topology) self._history['cfg_id'] = cfg.msgid self.send(cfg) self.current_state = self.states['STATE_CFG']
def channel_send_cfg(self, gateway): """send configuration part of channel""" # code snippet from PropagationChannel.start() cfg = ConfigurationMessage(gateway) cfg.data_encode(self.topology) self.gateway.send(cfg.xml())
def gen_cfg(): """return a generic configuration message instance""" msg = ConfigurationMessage() msg.msgid = 0 msg.data = 'KGxwMApJMQphSTIKYUkzCmEu' return msg