Ejemplo n.º 1
0
def gen_mfr_prop_set(params, ack):
    prop_id = params['Property ID']
    access = params.get('Access', 3)
    btp.mmdl_gen_prop_set(0x00, prop_id, access, '', ack)

    stack = get_stack()
    stack.mesh.expect_status_data_set('Ack', ack)
    stack.mesh.expect_status_data_set('Status', [prop_id, access, ''])
    return True
Ejemplo n.º 2
0
def gen_usr_prop_set(params, ack):
    prop_id = params['Property ID']
    val = params['Property Value']
    access = params.get('Access', 3)
    payload = hex(val)[2:]
    btp.mmdl_gen_prop_set(0x02, prop_id, access, payload, ack)

    stack = get_stack()
    stack.mesh.expect_status_data_set('Ack', ack)
    stack.mesh.expect_status_data_set('Status', [prop_id, access, val])
    return True