Interface NodeManagement

  • All Superinterfaces:
    Feature

    public interface NodeManagement
    extends Feature
    • Method Detail

      • addDeviceListener

        void addDeviceListener​(DeviceListener deviceListener)
        Adds a listener which will get notified when the communication protocol detects a new device. The received address can then be used to get information with getFullDeviceInformationRequest(String).
        When automatic detailed discovery is enabled (DeviceBuilder.setDiscoverDevices(boolean)) the listener will be called also with the device information.
        Parameters:
        deviceListener - the listener which will be notified about detected devices
      • getFullDeviceInformationRequest

        java.util.concurrent.CompletableFuture<RequestResult> getFullDeviceInformationRequest​(java.lang.String communicationAddress)
        Executes a detailed discovery on the remote device. A successful discovery automatically maps the discovered SPINE device address to its corresponding communication address.
        Parameters:
        communicationAddress - the communication address of the remote device, i.e. not the SPINE device address
        Returns:
        a CompletableFuture which is completed with the answer
      • getDetailedDiscoveryUpdates

        java.util.concurrent.CompletableFuture<RequestResult> getDetailedDiscoveryUpdates​(java.lang.String deviceAddress,
                                                                                          DeviceListener listener,
                                                                                          boolean notifyFullRead)
        Parameters:
        deviceAddress - the SPINE device address part of the remote device
        listener - the DeviceListener which will be notified with updates
        notifyFullRead - true if a full read shall be executed on subscription success
        Returns:
        a CompletableFuture which is completed with the subscription acknowledgment
      • getFullUseCaseInformationRequest

        java.util.concurrent.CompletableFuture<RequestResult> getFullUseCaseInformationRequest​(java.lang.String device)
        Reads supported UseCases of a remote device
        Parameters:
        device - the SPINE device address part of the remote device
        Returns:
        a CompletableFuture which is completed with the answer
      • getUseCaseDiscoveryUpdates

        java.util.concurrent.CompletableFuture<RequestResult> getUseCaseDiscoveryUpdates​(java.lang.String deviceAddress,
                                                                                         UseCaseDiscoveryListener listener,
                                                                                         boolean notifyFullRead)
        Parameters:
        deviceAddress - the SPINE device address part of the remote device
        listener - the UseCaseDiscoveryListener which will be notified with updates
        notifyFullRead - true if a full read shall be executed on subscription success
        Returns:
        a CompletableFuture which is completed with the subscription acknowledgment
      • requestSubscriptionData

        java.util.concurrent.CompletableFuture<RequestResult> requestSubscriptionData​(java.lang.String deviceId)
        Reads the subscription data the remote device registered with this device. The returned CompletableFuture is completed with a SpineException on failure.
        Parameters:
        deviceId - the SPINE device address part of the remote device
        Returns:
        a CompletableFuture which is completed with the answer
      • requestBindingData

        java.util.concurrent.CompletableFuture<RequestResult> requestBindingData​(java.lang.String deviceId)
        Reads the binding data the remote device registered with this device. The returned CompletableFuture is completed with a SpineException on failure.
        Parameters:
        deviceId - the SPINE device address part of the remote device
        Returns:
        a CompletableFuture which is completed with the answer
      • requestDestinationListData

        java.util.concurrent.CompletableFuture<RequestResult> requestDestinationListData​(java.lang.String deviceId)
        Returns the destination list data of the remote device. The returned CompletableFuture is completed with a SpineException on failure.
        Parameters:
        deviceId - the SPINE device address part of the remote device
        Returns:
        a CompletableFuture which is completed with the answer
      • subscribeDestinationListData

        java.util.concurrent.CompletableFuture<RequestResult> subscribeDestinationListData​(java.lang.String deviceId,
                                                                                           SpineSubscription subscription,
                                                                                           boolean notifyFullRead)
        Subscribes to the destination list data function of the remote device. The returned CompletableFuture is completed with a SpineException on failure. If notifyFullRead is true after a successful subscription a full read is executed on the destination list data function. The reply is then passed to the subscription as a notification. This means notification until the read reply is received can be ignored.
        Parameters:
        deviceId - the SPINE device address part of the remote device
        subscription - the subscription which will be called with notifications
        notifyFullRead - true if a full read should be executed after successfully subscribing
        Returns:
        a CompletableFuture which is completed with the answer
      • mapAddressToCommunication

        void mapAddressToCommunication​(java.lang.String communicationAddress,
                                       java.lang.Integer communicationInterface)
        Assigns the given address to the given communication interface. The communicationInterface parameter can be retrieved with createInterfaceGroup(). This method has no effect when enhanced communication mode is disabled.
        Parameters:
        communicationAddress - the communication address which will be mapped to the communication interface
        communicationInterface - the communication interface received with createInterfaceGroup()
      • createInterfaceGroup

        java.lang.Integer createInterfaceGroup()
        Creates a new interface group which communication addresses can be assigned to. The destination list data function can then filter the destination list to only contain destinations on different interfaces than the sender. This method has no effect when enhanced communication mode is disabled.
        Returns:
        the unique id of the newly created group
      • removeAddressMapping

        void removeAddressMapping​(java.lang.String communicationAddress)
        Unmap the current communication interface from the given communication address.
        Parameters:
        communicationAddress - the communication address which should be unmapped from the current communication interface