Update mcp tool universe
Add rag utility
This commit is contained in:
40
test-data/docs/dsl-guide.md
Normal file
40
test-data/docs/dsl-guide.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# DSL Documentation Guide
|
||||
|
||||
## DiagnosticService
|
||||
The `DiagnosticService` is the core component for managing diagnostics in the system.
|
||||
It allows you to define diagnostic rules and actions.
|
||||
|
||||
Example:
|
||||
```dsl
|
||||
DiagnosticService {
|
||||
rule "CheckEngineLight" {
|
||||
condition: engine.status == ERROR
|
||||
action: notify("Engine error detected")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## NotificationService
|
||||
The `NotificationService` handles sending notifications to various channels.
|
||||
|
||||
Example:
|
||||
```dsl
|
||||
NotificationService {
|
||||
channel "Email" {
|
||||
address: "admin@example.com"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## DataProcessor
|
||||
The `DataProcessor` is used for processing incoming data streams.
|
||||
It supports various transformation functions.
|
||||
|
||||
Example:
|
||||
```dsl
|
||||
DataProcessor {
|
||||
input: "sensor_data"
|
||||
transform: map(value -> value * 2)
|
||||
output: "processed_data"
|
||||
}
|
||||
```
|
||||
17
test-data/docs/syntax_guide.md
Normal file
17
test-data/docs/syntax_guide.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# DSL Syntax Guide: DiagnosticService
|
||||
|
||||
To define a diagnostic service in the OTX/ODX abstraction layer, use the `DiagnosticService` keyword.
|
||||
|
||||
## Syntax
|
||||
```dsl
|
||||
DiagnosticService <ServiceName> {
|
||||
request: <HexCode>
|
||||
response: <HexCode>
|
||||
timeout: <Integer> ms
|
||||
}
|
||||
```
|
||||
|
||||
## Rules
|
||||
* The service name must be UpperCamelCase.
|
||||
* Timeouts are strictly defined in milliseconds.
|
||||
* Use the `extends` keyword to inherit properties from a base service.
|
||||
12
test-data/docs/units_manual.md
Normal file
12
test-data/docs/units_manual.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Working with Units
|
||||
|
||||
The DSL strictly types physical units to prevent conversion errors between OTX and ODX.
|
||||
|
||||
## Defining a Unit
|
||||
Use the `Unit` keyword followed by the display symbol.
|
||||
|
||||
Example:
|
||||
`Unit Speed [km/h]`
|
||||
|
||||
## Common Errors
|
||||
Never use string literals for units in a `DiagnosticService`. Always reference the typed Unit definition.
|
||||
13
test-data/examples/body_control.dsl
Normal file
13
test-data/examples/body_control.dsl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Example: Door Lock Control
|
||||
|
||||
package com.vehicle.body
|
||||
|
||||
DiagnosticService LockDoors {
|
||||
request: 0x2E0101
|
||||
response: 0x6E0101
|
||||
timeout: 2000 ms
|
||||
}
|
||||
|
||||
DiagnosticService UnlockDoors extends LockDoors {
|
||||
request: 0x2E0100
|
||||
}
|
||||
12
test-data/examples/powertrain.dsl
Normal file
12
test-data/examples/powertrain.dsl
Normal file
@@ -0,0 +1,12 @@
|
||||
// Example: Reading Engine RPM
|
||||
|
||||
package com.vehicle.powertrain
|
||||
|
||||
Unit Rpm [rotations/m]
|
||||
|
||||
DiagnosticService ReadEngineSpeed {
|
||||
request: 0x22F40C
|
||||
response: 0x62F40C
|
||||
timeout: 500 ms
|
||||
return: Rpm
|
||||
}
|
||||
Reference in New Issue
Block a user