Package org.openmuc.eebus.spine.api
Interface EntityParent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addEntity(Entity entity)
Adds an entity with all its sub-entities and features to this device/entity at runtime.void
deleteEntity(int address)
Device
getDevice()
java.util.Collection<Entity>
getEntities()
Entity
getEntity(int address)
EntityParent
getParent()
boolean
isDevice()
-
-
-
Method Detail
-
addEntity
int addEntity(Entity entity)
Adds an entity with all its sub-entities and features to this device/entity at runtime. After the entity was added theNodeManagement
instance notifies subscribers about the change.- Parameters:
entity
- the entity built withEntity.getBuilder()
- Returns:
- the entity address part of the added entity
-
getEntity
Entity getEntity(int address) throws SpineException
- Parameters:
address
- the entity address part of the entity addressEntityAddressType.getEntity()
. Note that this implementation limits entity addresses toInteger.MAX_VALUE
- Returns:
- the entity with the given address
- Throws:
SpineException
- when no entity with the given address exists
-
deleteEntity
void deleteEntity(int address) throws SpineException
- Parameters:
address
- the entity address part of the entity addressEntityAddressType.getEntity()
. Note that this implementation limits entity addresses toInteger.MAX_VALUE
- Throws:
SpineException
- when no entity with the given address exists
-
getParent
EntityParent getParent()
- Returns:
- the parent of this entity or
null
if this is a device
-
getEntities
java.util.Collection<Entity> getEntities()
- Returns:
- all sub-entities of this entity excluding sub-entities of sub-entities
-
isDevice
boolean isDevice()
- Returns:
- true if this is a
Device
, false if this is anEntity
-
getDevice
Device getDevice()
- Returns:
- the device this entity belongs to or this instance itself if this a device
-
-