From 1759ff2b59357c01368b8a8d7653fb1d6a75efd4 Mon Sep 17 00:00:00 2001 From: "Rule Timothy (CC/EMT2)" Date: Thu, 20 Apr 2023 14:34:38 +0200 Subject: [PATCH] Gateway runtime addition to Model schema. --- doc/content/schemas/yaml/Model.md | 97 ++++++++++++++++++++++--------- schemas/yaml/Model.yaml | 70 +++++++++++++++++----- 2 files changed, 127 insertions(+), 40 deletions(-) diff --git a/doc/content/schemas/yaml/Model.md b/doc/content/schemas/yaml/Model.md index 7a839ed..23de64f 100644 --- a/doc/content/schemas/yaml/Model.md +++ b/doc/content/schemas/yaml/Model.md @@ -24,16 +24,6 @@ metadata: property2: string spec: runtime: - executable: - - path: string - os: string - arch: string - variant: string - libs: - - string - annotations: - property1: string - property2: string dynlib: - path: string os: string @@ -44,16 +34,18 @@ spec: annotations: property1: string property2: string - container: - - path: string - os: string + executable: + - os: string arch: string - variant: string libs: - string annotations: property1: string property2: string + gateway: + annotations: + property1: string + property2: string mcl: - path: string os: string @@ -77,7 +69,7 @@ spec: ``` -A model definition. +This schema object defines a Model kind. A Model kind is used to define a model which participates within a DSE based simulation. ### Properties @@ -91,11 +83,11 @@ A model definition. |» annotations|object|false|Non identifying information (i.e. information specific to the object itself).| |»» **additionalProperties**|string|false|none| |spec|object|true|none| -|» runtime|object|false|Collection of runtimes made available by this model (package).| -|»» executable|[[RuntimeSpec](#schemaruntimespec)]|false|Executable runtime specifications.| -|»» dynlib|[[RuntimeSpec](#schemaruntimespec)]|false|Dynamic Library runtime specifications.| -|»» container|[[RuntimeSpec](#schemaruntimespec)]|false|Container runtime specifications.| -|»» mcl|[[RuntimeSpec](#schemaruntimespec)]|false|Model Compatibility Library runtime specifications.| +|» runtime|object|false|Selects (or defines) the kind of runtime that a particular model implements. In some cases several runtimes of a particular type may be defined according to operating system architecture.| +|»» dynlib|[[LibrarySpec](#schemalibraryspec)]|false|Dynamic Library runtime specifications.| +|»» executable|[[ExecutableSpec](#schemaexecutablespec)]|false|Executable runtime specifications.| +|»» gateway|[GatewaySpec](#schemagatewayspec)|false|Defines a Gateway Model which represents a connection from a remote simulation system. The remote system loads a model which includes the ModelC Gateway functionality, that model is then able to connect to a DSE based simulation using the ModelC Gateway functionality.
The remote system may be a different type of simulation environment.| +|»» mcl|[[LibrarySpec](#schemalibraryspec)]|false|Model Compatibility Library runtime specifications.| |» channels|[object]|false|A list of channels belonging to this model.| |»» name|string|false|The name of the channel, used when connecting this channel to the SimBus.| |»» alias|string|false|The alias of the channel, used when the channel name will be determined elsewhere.| @@ -111,12 +103,12 @@ A model definition. |---|---| |kind|Model| -

RuntimeSpec

+

LibrarySpec

- - - - + + + + ```yaml path: string @@ -131,7 +123,8 @@ annotations: ``` -A runtime definition. +Defines a Model which is implemented as a dynamic library. +The model defined here will be loaded by an appropriate runtime executable, that executable provides all necessary library functions related to the DSE simulation environment. Addition libraries may be specified via the `libs` property. ### Properties @@ -145,5 +138,57 @@ A runtime definition. |annotations|object|false|Non identifying information (i.e. information specific to the object itself).| |» **additionalProperties**|string|false|none| +

GatewaySpec

+ + + + + + +```yaml +annotations: + property1: string + property2: string + +``` + +Defines a Gateway Model which represents a connection from a remote simulation system. The remote system loads a model which includes the ModelC Gateway functionality, that model is then able to connect to a DSE based simulation using the ModelC Gateway functionality. +The remote system may be a different type of simulation environment. + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---| +|annotations|[LibrarySpec/properties/annotations](#schemalibraryspec/properties/annotations)|false|Non identifying information (i.e. information specific to the object itself).| + +

ExecutableSpec

+ + + + + + +```yaml +os: string +arch: string +libs: + - string +annotations: + property1: string + property2: string + +``` + +Defines a model implemented in an executable. The functions representing the model functionality will be taken directly from linked symbols in the executable file. + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---| +|os|string|false|Indicate the operating system of the executable (e.g. linux, windows).| +|arch|string|false|Indicate the architecture of the executable (e.g. amd64, w32)| +|libs|[string]|false|A list of libraries on which the executable is dependant. The executable would load each of the listed libraries.| +|annotations|[LibrarySpec/properties/annotations](#schemalibraryspec/properties/annotations)|false|Non identifying information (i.e. information specific to the object itself).| + undefined diff --git a/schemas/yaml/Model.yaml b/schemas/yaml/Model.yaml index 4029494..198add6 100644 --- a/schemas/yaml/Model.yaml +++ b/schemas/yaml/Model.yaml @@ -16,7 +16,9 @@ paths: components: schemas: Model: - description: A model definition. + description: > + This schema object defines a Model kind. A Model kind is used to define + a model which participates within a DSE based simulation. type: object required: - kind @@ -33,36 +35,42 @@ components: properties: runtime: type: object - description: Collection of runtimes made available by this model (package). + description: > + Selects (or defines) the kind of runtime that a particular model + implements. In some cases several runtimes of a particular type + may be defined according to operating system architecture. properties: - executable: - type: array - description: Executable runtime specifications. - items: - $ref: '#/components/schemas/RuntimeSpec' dynlib: type: array description: Dynamic Library runtime specifications. items: - $ref: '#/components/schemas/RuntimeSpec' - container: + $ref: '#/components/schemas/LibrarySpec' + executable: type: array - description: Container runtime specifications. + description: Executable runtime specifications. items: - $ref: '#/components/schemas/RuntimeSpec' + $ref: '#/components/schemas/ExecutableSpec' + gateway: + $ref: '#/components/schemas/GatewaySpec' mcl: type: array description: Model Compatibility Library runtime specifications. items: - $ref: '#/components/schemas/RuntimeSpec' + $ref: '#/components/schemas/LibrarySpec' channels: type: array description: A list of channels belonging to this model. items: $ref: 'channel.yaml#/components/schemas/Channel' - RuntimeSpec: + LibrarySpec: type: object - description: A runtime definition. + description: > + Defines a Model which is implemented as a dynamic library. + + The model defined here will be loaded by an appropriate runtime + executable, that executable provides all necessary library functions + related to the DSE simulation environment. Addition libraries may + be specified via the `libs` property. required: - path properties: @@ -85,3 +93,37 @@ components: type: string annotations: $ref: 'metadata.yaml#/components/schemas/Annotations' + GatewaySpec: + type: object + description: > + Defines a Gateway Model which represents a connection from a remote + simulation system. The remote system loads a model which includes the + ModelC Gateway functionality, that model is then able to connect to a + DSE based simulation using the ModelC Gateway functionality. + + The remote system may be a different type of simulation environment. + properties: + annotations: + $ref: 'metadata.yaml#/components/schemas/Annotations' + ExecutableSpec: + type: object + description: > + Defines a model implemented in an executable. The functions representing + the model functionality will be taken directly from linked symbols in + the executable file. + properties: + os: + type: string + description: Indicate the operating system of the executable (e.g. linux, windows). + arch: + type: string + description: Indicate the architecture of the executable (e.g. amd64, w32) + libs: + type: array + description: > + A list of libraries on which the executable is dependant. The + executable would load each of the listed libraries. + items: + type: string + annotations: + $ref: 'metadata.yaml#/components/schemas/Annotations'