Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation about OPAL-RT integration #87

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/node/nodes/opal/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "OPAL-RT"
}
20 changes: 20 additions & 0 deletions docs/node/nodes/opal/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
hide_table_of_contents: true
---

# OPAL-RT Integration

There are three options to exchange simulation signals with an OPAL-RT real-time simulator:

1. **[UDP Sockets](socket.md):** Use OPAL-RT's UDP/TCP I/O interfaces or an adapted version of the AsyncIP example for asynchronous processes.
In this mode, OPAL-RT targets will send signals via a UDP socket to VILLASnode.
VILLASnode use the [`socket` node-type](socket.md) node-type to send and receive these UDP packets.
More information about our adapted AsyncIP example can be found here: [AsyncIP client](../clients/opal_async_ip.md).

2. **[Orchestra](opal_orchestra.md):** VILLASnode can act as an Orchestra client.
Orchstra is OPAL-RT's co-simulation framework for integrating custom code and external models.
The functionality is implemented in the closed-source [`opal.orchestra`](opal_orchestra.md) node-type.

3. **[Asynchronous Process](opal_async.md):** VILLASnode can act as an RT-LAB Asynchronous Process.
Data exchange is then handled using OPAL-RT's `libOpalAsyncApi`.
The functionality is implemented in the closed-source [`opal.async`](opal_async.md) node-type.
20 changes: 9 additions & 11 deletions docs/node/nodes/opal.md → docs/node/nodes/opal/opal_async.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ hide_table_of_contents: true

They are used to exchange data between RT-LAB Simulink models and custom user-defined programs via [shared memory](https://en.wikipedia.org/wiki/Shared_memory) on a real-time target.

There are two ways to exchange sample values with an OPAL-RT simulator:

1. Use our adapted version of OPAL-RT's AsyncIP example for asynchronous processes (see [AsyncIP client](../clients/opal_async_ip.md))
In this mode, OPAL will send sample data via UDP to VILLASnode. VILLASnode has to use the [`socket` node-type](socket.md).
2. Run VILLASnode as an asynchronous process itself. This is a highly experimental feature and implemented in the node-type `opal.async`.
Data exchange is then handled using OPAL-RT's `libOpalAsyncApi`.
This settings of this node-type a described on this page.

## Prerequisites

This node-types requires a running version of VILLASnode on an OPAL-RT target:
Expand All @@ -26,13 +18,19 @@ This node-types requires a running version of VILLASnode on an OPAL-RT target:
- RT-LAB v2023.1 or newer

:::caution
HYPERSIM or older targets running RHEL / CentOS operating systems are not supported.
The node-types requires the use of the RT-LAB simulation environment.
When using HYPERSIM, please consider the running VILLASnode as an [OPAL-RT Orchestra Client](opal_orchestra.md).

Older targets running RHEL / CentOS operating systems are not supported.
:::

## Implementation

The source code of the node-type is available here:
https://github.com/VILLASframework/node/blob/master/lib/nodes/opal.cpp
:::note
The implementation of the `opal.async` node-type is currently not open source.

Please contact [Steffen Vogel](mailto:[email protected]) if you are interested in run
:::

## Installation

Expand Down
44 changes: 44 additions & 0 deletions docs/node/nodes/opal/opal_orchestra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
hide_table_of_contents: true
---

# OPAL-RT Orchestra

Orchstra is OPAL-RT's co-simulation framework for integrating custom code and external models.
More information about Orchestra can be found in the [OPAL-RT Wiki](https://opal-rt.atlassian.net/wiki/spaces/PRD/pages/143626248/Orchestra).

## Prerequisites

- `libOpalOrchestra.so` & `RTAPI.h`

## Implementation

:::note
The implementation of the `opal.orchestra` node-type is currently not open source.

Please contact [Steffen Vogel](mailto:[email protected]) if you are interested in run
:::

## Installation


## Configuration {#config}

### Reference

import ApiSchema from '@theme/ApiSchema';

<ApiSchema id="node" example pointer="#/components/schemas/opal_orchestra" />

## Example

``` url="external/node/etc/examples/nodes/opal_orchestra.conf" title="node/etc/examples/nodes/opal_orchestra.conf"
nodes = {
opal_orchestra_node = {
type = "opal.orchestra"

ddf = "orchestra.xml"
domain = "orchestra_domain_1"
}
}
```