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
  • Field Details

  • 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:
      contributeTo in interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
    • contributeTo

      public void contributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder)
      Specified by:
      contributeTo in interface de.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:
      getKind in interface de.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 from name applied to getQName(String).
      Parameters:
      smB - the submodel element collection builder
      name - the operation name
      iCreator - the invocables creator
      otherParams - other String parameters
    • getQName

      public static String getQName(String elementName)
      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 creation
      desc - the descriptor to be added
    • notifyContainerAdded

      public static void notifyContainerAdded(ContainerDescriptor desc)
      Is called when a container is added.
      Parameters:
      desc - the container descriptor
    • notifyContainerRemoved

      public static void notifyContainerRemoved(ContainerDescriptor desc)
      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 id
      marker - optional marker consumer when we start to remove the device entry, may be null
      piggyback - optional piggyback to be executed on the same submodel, may be null
    • notifyContainerStateChanged

      public static void notifyContainerStateChanged(ContainerDescriptor desc)
      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:
      isValid in interface de.iip_ecosphere.platform.support.iip_aas.AasContributor