AFL.automation.APIServer.data#

Classes

DataJSON(path)

A DataPacket implementation that serializes its data to JSON, named according to the current time.

DataPacket()

A DataPacket is a container for data that is to be transmitted to a data store.

DataTiled(server, api_key, backup_path)

A DataPacket implementation that serializes its data to Tiled with backup to JSON, named according to the current time.

DataTrashcan()

A DataPacket implementation for testing only that takes all its data and simply throws it away.

class AFL.automation.APIServer.data.DataPacket[source]#

A DataPacket is a container for data that is to be transmitted to a data store.

It is a dictionary-like object that stores data in three different ways: - transient data, which is cleared on resets - system data, which is never cleared - sample data, which is cleared only on specific resets of the sample

The data is transmitted to the data store on finalization, which is called at the end of each method.

PROTECTED_SAMPLE_KEYS = ['sample_name', 'sample_uuid', 'sample_composition', 'AL_components', 'AL_campaign_name', 'AL_uuid']#
PROTECTED_SYSTEM_KEYS = ['driver_name', 'driver_config', 'platform_serial']#
__init__()[source]#
add_array()[source]#

Abstract method adding arrays that need special handling

finalize()[source]#
keys() a set-like object providing a view on D's keys[source]#
reset()[source]#

Clears all transient data.

reset_sample()[source]#
setupDefaults()[source]#
transmit()[source]#
class AFL.automation.APIServer.data.DataJSON(path)[source]#

A DataPacket implementation that serializes its data to JSON, named according to the current time.

__init__(path)[source]#
add_array(array_name, array)[source]#

Abstract method adding arrays that need special handling

finalize()[source]#
transmit()[source]#
class AFL.automation.APIServer.data.DataTiled(server, api_key, backup_path)[source]#

A DataPacket implementation that serializes its data to Tiled with backup to JSON, named according to the current time.

__init__(server, api_key, backup_path)[source]#
add_array(array_name, array)[source]#

Abstract method adding arrays that need special handling

finalize()[source]#
subtransmit_array(array_name, array)[source]#

Transmits a numpy array along with all data in container and then clears the array from the container. All other data is preserved (no reset).

transmit()[source]#
class AFL.automation.APIServer.data.DataTrashcan[source]#

A DataPacket implementation for testing only that takes all its data and simply throws it away.

add_array(*args, **kwargs)[source]#

Abstract method adding arrays that need special handling

transmit()[source]#

Modules