Skip to content

Protocol (example)

Matej Troják edited this page Feb 25, 2020 · 14 revisions

Example of a node:

import datetime
node = {
    1 : {
        'experiment_details' : {'sleep_time' : 120},
        'devices' : [{
            'device_type' : 'PBR',
            'device_class' : 'Phenometrics',
            'device_id': 'ePBR01',
            'encryption_key': '29gkymoya3jm6r0b',
            'host_port': 9831,
            'host_address': 'localhost',
            'setup' : {
                'initial_commands' : [{'time': '2019-10-25 13:03:32',
                                        'cmd_id': 8,
                                        'args': '[1, True]'}],
                'lower_outlier_tol' : 2,
                'upper_outlier_tol' : 3,
                'max_outliers' : 6,
                'min_OD' : 0.5,
                'max_OD' : 0.7,
                'pump_id' : 1,
                'ft_channel': 5,
                'OD_channel': 1
            }
        }]
    }
}

Example of a device:

dev = {
    'device_type' : GAS,
    'device_class' : 'PSI_test',
    'host_address' : None,
    'setup' : {
        'initial_commands' : [{'time': '2019-10-25 13:03:32' ,'cmd_id': 8, 'args': '[1, True]'}],
        'lower_outlier_tol' : 2,
        'upper_outlier_tol' : 3,
        'max_outliers' : 6,
        'min_OD' : 0.1,
        'max_OD' : 0.9,
        'pump_id' : 1,
        'ft_channel': 5,
        'OD_channel': 1
     }
}

A simple test PBR

import datetime
node = {
    1 : {
        'experiment_details' : {'sleep_time' : 5},
        'devices' : [{
            'device_type' : 'PBR',
            'device_class' : 'PSI_test',
            'device_id': 'PBR01',
            'host_address': 'localhost',
            'setup' : {
                'initial_commands' : [],
                'lower_outlier_tol' : 2,
                'upper_outlier_tol' : 3,
                'max_outliers' : 6,
                'min_OD' : 0.5,
                'max_OD' : 0.7,
                'pump_id' : 1,
                'ft_channel': 5,
                'OD_channel': 1
            }
        }]
    }
}
Clone this wiki locally