예제 #1
0
 def __init__(self, ids=None, list_size=0):
     """Initializes the DeviceList object with either IDs or its size."""
     ids = [] if ids is None else ids
     if list_size != 0 and ids == []:
         Data.__init__(self, [0] * list_size, 'H' * list_size)
     else:
         Data.__init__(self, ids, 'H' * len(ids))
예제 #2
0
파일: device.py 프로젝트: Tsuchimiya/pozyx
 def __init__(self, network_id=0):
     """Initializes the NetworkID object."""
     Data.__init__(self, [network_id], 'H')
     self.id = network_id