Esempio n. 1
0
def hdl_wid_346(desc):
    """
    Implements: IUT_SEND_FRIEND_SUBSCRIPTION_LIST_ADD
    :param desc: Please send Friend Subscription List Add message to Lower
                 Tester.
    :return:
    """
    stack = get_stack()
    group_address = MeshVals.subscription_addr_list1

    btp.mesh_lpn_subscribe(group_address)
    stack.mesh.lpn_subscriptions.append(group_address)
    return True
Esempio n. 2
0
def hdl_wid_347(desc):
    """
    Implements: IUT_SEND_FRIEND_SUBSCRIPTION_LIST_REMOVE
    :param desc: Please send Friend Subscription List Remove message to Lower
                 Tester.
    :return:
    """
    stack = get_stack()
    group_address = MeshVals.subscription_addr_list1

    # Subscribe if not
    if group_address not in stack.mesh.lpn_subscriptions:
        btp.mesh_lpn_subscribe(group_address)
        stack.mesh.lpn_subscriptions.append(group_address)
        time.sleep(10)  # Give some time to subscribe

    btp.mesh_lpn_unsubscribe(group_address)
    stack.mesh.lpn_subscriptions.remove(group_address)
    return True