bobocep.dist.devman.BoboDeviceManager
- class bobocep.dist.devman.BoboDeviceManager(device: BoboDevice, flag_reset: bool)[source]
Bases:
objectManages information about a BoboCEP device on the network.
- __init__(device: BoboDevice, flag_reset: bool)[source]
- Parameters:
device – The device to manage.
flag_reset – If True, it indicates to the BoboDistributed instance that the next message to the device should set a flag to reset its data on the sending device; ‘False’ indicates that no flag should be set.
- property addr: str
- Returns:
Device address.
- append_stash(completed: List[BoboRunSerial], halted: List[BoboRunSerial], updated: List[BoboRunSerial]) None[source]
Append runs to stash.
- Parameters:
completed – Completed runs to append.
halted – Halted runs to append.
updated – Updated runs to append.
- clear_last() None[source]
Clears both the last communication and last attempted communication time by setting them both to 0.
- property flag_reset: bool
- Returns:
True if reset flag should be set; False otherwise.
- property id_key: str
- Returns:
Device ID key.
- property last_attempt: int
- Returns:
Last attempted communication with the device.
- property last_comms: int
- Returns:
Time of last communication with device.
- property port: int
- Returns:
Device port.
- size_stash() int[source]
- Returns:
The stash size, equal to all completed, halted, and updated runs in the stash.
- stash() Tuple[List[BoboRunSerial], List[BoboRunSerial], List[BoboRunSerial]][source]
- Returns:
The device’s stash.
- property urn: str
- Returns:
Device URN.