improved sdnpublisher schema

This commit is contained in:
Martino Ferrari
2026-01-28 00:07:10 +01:00
parent 6781d50ee4
commit 597fd3eddf
2 changed files with 24 additions and 19 deletions

View File

@@ -65,8 +65,8 @@ package schema
... ...
} }
FileDataSource: { FileDataSource: {
Filename: string Filename: string
Format?: string Format?: string
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "INOUT" #meta: direction: "INOUT"
... ...
@@ -77,7 +77,7 @@ package schema
... ...
} }
DANStream: { DANStream: {
Timeout?: int Timeout?: int
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "OUT" #meta: direction: "OUT"
... ...
@@ -103,38 +103,43 @@ package schema
... ...
} }
SDNSubscriber: { SDNSubscriber: {
Address: string ExecutionMode?: *"IndependentThread" | "RealTimeThread"
Port: int Topic!: string
Interface?: string Address?: string
Interface!: string
CPUs?: uint32
InternalTimeout?: uint32
Timeout?: uint32
IgnoreTimeoutError?: 0 | 1
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "IN" #meta: direction: "IN"
... ...
} }
SDNPublisher: { SDNPublisher: {
Address: string Address: string
Port: int Port: int
Interface?: string Interface?: string
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "OUT" #meta: direction: "OUT"
... ...
} }
UDPReceiver: { UDPReceiver: {
Port: int Port: int
Address?: string Address?: string
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "IN" #meta: direction: "IN"
... ...
} }
UDPSender: { UDPSender: {
Destination: string Destination: string
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "OUT" #meta: direction: "OUT"
... ...
} }
FileReader: { FileReader: {
Filename: string Filename: string
Format?: string Format?: string
Interpolate?: string Interpolate?: string
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "IN" #meta: direction: "IN"
... ...
@@ -143,8 +148,8 @@ package schema
Filename: string Filename: string
Format?: string Format?: string
StoreOnTrigger?: int StoreOnTrigger?: int
#meta: multithreaded: bool | *false #meta: multithreaded: bool | *false
#meta: direction: "OUT" #meta: direction: "OUT"
... ...
} }
OrderedClass: { OrderedClass: {

View File

@@ -15,7 +15,7 @@ func TestSDNSubscriberValidation(t *testing.T) {
+MySDN = { +MySDN = {
Class = SDNSubscriber Class = SDNSubscriber
Address = "239.0.0.1" Address = "239.0.0.1"
// Missing Port // Missing Interface
} }
` `
p := parser.NewParser(content) p := parser.NewParser(content)
@@ -32,7 +32,7 @@ func TestSDNSubscriberValidation(t *testing.T) {
found := false found := false
for _, d := range v.Diagnostics { for _, d := range v.Diagnostics {
if strings.Contains(d.Message, "Port: incomplete value") { if strings.Contains(d.Message, "Interface: field is required but not present") {
found = true found = true
break break
} }