Class EcsAas
java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.EcsAas
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.iip_aas.AasContributor
public class EcsAas
extends Object
implements de.iip_ecosphere.platform.support.iip_aas.AasContributor
Implements the AAS for the ECS runtime. Container ids used as short AAS ids may be translated into ids that are
valid from the perspective of the AAS implementation. All nested elements also carry their original id in
NAME_PROP_ID.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
de.iip_ecosphere.platform.support.iip_aas.AasContributor.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddContainer(de.iip_ecosphere.platform.support.aas.Submodel.SubmodelBuilder smB, ContainerDescriptor desc) Adds a container to the given submodel builder.de.iip_ecosphere.platform.support.aas.AascontributeTo(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator) voidcontributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) private voidcontributeToImpl(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) Implements the contribution to the implementation server.private voidcreateIdOp(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smB, String name, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator, String... otherParams) Creates an operation with a String parameter "id" and optional string parameters and a result of type string.static voidenable()Explicitly enables this AAS.de.iip_ecosphere.platform.support.iip_aas.AasContributor.KindgetKind()private static de.iip_ecosphere.platform.support.logging.LoggerReturns the logger instance.static StringReturns the qualified name for an operation/property implementation.booleanisValid()static voidIs called when a container is added.static voidIs called when a container is removed.static voidIs called when a container state changed.static voidIs called when the entire resource is removed.static voidremoveDevice(String deviceId, Consumer<de.iip_ecosphere.platform.support.aas.Submodel> marker, Consumer<de.iip_ecosphere.platform.support.aas.Submodel> piggyback) Removes a specific device.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
exists, getAasAuthentication, getSubmodelAuthentication
-
Field Details
-
NAME_SUBMODEL
- See Also:
-
NAME_PROP_CSYS_NAME
- See Also:
-
NAME_PROP_CSYS_VERSION
- See Also:
-
NAME_COLL_CONTAINERS
- See Also:
-
NAME_PROP_ID
- See Also:
-
NAME_PROP_NAME
- See Also:
-
NAME_PROP_VERSION
- See Also:
-
NAME_PROP_STATE
- See Also:
-
NAME_PROP_RESOURCE
- See Also:
-
NAME_PROP_RUNTIME_NAME
- See Also:
-
NAME_PROP_RUNTIME_VERSION
- See Also:
-
NAME_PROP_DEVICE_AAS
- See Also:
-
NAME_PROP_OPERATING_SYSTEM
- See Also:
-
NAME_PROP_CPU_ARCHITECTURE
- See Also:
-
NAME_PROP_CPU_CAPACITY
- See Also:
-
NAME_PROP_GPU_CAPACITY
- See Also:
-
NAME_OP_GET_STATE
- See Also:
-
NAME_OP_CONTAINER_ADD
- See Also:
-
NAME_OP_CONTAINER_GETID
- See Also:
-
NAME_OP_CONTAINER_ADD_TASK
- See Also:
-
NAME_OP_CONTAINER_UNDEPLOY
- See Also:
-
NAME_OP_CONTAINER_UPDATE
- See Also:
-
NAME_OP_CONTAINER_MIGRATE
- See Also:
-
NAME_OP_CONTAINER_STOP
- See Also:
-
NAME_OP_CONTAINER_STOP_TASK
- See Also:
-
NAME_OP_CONTAINER_START
- See Also:
-
NAME_OP_CONTAINER_START_TASK
- See Also:
-
NAME_OP_CREATE_REMOTE_CONNECTION_CREDENTIALS
- See Also:
-
enabled
private static boolean enabled
-
-
Constructor Details
-
EcsAas
public EcsAas()
-
-
Method Details
-
contributeTo
public de.iip_ecosphere.platform.support.aas.Aas contributeTo(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator) - Specified by:
contributeToin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-
contributeTo
public void contributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) - Specified by:
contributeToin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-
contributeToImpl
private void contributeToImpl(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) Implements the contribution to the implementation server.- Parameters:
sBuilder- the server builder
-
getKind
public de.iip_ecosphere.platform.support.iip_aas.AasContributor.Kind getKind()- Specified by:
getKindin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-
createIdOp
private void createIdOp(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smB, String name, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator, String... otherParams) Creates an operation with a String parameter "id" and optional string parameters and a result of type string. The operation name is derived fromnameapplied togetQName(String).- Parameters:
smB- the submodel element collection buildername- the operation nameiCreator- the invocables creatorotherParams- other String parameters
-
getQName
Returns the qualified name for an operation/property implementation.- Parameters:
elementName- the element name- Returns:
- the qualified name
-
addContainer
private static void addContainer(de.iip_ecosphere.platform.support.aas.Submodel.SubmodelBuilder smB, ContainerDescriptor desc) Adds a container to the given submodel builder.- Parameters:
smB- represents the submodel in creationdesc- the descriptor to be added
-
notifyContainerAdded
Is called when a container is added.- Parameters:
desc- the container descriptor
-
notifyContainerRemoved
Is called when a container is removed.- Parameters:
desc- the container descriptor
-
notifyResourceRemoved
public static void notifyResourceRemoved()Is called when the entire resource is removed. -
removeDevice
public static void removeDevice(String deviceId, Consumer<de.iip_ecosphere.platform.support.aas.Submodel> marker, Consumer<de.iip_ecosphere.platform.support.aas.Submodel> piggyback) Removes a specific device.- Parameters:
deviceId- the device idmarker- optional marker consumer when we start to remove the device entry, may be nullpiggyback- optional piggyback to be executed on the same submodel, may be null
-
notifyContainerStateChanged
Is called when a container state changed.- Parameters:
desc- the container descriptor
-
getLogger
private static de.iip_ecosphere.platform.support.logging.Logger getLogger()Returns the logger instance.- Returns:
- the logger instance
-
enable
public static void enable()Explicitly enables this AAS. Required when the platform services shall start without ECS runtime. -
isValid
public boolean isValid()- Specified by:
isValidin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-