bobocep.dist.devman.BoboDeviceManager

class bobocep.dist.devman.BoboDeviceManager(device: bobocep.dist.device.BoboDevice, flag_reset: bool)[source]

Bases: object

Manages information about a BoboCEP device on the network.

__init__(device: bobocep.dist.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[bobocep.cep.engine.decider.runserial.BoboRunSerial], halted: List[bobocep.cep.engine.decider.runserial.BoboRunSerial], updated: List[bobocep.cep.engine.decider.runserial.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.

clear_stash() None[source]

Removes all items in the stash.

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[bobocep.cep.engine.decider.runserial.BoboRunSerial], List[bobocep.cep.engine.decider.runserial.BoboRunSerial], List[bobocep.cep.engine.decider.runserial.BoboRunSerial]][source]
Returns

The device’s stash.

property urn: str
Returns

Device URN.