Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

BaSyx CFG sub model provider

CFG sub model provider servlet

The CFG sub model provider reads all properties that are to be exported as sub model from a main configuration file. The provider creates a conforming sub model structure with meta data and the provided property values from the configuration file. It is implemented by servlet class org.eclipse.basyx.components.servlets.CFGSubModelProviderServlet. It accepts the following configuration parameter:

  • config: Path to configuration file


The following snippet illustrates an Apache Tomcat configuration for the CFG sub model provider Example_CFGProvider. It configures the location of the configuration file inside the WEB-INF folder and configures the URL pattern that is used to access the sub model to /Testsuite/components/BaSys/1.0/provider/cfgsm


  <servlet>
    <servlet-name>Example_CFGProvider</servlet-name>
    <servlet-class> org.eclipse.basyx.components.servlets.CFGSubModelProviderServlet </servlet-class>
 
    <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/config/cfgprovider/samplecfg.properties</param-value>
    </init-param>
 
    <load-on-startup>5</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Example_CFGProvider</servlet-name>
    <url-pattern>/Testsuite/components/BaSys/1.0/provider/cfgsm/*</url-pattern>
  </servlet-mapping>


The main configuration file of the CFG sub model provider contains the sub model meta data and sub model properties that are exported by the CFG sub model provider. The following properties are supported for describing sub model meta data. The provider makes sure that meta data is exported as conforming sub model meta data. For a more in depth description, please refer to <<<PDF>>>.

basyx.submodelID ID of sub model
basyx.submodelSemantics Sub model semantics type (IRDI/Internal)
basyx.semantics Sub model semantics
basyx.idType Type of sub model ID (IRDI, URI, Internal)
basyx.id Sub model ID according to idType
basyx.idShort Short ID of the sub model (e.g. "subsystemTopology")
basyx.category Additional coded meta information regarding the element type that affects expected existence of attributes (e.g. "transportSystemTopology")
basyx.description Descriptive sub model description (e.g. "This is a machine readable description of the transport system topology")
basyx.qualifier The qualifier of this sub model (e.g. "plant.maintransport")
basyx.version Sub model version
basyx.revision Sub model revision
properties Configures the list of properties


For each property, the name, value, type, and meta data may be defined:

<propertyName> Defines value of property
<propertyName>.type Defines property type
<propertyName>.semanticsInternal Defines property semantics information meta data
<propertyName>.category Defines property category meta data
<propertyName>.description Defines property type meta data
<propertyName>.qualifier Defines property qualifier meta data

Property types and meta data conform to the sub model definition described in <<<>>>.


Servlet configuration example

The following illustrates an example main configuration file with three properties and meta data:

# ##############################################################
# Configuration sub model provider configuration file
# ##############################################################
 
 
# ##############################################################
# Sub model provider configuration
 
# Name of provided sub model
basyx.submodelID       = sampleCFG
 
 
# ##############################################################
# Sub model meta data
 
# Sub model semantics type - supported type values are irdi, internal
# - This value must be set if the basyx.* properties are to be parsed. If unsure, use "internal"
basyx.submodelSemantics = internal
 
# String that describes the sub model semantics e.g. its type (e.g. basys.semantics.transportsystem)
basyx.semantics         = basys.semantics.test.cfgfile
 
# Type of sub model ID (Identification.IRDI, Identification.URI, Identification.Internal) 
basyx.idType            = Identification.Internal
 
# Sub model ID according to idType
basyx.id                = basys.components.testsuite.cfgTestSubModel
 
# Short ID of the sub model (e.g. "subsystemTopology")
basyx.idShort           = CfgFileTestAAS
 
# Additional coded meta information regarding the element type that affects expected existence of attributes (e.g. "transportSystemTopology")
basyx.category          = basys.components.tests.regression
 
# Descriptive sub model description (e.g. "This is a machine readable description of the transport system topology")
basyx.description       = BaSys regression test file for CFG file provider
 
# The qualifier of this sub model (e.g. "plant.maintransport")
basyx.qualifier         = basys.components.regression
 
# Sub model version
basyx.version           = 1.0
 
# Sub model revision
basyx.revision          = 2
 
 
# ##############################################################
# Exported configuration
 
# List of exported properties
properties                     = cfgProperty1,cfgProperty2,cfgProperty3
 
# Export property "cfgProperty1" and its meta data
cfgProperty1                   = exampleStringValue
cfgProperty1.type              = PropertySingleValued
cfgProperty1.semanticsInternal = basys.semantics.internal.cfgProperty1
cfgProperty1.category          = configurationProperty
cfgProperty1.description       = Configuration property description
cfgProperty1.qualifier         = basys.test.scope
 
# Export property "cfgProperty2" and its meta data
cfgProperty2                   = 12
cfgProperty2.type              = PropertySingleValued
cfgProperty2.semanticsInternal = basys.semantics.internal.cfgProperty2
cfgProperty2.category          = configurationProperty
cfgProperty2.description       = Configuration property description \
				 on multiple lines
 
# Export property "cfgProperty3" and its meta data
cfgProperty3                   = 45.8
cfgProperty3.type              = PropertySingleValued


BaSyx project links: Project BaSyx main wiki page | What is BaSyx? | BaSyx Developer Documentation

Back to the top