コード例 #1
0
def simul_onboard_device():
    jnew_device = {
        'device_id': 'LatestDevice',
        'relsen_list': ['Relay1', 'Relay2', 'Sensor']
    }
    if r.onboard_device(jnew_device):
        return {'result': 'device onboarded successfully'}
    return {'error': 'failed to onboard device'}
コード例 #2
0
def simul_onboard_device():
    jnew_device = {
        'device_id': 'intof_A9417E',
        'relsen_list': ['POWER1', 'POWER2', 'Sensor']
    }
    if r.onboard_device(jnew_device):
        return {'result': 'device onboarded successfully'}
    return {'error': 'failed to onboard device'}
コード例 #3
0
def simul_onboard_device():
    jnew_device = {
        'device_id': 'intof_DD417E',
        'relsen_list': ['POWER1', 'POWER2', 'SENSOR']
    }
    if r.onboard_device(
            jnew_device
    ):  # TODO: you need to add it to in-memory structures also.
        return {'result': 'device onboarded successfully'}
    return {'error': 'failed to onboard device'}