All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bluez.mesh.Network1 Maven / Gradle / Ivy

The newest version!
package org.bluez.mesh;

import org.bluez.datatypes.TwoTuple;
import org.bluez.exceptions.mesh.*;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.types.*;

import java.util.List;
import java.util.Map;

/**
 * File generated - 2023-02-20.
* Based on bluez Documentation: mesh-api.txt.
*
* Service: org.bluez.mesh
* Interface: org.bluez.mesh.Network1
*
* Object path:
* /org/bluez/mesh
*
*/ public interface Network1 extends DBusInterface { /** * From bluez documentation:
*
* This is the first method that an application has to call to
* become a provisioned node on a mesh network. The call will
* initiate broadcasting of Unprovisioned Device Beacon.
*
* The app_root parameter is a D-Bus object root path of
* the application that implements org.bluez.mesh.Application1
* interface. The application represents a node where child mesh
* elements have their own objects that implement
* org.bluez.mesh.Element1 interface. The application hierarchy
* also contains a provision agent object that implements
* org.bluez.mesh.ProvisionAgent1 interface. The standard
* DBus.ObjectManager interface must be available on the
* app_root path.
*
* The uuid parameter is a 16-byte array that contains Device UUID.
* This UUID must be unique (at least from the daemon perspective),
* therefore attempting to call this function using already
* registered UUID results in an error. The composition of the UUID
* octets must be in compliance with RFC 4122.
*
* When provisioning finishes, the daemon will call either
* JoinComplete or JoinFailed method on object implementing
* org.bluez.mesh.Application1 interface.
*
* * @param _appRoot app_root * @param _uuid uuid * * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshAlreadyExistsException when mesh already exists */ void Join(DBusPath _appRoot, byte[] _uuid) throws BluezMeshInvalidArgumentsException, BluezMeshAlreadyExistsException; /** * From bluez documentation:
*
* Cancels an outstanding provisioning request initiated by Join()
* method.
*
*/ void Cancel(); /** * From bluez documentation:
*
* This is the first method that an application must call to get
* access to mesh node functionalities.
*
* The app_root parameter is a D-Bus object root path of
* the application that implements org.bluez.mesh.Application1
* interface. The application represents a node where child mesh
* elements have their own objects that implement
* org.bluez.mesh.Element1 interface. The standard
* DBus.ObjectManager interface must be available on the
* app_root path.
*
* The token parameter is a 64-bit number that has been assigned to
* the application when it first got provisioned/joined mesh
* network, i.e. upon receiving JoinComplete() method. The daemon
* uses the token to verify whether the application is authorized
* to assume the mesh node identity.
*
* In case of success, the method call returns mesh node object
* (see Mesh Node Hierarchy section) and current configuration
* settings. The return value of configuration parameter is an
* array, where each entry is a structure that contains element
* configuration. The element configuration structure is organized
* as follows:
*
* byte
*
* Element index, identifies the element to which this
* configuration entry pertains.
*
* array{struct}
*
* Models array where each entry is a structure with the
* following members:
*
* uint16
*
* Either a SIG Model Identifier or, if Vendor key
* is present in model configuration dictionary, a
* 16-bit vendor-assigned Model Identifier
*
* dict
*
* A dictionary that contains model configuration
* with the following keys defined:
*
* array{uint16} Bindings
*
* Indices of application keys bound to the
* model
*
* uint32 PublicationPeriod
*
* Model publication period in milliseconds
*
* uint16 Vendor
*
* A 16-bit Company ID as defined by the
* Bluetooth SIG
*
* array{variant} Subscriptions
*
* Addresses the model is subscribed to.
*
* Each address is provided either as
* uint16 for group addresses, or
* as array{byte} for virtual labels.
*
* * @param _appRoot appRoot * @param _token token * * @throws BluezMeshInvalidArgumentsException on invalid mesh argument * @throws BluezMeshNotFoundException when mesh not found * @throws BluezMeshAlreadyExistsException when mesh already exists * @throws BluezMeshBusyException when mesh is busy * @throws BluezMeshFailedException on any other mesh error */ TwoTuple>>>>>>Attach(DBusPath _appRoot, UInt64 _token) throws BluezMeshInvalidArgumentsException, BluezMeshNotFoundException, BluezMeshAlreadyExistsException, BluezMeshBusyException, BluezMeshFailedException; /** * From bluez documentation:
*
* This removes the configuration information about the mesh node
* identified by the 64-bit token parameter. The token parameter
* has been obtained as a result of successful Join() method call.
*
* * @param _token token * * @throws BluezMeshInvalidArgumentsException when invalid argument provided * @throws BluezMeshNotFoundException when mesh not found * @throws BluezMeshBusyException when still busy */ void Leave(UInt64 _token) throws BluezMeshBusyException, BluezMeshNotFoundException, BluezMeshInvalidArgumentsException; /** * From bluez documentation:
*
* This is the first method that an application calls to become
* a Provisioner node, and a Configuration Client on a newly
* created Mesh Network.
*
* The app_root parameter is a D-Bus object root path of the
* application that implements org.bluez.mesh.Application1
* interface, and a org.bluez.mesh.Provisioner1 interface. The
* application represents a node where child mesh elements have
* their own objects that implement org.bluez.mesh.Element1
* interface. The application hierarchy also contains a provision
* agent object that implements org.bluez.mesh.ProvisionAgent1
* interface. The standard DBus.ObjectManager interface must be
* available on the app_root path.
*
* The uuid parameter is a 16-byte array that contains Device UUID.
* This UUID must be unique (at least from the daemon perspective),
* therefore attempting to call this function using already
* registered UUID results in an error. The composition of the UUID
* octets must be in compliance with RFC 4122.
*
* The other information the bluetooth-meshd daemon will preserve
* about the initial node, is to give it the initial primary
* unicast address (0x0001), and create and assign a net_key as the
* primary network net_index (0x000).
*
* Upon successful processing of Create() method, the daemon
* will call JoinComplete method on object implementing
* org.bluez.mesh.Application1.
*
* * @param _app_root app_root * @param _uuid uuid * * @throws BluezMeshInvalidArgumentsException when invalid mesh options used * @throws BluezMeshAlreadyExistsException when mesh already exists */ void CreateNetwork(DBusPath _app_root, byte[] _uuid) throws BluezMeshInvalidArgumentsException, BluezMeshAlreadyExistsException; /** * From bluez documentation:
*
* This method creates a local mesh node based on node * configuration that has been generated outside bluetooth-meshd. * * The app_root parameter is a D-Bus object root path of the * application that implements org.bluez.mesh.Application1 * interface. * * The uuid parameter is a 16-byte array that contains Device UUID. * This UUID must be unique (at least from the daemon perspective), * therefore attempting to call this function using already * registered UUID results in an error. * * The dev_key parameter is the 16-byte value of the dev key of * the imported mesh node. * * Remaining parameters correspond to provisioning data: * * The net_key and net_index parameters describe the network (or a * subnet, if net_index is not 0) the imported mesh node belongs * to. * * The flags parameter is a dictionary containing provisioning * flags. Supported values are: * * boolean IvUpdate * * When true, indicates that the network is in the * middle of IV Index Update procedure. * * boolean KeyRefresh * * When true, indicates that the specified net key * is in the middle of a key refresh procedure. * * The iv_index parameter is the current IV Index value used by * the network. This value is known by the provisioner. * * The unicast parameter is the primary unicast address of the * imported node. * * Upon successful processing of Import() method, the daemon will * call JoinComplete method on object implementing * org.bluez.mesh.Application1 interface. * * @param _appRoot root * @param _uuid uuid * @param _devKey devkey * @param _netKey netkey * @param _netIndex netidx * @param _flags flags * @param _ivIndex ividx * @param _unicast unicast * * @throws BluezMeshAlreadyExistsException when mesh already exists * @throws BluezMeshInvalidArgumentsException when invalid argument provided * @throws BluezMeshNotFoundException when mesh could not be found * @throws BluezMeshNotSupportedException when operation is not supported */ void Import(DBusPath _appRoot, byte[] _uuid, byte[] _devKey, byte[] _netKey, UInt16 _netIndex, Map> _flags, UInt32 _ivIndex, UInt16 _unicast) throws BluezMeshInvalidArgumentsException, BluezMeshAlreadyExistsException, BluezMeshNotSupportedException, BluezMeshNotFoundException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy