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

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

The newest version!
package org.bluez.mesh;

import org.bluez.exceptions.mesh.*;
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.types.UInt16;
import org.freedesktop.dbus.types.Variant;

import java.util.Map;

/**
 * File generated - 2023-02-20.
* Based on bluez Documentation: mesh-api.txt.
*
* Service: org.bluez.mesh
* Interface: org.bluez.mesh.Management1
*
* Object path:
* /org/bluez/mesh/node<uuid>
* where <uuid> is the Device UUID passed to Join(),
* CreateNetwork() or Import()
*
*/ public interface Management1 extends DBusInterface { /** * From bluez documentation:
*
* This method is used by the application that supports
* org.bluez.mesh.Provisioner1 interface to start listening
* (scanning) for unprovisioned devices in the area.
*
* The options parameter is a dictionary with the following keys
* defined:
*
* uint16 Seconds
* Specifies number of seconds for scanning to be active.
* If set to 0 or if this key is not present, then the
* scanning will continue until UnprovisionedScanCancel()
* or AddNode() methods are called.
*
* Each time a unique unprovisioned beacon is heard, the
* ScanResult() method on the app will be called with the result.
*
* * @param _options options * * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshNotAuthorizedException when not authorized * @throws BluezMeshBusyException when already busy */ void UnprovisionedScan(Map> _options) throws BluezMeshInvalidArgumentsException, BluezMeshNotAuthorizedException, BluezMeshBusyException; /** * From bluez documentation:
*
* This method is used by the application that supports
* org.bluez.mesh.Provisioner1 interface to stop listening
* (scanning) for unprovisioned devices in the area.
*
* * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshNotAuthorizedException when not authorized */ void UnprovisionedScanCancel() throws BluezMeshInvalidArgumentsException, BluezMeshNotAuthorizedException; /** * From bluez documentation:
*
* This method is used by the application that supports
* org.bluez.mesh.Provisioner1 interface to add the
* unprovisioned device specified by uuid, to the Network.
*
* The uuid parameter is a 16-byte array that contains Device UUID
* of the unprovisioned device to be added to the network.
*
* The options parameter is a dictionary that may contain
* additional configuration info (currently an empty placeholder
* for forward compatibility).
*
* * @param _uuid uuid * @param _options options * * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshNotAuthorizedException when not authorized */ void AddNode(byte[] _uuid, Map> _options) throws BluezMeshInvalidArgumentsException, BluezMeshNotAuthorizedException; /** * From bluez documentation:
*
* This method is used by the application to generate and add a new
* network subnet key.
*
* The net_index parameter is a 12-bit value (0x001-0xFFF)
* specifying which net key to add.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _netIndex net_index * * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshNotAuthorizedException when not authorized */ void CreateSubnet(UInt16 _netIndex) throws BluezMeshInvalidArgumentsException, BluezMeshNotAuthorizedException; /** * From bluez documentation:
*
* This method is used by the application to add a network subnet
* key, that was originally generated by a remote Config Client.
*
* The net_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which net key to add.
*
* The net_key parameter is the 16-byte value of the net key being
* imported.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _netIndex net_index * @param _netKey net_key * * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshFailedException when operation failed * @throws BluezMeshAlreadyExistsException when already exists */ void ImportSubnet(UInt16 _netIndex, byte[] _netKey) throws BluezMeshInvalidArgumentsException, BluezMeshFailedException, BluezMeshAlreadyExistsException; /** * From bluez documentation:
*
* This method is used by the application to generate a new network
* subnet key, and set it's key refresh state to Phase 1.
*
* The net_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which net key to update. Note that the subnet must
* exist prior to updating.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _netIndex net_index * * @throws BluezMeshFailedException when operation failed * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshDoesNotExistException when not existing * @throws BluezMeshBusyException when already busy */ void UpdateSubnet(UInt16 _netIndex) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException, BluezMeshDoesNotExistException, BluezMeshBusyException; /** * From bluez documentation:
*
* This method is used by the application that to delete a subnet.
*
* The net_index parameter is a 12-bit value (0x001-0xFFF)
* specifying which net key to delete. The primary net key (0x000)
* may not be deleted.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _netIndex net_index * * @throws BluezMeshInvalidArgumentsException when invalid argument given */ void DeleteSubnet(UInt16 _netIndex) throws BluezMeshInvalidArgumentsException; /** * From bluez documentation:
* This method is used to set the flooding key update phase of the
* given subnet. When finalizing the procedure, it is important
* to CompleteAppKeyUpdate() on all app keys that have been
* updated during the procedure prior to setting phase 3.
*
* The net_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which subnet phase to set.
*
* The phase parameter is used to cycle the local key database
* through the phases as defined by the Mesh Profile Specification.
* Allowed values:
* 0 - Cancel Key Refresh (May only be called from Phase 1,
* and should never be called once the new key has
* started propagating)
* 1 - Invalid Argument (see NetKeyUpdate method)
* 2 - Go to Phase 2 (May only be called from Phase 1)
* 3 - Complete Key Refresh procedure (May only be called
* from Phase 2)
*
* This call affects the local bluetooth-meshd key database only.
* It is the responsibility of the application to maintain the key
* refresh phases per the Mesh Profile Specification.
*
* * @param _netIndex net_index * @param _phase phase * * @throws BluezMeshFailedException when operation failed * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshDoesNotExistException when not existing */ void SetKeyPhase(UInt16 _netIndex, byte _phase) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException, BluezMeshDoesNotExistException; /** * From bluez documentation:
*
* This method is used by the application to generate and add a new
* application key.
*
* The net_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which net key to bind the application key to.
*
* The app_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which app key to add.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _netIndex net_index * @param _appIndex app_index * * @throws BluezMeshFailedException when operation failed * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshAlreadyExistsException when already existing * @throws BluezMeshDoesNotExistException when not existing */ void CreateAppKey(UInt16 _netIndex, UInt16 _appIndex) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException, BluezMeshAlreadyExistsException, BluezMeshDoesNotExistException; /** * From bluez documentation:
*
* This method is used by the application to add an application
* key, that was originally generated by a remote Config Client.
*
* The net_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which net key to bind the application key to.
*
* The app_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which app key to import.
*
* The app_key parameter is the 16-byte value of the key being
* imported.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _netIndex net_index * @param _appIndex app_index * @param _appKey app_key * * @throws BluezMeshFailedException when operation failed * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshAlreadyExistsException when already existing * @throws BluezMeshDoesNotExistException when not existing */ void ImportAppKey(UInt16 _netIndex, UInt16 _appIndex, byte[] _appKey) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException, BluezMeshAlreadyExistsException, BluezMeshDoesNotExistException; /** * From bluez documentation:
*
* This method is used by the application to generate a new
* application key.
*
* The app_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which app key to update. Note that the subnet that
* the key is bound to must exist and be in Phase 1.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _appIndex app_index * * @throws BluezMeshFailedException when operation failed * @throws BluezMeshInvalidArgumentsException when invalid argument given * @throws BluezMeshDoesNotExistException when not existing * @throws BluezMeshInProgressException when already in progress */ void UpdateAppKey(UInt16 _appIndex) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException, BluezMeshDoesNotExistException, BluezMeshInProgressException; /** * From bluez documentation:
*
* This method is used by the application to delete an application
* key.
*
* The app_index parameter is a 12-bit value (0x000-0xFFF)
* specifying which app key to delete.
*
* This call affects the local bluetooth-meshd key database only.
*
* * @param _appIndex app_index * * @throws BluezMeshInvalidArgumentsException when invalid argument given */ void DeleteAppKey(UInt16 _appIndex) throws BluezMeshInvalidArgumentsException; /** * From bluez documentation:
*
* This method is used by the application to import a remote node
* that has been provisioned by an external process.
*
* The primary parameter specifies the unicast address of the
* the node being imported.
*
* The count parameter specifies the number of elements that are
* assigned to this remote node.
*
* The device_key parameter is the access layer key that will be
* will used to decrypt privledged messages from this remote node.
*
* This call affects the local bluetooth-meshd key database only.
*
* It is an error to call this with address range overlapping
* with local element addresses.
*
* * @param _primary primary * @param _count count * @param _deviceKey device_key * * @throws BluezMeshFailedException when operation failed * @throws BluezMeshInvalidArgumentsException when invalid argument given */ void ImportRemoteNode(UInt16 _primary, byte _count, byte[] _deviceKey) throws BluezMeshFailedException, BluezMeshInvalidArgumentsException; /** * From bluez documentation:
*
* This method is used by the application to delete a remote node
* from the local device key database.
*
* The primary parameter specifies the unicast address of the
* the node being deleted.
*
* The count parameter specifies the number of elements that were
* assigned to the remote node.
*
* This call affects the local bluetooth-meshd key database only.
*
* It is an error to call this with address range overlapping
* with local element addresses.
*
* * @param _primary primary * @param _count count * * @throws BluezMeshInvalidArgumentsException when invalid argument given */ void DeleteRemoteNode(UInt16 _primary, byte _count) throws BluezMeshInvalidArgumentsException; /** * From bluez documentation:
*
* This method is used by the application to export information
* about network keys, application keys and device keys present
* in the local key database.
*
* dict
* A dictionary that contains information for the keys
* stored in the keyring with the following keys defined:
*
* NetKeys:
* array{struct} net_keys:
*
* uint16 index
* Subnet index
*
* array{byte}[16] key
*
* dict:
* A dictionary that contains optional
* key info with the following keys
* defined:
*
* uint8 Phase
* Key Refresh phase of the subnet
*
* array{byte}[16] OldKey
*
* array{struct} AppKeys:
*
* uint16 index
*
* Application key index
*
* array{byte}[16] key
*
* dict:
* A dictionary of optional
* key info with the
* following keys defined:
*
* array{byte}[16] OldKey
*
* DevKeys:
* array{struct} dev_keys:
*
* Device Key information for known remote
* nodes in the configured Mesh network
*
* uint16 unicast
*
* Unicast address of the node's primary
* element
*
* array{byte}[16] key
*
* * @return Map<String, Variant<?>> - maybe null */ Map> ExportKeys(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy