original_docstring:  Record the DAGroot's EUI64 address. 
docstring: Record the DAGroot's EUI64 address.
docstring_tokens: Record the DAGroot ' s EUI64 address .
code: def _info_dagroot_notif(self, sender, signal, data):
          """ Record the DAGroot's EUI64 address. """
  
          # stop of we don't have a networkPrefix assigned yet
          if not self.network_prefix:
              log.error("infoDagRoot signal received while not have been assigned a networkPrefix yet")
              return
  
          new_dagroot_eui64 = data['eui64'][:]
  
          with self.state_lock:
              same_dagroot = (self.dagroot_eui64 == new_dagroot_eui64)
  
          # register the DAGroot
          if data['isDAGroot'] == 1 and not same_dagroot:
              # log
              log.info("registering DAGroot {0}".format(format_addr(new_dagroot_eui64)))
  
              # register
              self.register(
                  sender=self.WILDCARD,
                  signal=(
                      tuple(self.network_prefix + new_dagroot_eui64),
                      self.PROTO_ICMPv6,
                      self.IANA_ICMPv6_RPL_TYPE,
                  ),
                  callback=self._from_mote_data_local_notif,
              )
  
              # announce new DAG root
              self.dispatch(
                  signal='registerDagRoot',
                  data={'prefix': self.network_prefix, 'host': new_dagroot_eui64},
              )
  
              # store DAGroot
              with self.state_lock:
                  self.dagroot_eui64 = new_dagroot_eui64
  
          # unregister the DAGroot
          if data['isDAGroot'] == 0 and same_dagroot:
              # log
              log.warning("unregistering DAGroot {0}".format(format_addr(new_dagroot_eui64)))
  
              # unregister from old DAGroot
              self.unregister(
                  sender=self.WILDCARD,
                  signal=(
                      tuple(self.network_prefix + new_dagroot_eui64),
                      self.PROTO_ICMPv6,
                      self.IANA_ICMPv6_RPL_TYPE,
                  ),
                  callback=self._from_mote_data_local_notif,
              )
  
              # announce that node is no longer DAG root
              self.dispatch(
                  signal='unregisterDagRoot',
                  data={'prefix': self.network_prefix, 'host': self.dagroot_eui64},
              )
  
              # clear DAGroot
              with self.state_lock:
                  self.dagroot_eui64 = None
code_tokens: def _info_dagroot_notif ( self , sender , signal , data ) : if not self . network_prefix : log . error ( "infoDagRoot signal received while not have been assigned a networkPrefix yet" ) return new_dagroot_eui64 = data [ 'eui64' ] [ : ] with self . state_lock : same_dagroot = ( self . dagroot_eui64 == new_dagroot_eui64 ) if data [ 'isDAGroot' ] == 1 and not same_dagroot : log . info ( "registering DAGroot {0}" . format ( format_addr ( new_dagroot_eui64 ) ) ) self . register ( sender = self . WILDCARD , signal = ( tuple ( self . network_prefix + new_dagroot_eui64 ) , self . PROTO_ICMPv6 , self . IANA_ICMPv6_RPL_TYPE , ) , callback = self . _from_mote_data_local_notif , ) self . dispatch ( signal = 'registerDagRoot' , data = { 'prefix' : self . network_prefix , 'host' : new_dagroot_eui64 } , ) with self . state_lock : self . dagroot_eui64 = new_dagroot_eui64 if data [ 'isDAGroot' ] == 0 and same_dagroot : log . warning ( "unregistering DAGroot {0}" . format ( format_addr ( new_dagroot_eui64 ) ) ) self . unregister ( sender = self . WILDCARD , signal = ( tuple ( self . network_prefix + new_dagroot_eui64 ) , self . PROTO_ICMPv6 , self . IANA_ICMPv6_RPL_TYPE , ) , callback = self . _from_mote_data_local_notif , ) self . dispatch ( signal = 'unregisterDagRoot' , data = { 'prefix' : self . network_prefix , 'host' : self . dagroot_eui64 } , ) with self . state_lock : self . dagroot_eui64 = None
short_docstring: Record the DAGroot's EUI64 address.
short_docstring_tokens: Record the DAGroot ' s EUI64 address .
comment: """ Record the DAGroot's EUI64 address. """$SEP$# stop of we don't have a networkPrefix assigned yet$SEP$# register the DAGroot$SEP$# log$SEP$# register$SEP$# announce new DAG root$SEP$# store DAGroot$SEP$# unregister the DAGroot$SEP$# log$SEP$# unregister from old DAGroot$SEP$# announce that node is no longer DAG root$SEP$# clear DAGroot