Package org.openmuc.jeebus.spine.api
Interface Device
-
- All Superinterfaces:
java.lang.AutoCloseable,EntityParent,Shutdownable
public interface Device extends EntityParent, Shutdownable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUseCase(UseCase useCase)Add a use case to this device.voiddeviceDetected(java.lang.String address)Starts the detailed discovery process if enabledorg.openmuc.jeebus.spine.xsd.v1.DeviceAddressTypegetAddress()static DeviceBuildergetBuilder()org.openmuc.jeebus.spine.xsd.v1.NetworkManagementFeatureSetTypegetCommunicationMode()ConnectionHandlergetConnectionHandler()java.lang.StringgetDescription()FeaturegetFeature(org.openmuc.jeebus.spine.xsd.v1.FeatureAddressType featureAddress)Returns the feature with the address given or throws a SpineException if the requested feature does not exist.java.lang.StringgetLabel()NodeManagementgetNodeManagement()Returns the node management feature instance associated to this device.org.openmuc.jeebus.spine.xsd.v1.SpecificationVersionDataTypegetSpecificationVersion()org.openmuc.jeebus.spine.xsd.v1.DeviceTypeEnumTypegetType()java.util.Set<UseCase>getUseCases()booleanhasDescription()booleanhasLabel()voidparseDatagram(org.openmuc.jeebus.spine.xsd.v1.DatagramType datagram)Forwards the given datagram to the receiving feature for processing-
Methods inherited from interface org.openmuc.jeebus.spine.api.EntityParent
addEntity, deleteEntity, getDevice, getEntities, getEntity, getParent, isDevice
-
Methods inherited from interface org.openmuc.jeebus.spine.api.Shutdownable
close
-
-
-
-
Method Detail
-
getBuilder
static DeviceBuilder getBuilder()
- Returns:
- a new
DeviceBuilderobject to create a new SPINE device
-
getNodeManagement
NodeManagement getNodeManagement()
Returns the node management feature instance associated to this device.- Returns:
- the node management feature instance
-
getConnectionHandler
ConnectionHandler getConnectionHandler()
- Returns:
- the connection handler instance
-
getAddress
org.openmuc.jeebus.spine.xsd.v1.DeviceAddressType getAddress()
- Returns:
- the device address
-
deviceDetected
void deviceDetected(java.lang.String address)
Starts the detailed discovery process if enabled- Parameters:
address- The address on which the new device was detected
-
parseDatagram
void parseDatagram(org.openmuc.jeebus.spine.xsd.v1.DatagramType datagram)
Forwards the given datagram to the receiving feature for processing- Parameters:
datagram- filled SPINE datagram
-
getSpecificationVersion
org.openmuc.jeebus.spine.xsd.v1.SpecificationVersionDataType getSpecificationVersion()
- Returns:
- the latest SPINE specification version this device supports
-
getType
org.openmuc.jeebus.spine.xsd.v1.DeviceTypeEnumType getType()
- Returns:
- the type of this device
-
hasDescription
boolean hasDescription()
- Returns:
- true if this device has a description set and false otherwise
-
hasLabel
boolean hasLabel()
- Returns:
- true if this device has a label set and false otherwise
-
getFeature
Feature getFeature(org.openmuc.jeebus.spine.xsd.v1.FeatureAddressType featureAddress) throws SpineException
Returns the feature with the address given or throws a SpineException if the requested feature does not exist.- Parameters:
featureAddress- the address of the requested feature including the entity address parts- Returns:
- the feature with the given address
- Throws:
SpineException- when no feature at the given address exists
-
getLabel
java.lang.String getLabel()
- Returns:
- the label set or the empty string if no label was set
-
getDescription
java.lang.String getDescription()
- Returns:
- the description set or the empty string if no label was set
-
getCommunicationMode
org.openmuc.jeebus.spine.xsd.v1.NetworkManagementFeatureSetType getCommunicationMode()
- Returns:
- the communication mode this device supports (every value other than SIMPLE means enhanced communication mode)
-
addUseCase
void addUseCase(UseCase useCase)
Add a use case to this device. The use case will haveUseCase.setDevice(Device)called, allowing it to add entities and so on that it needs to function.- Parameters:
useCase- the use case to add.
-
getUseCases
java.util.Set<UseCase> getUseCases()
- Returns:
- a set of use cases active on the device
-
-