Package org.openmuc.eebus.spine.api
Interface NodeManagement
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDeviceListener(DeviceListener deviceListener)
Adds a listener which will get notified when the communication protocol detects a new device.java.lang.Integer
createInterfaceGroup()
Creates a new interface group which communication addresses can be assigned to.java.util.concurrent.CompletableFuture<RequestResult>
getDetailedDiscoveryUpdates(java.lang.String deviceAddress, DeviceListener listener, boolean notifyFullRead)
java.util.concurrent.CompletableFuture<RequestResult>
getFullDeviceInformationRequest(java.lang.String communicationAddress)
Executes a detailed discovery on the remote device.java.util.concurrent.CompletableFuture<RequestResult>
getFullUseCaseInformationRequest(java.lang.String device)
Reads supported UseCases of a remote devicejava.util.concurrent.CompletableFuture<RequestResult>
getUseCaseDiscoveryUpdates(java.lang.String deviceAddress, UseCaseDiscoveryListener listener, boolean notifyFullRead)
void
mapAddressToCommunication(java.lang.String communicationAddress, java.lang.Integer communicationInterface)
Assigns the given address to the given communication interface.void
removeAddressMapping(java.lang.String communicationAddress)
Unmap the current communication interface from the given communication address.java.util.concurrent.CompletableFuture<RequestResult>
requestBindingData(java.lang.String deviceId)
Reads the binding data the remote device registered with this device.java.util.concurrent.CompletableFuture<RequestResult>
requestDestinationListData(java.lang.String deviceId)
Returns the destination list data of the remote device.java.util.concurrent.CompletableFuture<RequestResult>
requestSubscriptionData(java.lang.String deviceId)
Reads the subscription data the remote device registered with this device.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.-
Methods inherited from interface org.openmuc.eebus.spine.api.Feature
addFunction, getAddress, getDescription, getDevice, getLabel, getRole, getType, hasDescription, hasLabel, notifySubscribers, notifySubscribers, releaseBoundClient, releaseBoundServer, releaseSubscriber, releaseSubscription, requestBind, requestRead, requestSubscription, requestWrite
-
-
-
-
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 withgetFullDeviceInformationRequest(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 devicelistener
- theDeviceListener
which will be notified with updatesnotifyFullRead
- 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 devicelistener
- theUseCaseDiscoveryListener
which will be notified with updatesnotifyFullRead
- 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 returnedCompletableFuture
is completed with aSpineException
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 returnedCompletableFuture
is completed with aSpineException
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 returnedCompletableFuture
is completed with aSpineException
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 returnedCompletableFuture
is completed with aSpineException
on failure. If notifyFullRead istrue
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 devicesubscription
- the subscription which will be called with notificationsnotifyFullRead
- 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 withcreateInterfaceGroup()
. This method has no effect when enhanced communication mode is disabled.- Parameters:
communicationAddress
- the communication address which will be mapped to the communication interfacecommunicationInterface
- the communication interface received withcreateInterfaceGroup()
-
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
-
-