children

Sub-tasks that serve as children to other tasks.

Note

The Child agent will be formalized in an upcoming release, until then these classes remain relatively undocumented as their design will likely change.

Classes:

Digital_Out([pin, pulse_width, polarity])

TTL/Digital logic out through a GPIO pin.

LifoQueue([maxsize])

Variant of Queue that retrieves most recently added entries first.

Net_Node(id, upstream, port, listens[, …])

Drop in networking object to be given to any sub-object behind some external-facing Station object.

Transformer(transform, operation[, …])

Parameters
  • transform

Video_Child([cams, stage_block, start_now])

Parameters

cams (dict, list) –

Wheel([mouse_idx, fs, thresh, thresh_type, …])

A continuously measured mouse wheel.

Wheel_Child([stage_block, fs, thresh])

cycle

cycle(iterable) –> cycle object

deque

deque([iterable[, maxlen]]) –> deque object

odict

alias of collections.OrderedDict

Exceptions:

Empty

Exception raised by Queue.get(block=0)/get_nowait().

Functions:

sleep(seconds)

Delay execution for a given number of seconds.

class Wheel_Child(stage_block=None, fs=10, thresh=100, **kwargs)[source]

Bases: object

Attributes:

HARDWARE

PARAMS

STAGE_NAMES

Methods:

end()

noop()

STAGE_NAMES = ['collect']
PARAMS = {'fs': {'tag': 'Velocity Reporting Rate (Hz)', 'type': 'int'}, 'thresh': {'tag': 'Distance Threshold', 'type': 'int'}}
HARDWARE = {'OUTPUT': <class 'autopilot.hardware.gpio.Digital_Out'>, 'WHEEL': <class 'autopilot.hardware.usb.Wheel'>}
noop()[source]
end()[source]
class Video_Child(cams=None, stage_block=None, start_now=True, **kwargs)[source]

Bases: object

Parameters

cams (dict, list) –

Should be a dictionary of camera parameters or a list of dicts. Dicts should have, at least:

{
    'type': 'string_of_camera_class',
    'name': 'name_of_camera_in_task',
    'param1': 'first_param'
}

Attributes:

PARAMS

Methods:

noop()

start()

stop()

PARAMS = {'cams': {'tag': 'Dictionary of camera params, or list of dicts', 'type': ('dict', 'list')}}
start()[source]
stop()[source]
noop()[source]
class Transformer(transform, operation: str = 'trigger', return_id='T', return_key=None, stage_block=None, value_subset=None, **kwargs)[source]

Bases: object

Parameters
  • transform

  • operation (str) – either

    • “trigger”, where the last transform is a Condition

    and a trigger is returned to sender only when the return value of the transformation changes, or * “stream”, where each result of the transformation is returned to sender

  • return_id

  • stage_block

  • value_subset (str) – Optional - subset a value from from a dict/list sent to l_process()

  • **kwargs

Methods:

l_process(value)

noop()

noop()[source]
l_process(value)[source]