From 2b6b57debdac6cce10cbfbb2cc33cf7e58df2154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Ryannel?= Date: Tue, 6 Aug 2024 09:20:48 +0200 Subject: [PATCH] initial small set of testbed APIs in IDL format Just want to try out this format and see if we should have a full set of the same APIs in IDL format. The IDL format is a valid format and has same capabilities. But having the testbed APIs also available as IDL format would ensure compatibility. So the outcome should ideally not diff at all fro the YAML versions. --- testbed.enum.module.idl | 42 ++++++++++++++++++ testbed.simple.module.idl | 90 +++++++++++++++++++++++++++++++++++++++ testbed.struct.module.idl | 51 ++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 testbed.enum.module.idl create mode 100644 testbed.simple.module.idl create mode 100644 testbed.struct.module.idl diff --git a/testbed.enum.module.idl b/testbed.enum.module.idl new file mode 100644 index 0000000..fc6fc4a --- /dev/null +++ b/testbed.enum.module.idl @@ -0,0 +1,42 @@ +module tb.enum 1.0.0 + +interface EnumInterface { + prop0: Enum0 + prop1: Enum1 + prop2: Enum2 + prop3: Enum3 + + func0(param0: Enum0): Enum0 + func1(param1: Enum1): Enum1 + func2(param2: Enum2): Enum2 + func3(param3: Enum3): Enum3 + + signal sig0(param0: Enum0) + signal sig1(param1: Enum1) + signal sig2(param2: Enum2) + signal sig3(param3: Enum3) +} + +enum Enum0 { + value0=0, + value1=1, + value2=2, +} + +enum Enum1 { + value1=1, + value2=2, + value3=3, +} + +enum Enum2 { + value2=2, + value1=1, + value0=0, +} + +enum Enum3 { + value3=3, + value2=2, + value1=1, +} diff --git a/testbed.simple.module.idl b/testbed.simple.module.idl new file mode 100644 index 0000000..7ceb73d --- /dev/null +++ b/testbed.simple.module.idl @@ -0,0 +1,90 @@ +module tb.simple 1.0.0 + +interface VoidInterface { + funcVoid() + signal sigVoid() +} + +interface SimpleInterface { + propBool: bool + propInt: int + propInt32: int32 + propInt64: int64 + propFloat: float + propFloat32: float32 + propFloat64: float64 + propString: string + + funcNoReturnValue(paramBool: bool) + funcBool(paramBool: bool): bool + funcInt(paramInt: int): int + funcInt32(paramInt32: int32): int32 + funcInt64(paramInt64: int64): int64 + funcFloat(paramFloat: float): float + funcFloat32(paramFloat32: float32): float32 + funcFloat64(paramFloat: float64): float64 + funcString(paramString: string): string + + signal sigBool(paramBool: bool) + signal sigInt(paramInt: int) + signal sigInt32(paramInt32: int32) + signal sigInt64(paramInt64: int64) + signal sigFloat(paramFloat: float) + signal sigFloat32(paramFloat32: float32) + signal sigFloat64(paramFloat64: float64) + signal sigString(paramString: string) +} + +interface SimpleArrayInterface { + propBool: bool[] + propInt: int[] + propInt32: int32[] + propInt64: int64[] + propFloat: float[] + propFloat32: float32[] + propFloat64: float64[] + propString: string[] + propReadOnlyString: string[readonly] + + funcBool(paramBool: bool[]): bool[] + funcInt(paramInt: int[]): int[] + funcInt32(paramInt32: int32[]): int32[] + funcInt64(paramInt64: int64[]): int64[] + funcFloat(paramFloat: float[]): float[] + funcFloat32(paramFloat32: float32[]): float32[] + funcFloat64(paramFloat: float64[]): float64[] + funcString(paramString: string[]): string[] + + signal sigBool(paramBool: bool[]) + signal sigInt(paramInt: int[]) + signal sigInt32(paramInt32: int32[]) + signal sigInt64(paramInt64: int64[]) + signal sigFloat(paramFloat: float[]) + signal sigFloat32(paramFloat32: float32[]) + signal sigFloat64(paramFloat64: float64[]) + signal sigString(paramString: string[]) +} + +interface NoPropertiesInterface { + funcVoid() + funcBool(paramBool: bool): bool + + signal sigVoid() + signal sigBool(paramBool: bool) +} + +interface NoOperationsInterface { + propBool: bool + propInt: int + + signal sigVoid() + signal sigBool(paramBool: bool) +} + +interface NoSignalsInterface { + propBool: bool + propInt: int + + funcVoid() + funcBool(paramBool: bool): bool +} diff --git a/testbed.struct.module.idl b/testbed.struct.module.idl new file mode 100644 index 0000000..b205913 --- /dev/null +++ b/testbed.struct.module.idl @@ -0,0 +1,51 @@ +module testbed1 1.0.0 + +interface StructInterface { + propBool: StructBool + propInt: StructInt + propFloat: StructFloat + propString: StructString + + funcBool(paramBool: StructBool): StructBool + funcInt(paramInt: StructInt): StructBool + funcFloat(paramFloat: StructFloat): StructFloat + funcString(paramString: StructString): StructString + + signal sigBool(paramBool: StructBool) + signal sigInt(paramInt: StructInt) + signal sigFloat(paramFloat: StructFloat) + signal sigString(paramString: StructString) +} + +interface StructArrayInterface { + propBool: StructBool[] + propInt: StructInt[] + propFloat: StructFloat[] + propString: StructString[] + + funcBool(paramBool: StructBool[]): StructBool[] + funcInt(paramInt: StructInt[]): StructBool[] + funcFloat(paramFloat: StructFloat[]): StructFloat[] + funcString(paramString: StructString[]): StructString[] + + signal sigBool(paramBool: StructBool[]) + signal sigInt(paramInt: StructInt[]) + signal sigFloat(paramFloat: StructFloat[]) + signal sigString(paramString: StructString[]) +} + +struct StructBool { + fieldBool: bool +} + +struct StructInt { + fieldInt: int +} + +struct StructFloat { + fieldFloat: float +} + +struct StructString { + fieldString: string +}