Skip to content

Commit

Permalink
doc: Update SLIMS and OIA (south) doc
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerni10 committed Aug 16, 2023
1 parent 9f8569f commit 937d9fc
Show file tree
Hide file tree
Showing 16 changed files with 146 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 0
---

# Concepts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 1
---

# Folder Scanner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 10
---

# OPCHDA (Windows only)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 11
---

import ItemSettings from './_south-sql-item-settings.mdx';
Expand Down
83 changes: 83 additions & 0 deletions documentation/docs/guide/south-connectors/12-slims.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
sidebar_position: 12
---

import SerializationSettings from './_south-rest-serialization-settings.mdx';


# SLIM (Rest API)
Send HTTP queries to a SLIMS application.

## Specific settings
- **URL**: the address of the SLIMS application
- **Port**: the port the application listen to
- **Username**: the username used for authentication
- **Password**: the password used for authentication
- **Use proxy**: Pass the request through a proxy
- **Accept unauthorized certificate**: Accept certificates even if outdated or selfsigned

## Item settings
- **Endpoint**: The endpoint where to send the HTTP request.
- **Request timeout**: Time to wait before the HTTP request fails.

### Body and query params
The body field accept JSON syntax and can use several internal variables. These variables are useful for data stream
resilience on connection failure, and to cut big intervals into smaller chunks, reducing the load on the serve and network
(see [the big queries section](#splitting-large-queries)).

The query params field is a key / value array and can use the same interval variables.

#### Query variables
Several OIBus variables can be used and will be interpreted by OIBus.
- **@StartTime**: The @StartTime variable initially takes the date of the first execution of the query. When results are
retrieved from the database, @StartTime value is set to the most recent timestamp among those results in the field used
as reference (see [the datetime fields section](#datetime-fields)).
- **@EndTime**: The @EndTime variable is set to the current time (_now()_) or to the end of the sub-interval if a query is split.

Example on endpoint `/slimsrest/rest/Result/advanced`
```json
{
"criteria": {
"operator": "and",
"criteria": [
{
"fieldName": "rslt_fk_status",
"operator": "equals",
"value": 14
},
{
"fieldName": "rslt_cf_pid",
"operator": "notNull"
},
{
"fieldName": "rslt_cf_samplingDateAndTime",
"operator": "notNull"
},
{
"fieldName": "rslt_modifiedOn",
"operator": "between",
"start": @StartTime,
"end": @EndTime
}
]
},
"sortBy": [
"rslt_modifiedOn"
]
}
```
### Datetime fields
You can specify in this array which fields are a datetime type, and which format to use.
- **Field name**: The field name in the HTTP payload result.
- **Reference field**: Use this field as reference for the next @StartTime value (see [query variables](#query-variables)).
- **Type**: The type of the data in the result.
- **Timezone** (for string only): The timezone of the datetime stored in the
database.
- **Format** (for string only): The string format of the datetime retrieved.
- **Locale** (for string only): The locale to use when the format contains locale specific string (such as MMM format for
months).

OIBus will internally use these dates in ISO UTC format. The output datetime format can be set in the
[serialization section](#serialization).

<SerializationSettings></SerializationSettings>
35 changes: 35 additions & 0 deletions documentation/docs/guide/south-connectors/13-oianalytics.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 13
---

import SerializationSettings from './_south-rest-serialization-settings.mdx';


# OIAnalytics (Rest API)
Send HTTP queries to an OIAnalytics application.

## Specific settings
- **URL**: the address of the OIAnalytics application
- **Access key**: the access key used for authentication
- **Secret key**: the secret key used for authentication
- **Use proxy**: Pass the request through a proxy
- **Accept unauthorized certificate**: Accept certificates even if outdated or selfsigned

## Item settings
## Item settings
- **Endpoint**: The endpoint where to send the HTTP request.
- **Request timeout**: Time to wait before the HTTP request fails.

### Body and query params
The query params field is a key / value array and can use interval variables. These variables are useful for data stream
resilience on connection failure, and to cut big intervals into smaller chunks, reducing the load on the serve and network
(see [the big queries section](#splitting-large-queries)).

#### Query variables
Several OIBus variables can be used and will be interpreted by OIBus.
- **@StartTime**: The @StartTime variable initially takes the date of the first execution of the query. When results are
retrieved from the database, @StartTime value is set to the most recent timestamp among those results in the field used
as reference (see [the datetime fields section](#datetime-fields)).
- **@EndTime**: The @EndTime variable is set to the current time (_now()_) or to the end of the sub-interval if a query is split.

<SerializationSettings></SerializationSettings>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 2
---

# OPCUA
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

import ItemSettings from './_south-sql-item-settings.mdx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 4
---

# Modbus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 6
---

# MQTT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 7
---

import ItemSettings from './_south-sql-item-settings.mdx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 9
---

# ADS - TwinCAT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 9
---

import ItemSettings from './_south-sql-item-settings.mdx';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### CSV Serialization
- Filename: The name of the file where the result will be stored. Several internal variable can be used:
- @ConnectorName: The name of the connector.
- @CurrentDate: The current date in yyyy_MM_dd_HH_mm_ss_SSS format.
- Delimiter: The delimiter to use in the CSV.
- Compression: Compress the file with gunzip or not.
- Output datetime format: The format of the datetime in the CSV. OIBus will only convert the
[datetime fields](#datetime-fields) specified.
- Output timezone: The timezone to use to store the datetime.

## Splitting large queries
In some cases, a query can be quite heavy for the server, especially if a large time interval is requested. If
@StartTime and @EndTime [query variables](#query-variables) are used, the query can be split in several sub-queries
with smaller intervals using the **Max read interval** field of [history settings](./common-settings.md#history-settings).
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import SerializationSettings from './_south-rest-serialization-settings.mdx';

## Item settings
### Query
The query fields accept SQL syntax and can use several internal variables. These variables are useful for data stream
Expand Down Expand Up @@ -29,17 +31,4 @@ months).
OIBus will internally use these dates in ISO UTC format. The output datetime format can be set in the
[serialization section](#serialization).

### CSV Serialization
- Filename: The name of the file where the result will be stored. Several internal variable can be used:
- @ConnectorName: The name of the connector.
- @CurrentDate: The current date in yyyy_MM_dd_HH_mm_ss_SSS format.
- Delimiter: The delimiter to use in the CSV.
- Compression: Compress the file with gunzip or not.
- Output datetime format: The format of the datetime in the CSV. OIBus will only convert the
[datetime fields](#datetime-fields) specified.
- Output timezone: The timezone to use to store the datetime.

## Splitting large queries
In some cases, a query can be quite heavy for the server, especially if a large time interval is requested. If
@StartTime and @EndTime [query variables](#query-variables) are used, the query can be split in several sub-queries
with smaller intervals using the **Max read interval** field of [history settings](./common-settings.md#history-settings).
<SerializationSettings></SerializationSettings>

0 comments on commit 937d9fc

Please sign in to comment.