-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also adding some tests Signed-off-by: Erik Jaegervall <[email protected]>
- Loading branch information
Showing
8 changed files
with
601 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
179 changes: 179 additions & 0 deletions
179
tests/vspec/test_datatypes/expected.samm/com.covesa.vss.spec/1.0.0/A.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
@prefix : <urn:samm:com.covesa.vss.spec:1.0.0#> . | ||
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.1.0#> . | ||
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.1.0#> . | ||
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.1.0#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
:A a samm:Aspect ; | ||
samm:events () ; | ||
samm:operations () ; | ||
samm:preferredName "A"@en ; | ||
samm:properties ( :a ) . | ||
|
||
:a a samm:Property ; | ||
samm:characteristic :ACharacteristic ; | ||
samm:preferredName "A"@en . | ||
|
||
:double a samm:Property ; | ||
samm:characteristic :DoubleCharacteristic ; | ||
samm:preferredName "Double"@en . | ||
|
||
:float a samm:Property ; | ||
samm:characteristic :FloatCharacteristic ; | ||
samm:preferredName "Float"@en . | ||
|
||
:int16 a samm:Property ; | ||
samm:characteristic :Int16Characteristic ; | ||
samm:preferredName "Int16"@en . | ||
|
||
:int32 a samm:Property ; | ||
samm:characteristic :Int32Characteristic ; | ||
samm:preferredName "Int32"@en . | ||
|
||
:int64 a samm:Property ; | ||
samm:characteristic :Int64Characteristic ; | ||
samm:preferredName "Int64"@en . | ||
|
||
:int8 a samm:Property ; | ||
samm:characteristic :Int8Characteristic ; | ||
samm:preferredName "Int8"@en . | ||
|
||
:isBoolean a samm:Property ; | ||
samm:characteristic :IsBooleanCharacteristic ; | ||
samm:preferredName "Is Boolean"@en . | ||
|
||
:uInt16 a samm:Property ; | ||
samm:characteristic :UInt16Characteristic ; | ||
samm:preferredName "U Int16"@en . | ||
|
||
:uInt32 a samm:Property ; | ||
samm:characteristic :UInt32Characteristic ; | ||
samm:preferredName "U Int32"@en . | ||
|
||
:uInt64 a samm:Property ; | ||
samm:characteristic :UInt64Characteristic ; | ||
samm:preferredName "U Int64"@en . | ||
|
||
:uInt8 a samm:Property ; | ||
samm:characteristic :UInt8Characteristic ; | ||
samm:preferredName "U Int8"@en . | ||
|
||
:ACharacteristic a samm:Characteristic ; | ||
samm:dataType :AEntity ; | ||
samm:description """ | ||
VSS path : A | ||
Description: Branch A."""@en ; | ||
samm:name "ACharacteristic" . | ||
|
||
:AEntity a samm:Entity ; | ||
samm:properties ( [ samm:property :uInt8; samm:payloadName "uInt8" ] [ samm:property :int8; samm:payloadName "int8" ] [ samm:property :uInt16; samm:payloadName "uInt16" ] [ samm:property :int16; samm:payloadName "int16" ] [ samm:property :uInt32; samm:payloadName "uInt32" ] [ samm:property :int32; samm:payloadName "int32" ] [ samm:property :uInt64; samm:payloadName "uInt64" ] [ samm:property :int64; samm:payloadName "int64" ] [ samm:property :isBoolean; samm:payloadName "isBoolean" ] [ samm:property :float; samm:payloadName "float" ] [ samm:property :double; samm:payloadName "double" ] ) . | ||
|
||
:DoubleCharacteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:double ; | ||
samm:description """ | ||
VSS path : A.Double | ||
Description: A double. | ||
Unit : km"""@en . | ||
|
||
:FloatCharacteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:float ; | ||
samm:description """ | ||
VSS path : A.Float | ||
Description: A float. | ||
Unit : km"""@en . | ||
|
||
:Int16Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:short ; | ||
samm:description """ | ||
VSS path : A.Int16 | ||
Description: An int16. | ||
Unit : km"""@en . | ||
|
||
:Int32Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:int ; | ||
samm:description """ | ||
VSS path : A.Int32 | ||
Description: An int32 | ||
Unit : km"""@en . | ||
|
||
:Int64Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:long ; | ||
samm:description """ | ||
VSS path : A.Int64 | ||
Description: An int64 | ||
Unit : km"""@en . | ||
|
||
:Int8Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:byte ; | ||
samm:description """ | ||
VSS path : A.Int8 | ||
Description: An int8. | ||
Unit : km"""@en . | ||
|
||
:IsBooleanCharacteristic a samm:Characteristic ; | ||
samm:dataType xsd:boolean ; | ||
samm:description """ | ||
VSS path : A.IsBoolean | ||
Description: A boolean"""@en . | ||
|
||
:UInt16Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:unsignedShort ; | ||
samm:description """ | ||
VSS path : A.UInt16 | ||
Description: A uint16. | ||
Unit : km"""@en . | ||
|
||
:UInt32Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:unsignedShort ; | ||
samm:description """ | ||
VSS path : A.UInt32 | ||
Description: A uint32. | ||
Unit : km"""@en . | ||
|
||
:UInt64Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:unsignedLong ; | ||
samm:description """ | ||
VSS path : A.UInt64 | ||
Description: A uint64. | ||
Unit : km"""@en . | ||
|
||
:UInt8Characteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:unsignedByte ; | ||
samm:description """ | ||
VSS path : A.UInt8 | ||
Description: A uint8. | ||
Unit : km"""@en . | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package vss | ||
|
||
type A struct { | ||
B B | ||
} | ||
type B struct { | ||
Row1 BI1 | ||
Row2 BI1 | ||
} | ||
type BI1 struct { | ||
Left BI2 | ||
Right BI2 | ||
} | ||
type BI2 struct { | ||
C int8 | ||
} |
25 changes: 25 additions & 0 deletions
25
tests/vspec/test_instances/expected.samm/com.covesa.vss.spec/1.0.0/A.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@prefix : <urn:samm:com.covesa.vss.spec:1.0.0#> . | ||
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.1.0#> . | ||
|
||
:A a samm:Aspect ; | ||
samm:events () ; | ||
samm:operations () ; | ||
samm:preferredName "A"@en ; | ||
samm:properties ( :a ) . | ||
|
||
:a a samm:Property ; | ||
samm:characteristic :ACharacteristic ; | ||
samm:preferredName "A"@en . | ||
|
||
:ACharacteristic a samm:Characteristic ; | ||
samm:dataType :AEntity ; | ||
samm:description """ | ||
VSS path : A | ||
Description: Branch A."""@en ; | ||
samm:name "ACharacteristic" . | ||
|
||
:AEntity a samm:Entity ; | ||
samm:properties ( [ samm:property :b; samm:payloadName "b" ] ) . | ||
|
||
|
78 changes: 78 additions & 0 deletions
78
tests/vspec/test_instances/expected.samm/com.covesa.vss.spec/1.0.0/B.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
@prefix : <urn:samm:com.covesa.vss.spec:1.0.0#> . | ||
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.1.0#> . | ||
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.1.0#> . | ||
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.1.0#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
:B a samm:Aspect ; | ||
samm:events () ; | ||
samm:operations () ; | ||
samm:preferredName "B"@en ; | ||
samm:properties ( :b ) . | ||
|
||
:b a samm:Property ; | ||
samm:characteristic :BInstanceSingleEntity ; | ||
samm:preferredName "B"@en . | ||
|
||
:bRow1 a samm:Property ; | ||
samm:characteristic :BRowSingleEntity ; | ||
samm:preferredName "B Row1"@en . | ||
|
||
:bRow2 a samm:Property ; | ||
samm:characteristic :BRowSingleEntity ; | ||
samm:preferredName "B Row2"@en . | ||
|
||
:bRowLeft a samm:Property ; | ||
samm:characteristic :BCharacteristic ; | ||
samm:preferredName "B Row Left"@en . | ||
|
||
:bRowRight a samm:Property ; | ||
samm:characteristic :BCharacteristic ; | ||
samm:preferredName "B Row Right"@en . | ||
|
||
:c a samm:Property ; | ||
samm:characteristic :CCharacteristic ; | ||
samm:preferredName "C"@en . | ||
|
||
:BEntity a samm:Entity ; | ||
samm:properties ( [ samm:property :c; samm:payloadName "c" ] ) . | ||
|
||
:BInstanceEntity a samm:Entity ; | ||
samm:properties ( [ samm:property :bRow1; samm:optional true; samm:payloadName "row1" ] [ samm:property :bRow2; samm:optional true; samm:payloadName "row2" ] ) . | ||
|
||
:BInstanceSingleEntity a samm-c:SingleEntity ; | ||
samm:dataType :BInstanceEntity ; | ||
samm:name "BInstance" ; | ||
samm:preferredName "B Instance"@en . | ||
|
||
:BRowEntity a samm:Entity ; | ||
samm:properties ( [ samm:property :bRowLeft; samm:optional true; samm:payloadName "left" ] [ samm:property :bRowRight; samm:optional true; samm:payloadName "right" ] ) . | ||
|
||
:CCharacteristic a samm-c:Measurement ; | ||
samm-c:unit unit:kilometre ; | ||
samm:dataType xsd:byte ; | ||
samm:description """ | ||
VSS path : A.B.C | ||
Description: This description will also exist multiple times. | ||
Comment : As well as this comment. | ||
Unit : km"""@en . | ||
|
||
:BCharacteristic a samm:Characteristic ; | ||
samm:dataType :BEntity ; | ||
samm:description """ | ||
VSS path : A.B | ||
Description: This description will be duplicated. | ||
Comment : This comment will be duplicated"""@en ; | ||
samm:name "BCharacteristic" . | ||
|
||
:BRowSingleEntity a samm-c:SingleEntity ; | ||
samm:dataType :BRowEntity ; | ||
samm:name "BRow" ; | ||
samm:preferredName "B Row"@en . | ||
|
||
|
Oops, something went wrong.