|
@@ -21,25 +21,25 @@ The types defined in readings will be converted into related [data types](../../
|
|
|
|
|
|
#### Boolean
|
|
#### Boolean
|
|
|
|
|
|
-If ``ValueType`` value of the reading is ``Bool``, then eKuiper tries to convert to ``boolean`` type. Following values will be converted into ``true``.
|
|
|
|
|
|
+If `ValueType` value of the reading is `Bool`, then eKuiper tries to convert to `boolean` type. Following values will be converted into `true`.
|
|
|
|
|
|
- "1", "t", "T", "true", "TRUE", "True"
|
|
- "1", "t", "T", "true", "TRUE", "True"
|
|
|
|
|
|
-Following will be converted into ``false``.
|
|
|
|
|
|
+Following will be converted into `false`.
|
|
|
|
|
|
- "0", "f", "F", "false", "FALSE", "False"
|
|
- "0", "f", "F", "false", "FALSE", "False"
|
|
|
|
|
|
#### Bigint
|
|
#### Bigint
|
|
|
|
|
|
-If ``ValueType`` value of the reading is ``INT8`` , ``INT16``, ``INT32``, ``INT64``,``UINT`` , ``UINT8`` , ``UINT16`` , ``UINT32`` , ``UINT64`` then eKuiper tries to convert to ``Bigint`` type.
|
|
|
|
|
|
+If `ValueType` value of the reading is `INT8` , `INT16`, `INT32`, `INT64`,``UINT` , `UINT8` , `UINT16` , `UINT32` , `UINT64` then eKuiper tries to convert to `Bigint` type.
|
|
|
|
|
|
#### Float
|
|
#### Float
|
|
|
|
|
|
-If ``ValueType`` value of the reading is ``FLOAT32``, ``FLOAT64``, then eKuiper tries to convert to ``Float`` type.
|
|
|
|
|
|
+If `ValueType` value of the reading is `FLOAT32`, `FLOAT64`, then eKuiper tries to convert to `Float` type.
|
|
|
|
|
|
#### String
|
|
#### String
|
|
|
|
|
|
-If ``ValueType`` value of the reading is ``String``, then eKuiper tries to convert to ``String`` type.
|
|
|
|
|
|
+If `ValueType` value of the reading is `String`, then eKuiper tries to convert to `String` type.
|
|
|
|
|
|
#### Boolean array
|
|
#### Boolean array
|
|
|
|
|
|
@@ -47,15 +47,15 @@ If ``ValueType`` value of the reading is ``String``, then eKuiper tries to conve
|
|
|
|
|
|
#### Bigint array
|
|
#### Bigint array
|
|
|
|
|
|
-All of ``INT8`` , ``INT16``, ``INT32``, ``INT64``,``UINT`` , ``UINT8`` , ``UINT16`` , ``UINT32`` , ``UINT64`` array types in EdgeX will be converted to `Bigint` array.
|
|
|
|
|
|
+All of `INT8` , `INT16`, `INT32`, `INT64`,``UINT` , `UINT8` , `UINT16` , `UINT32` , `UINT64` array types in EdgeX will be converted to `Bigint` array.
|
|
|
|
|
|
#### Float array
|
|
#### Float array
|
|
|
|
|
|
-All of ``FLOAT32``, ``FLOAT64`` array types in EdgeX will be converted to `Float` array.
|
|
|
|
|
|
+All of `FLOAT32`, `FLOAT64` array types in EdgeX will be converted to `Float` array.
|
|
|
|
|
|
## Global configurations
|
|
## Global configurations
|
|
|
|
|
|
-The configuration file of EdgeX source is at ``$ekuiper/etc/sources/edgex.yaml``. Below is the file format.
|
|
|
|
|
|
+The configuration file of EdgeX source is at `$ekuiper/etc/sources/edgex.yaml`. Below is the file format.
|
|
|
|
|
|
```yaml
|
|
```yaml
|
|
#Global Edgex configurations
|
|
#Global Edgex configurations
|
|
@@ -73,23 +73,23 @@ default:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-Use can specify the global EdgeX settings here. The configuration items specified in ``default`` section will be taken as default settings for all EdgeX source.
|
|
|
|
|
|
+Use can specify the global EdgeX settings here. The configuration items specified in `default` section will be taken as default settings for all EdgeX source.
|
|
|
|
|
|
### protocol
|
|
### protocol
|
|
|
|
|
|
-The protocol connect to EdgeX message bus, default value is ``tcp``.
|
|
|
|
|
|
+The protocol connect to EdgeX message bus, default value is `tcp`.
|
|
|
|
|
|
### server
|
|
### server
|
|
|
|
|
|
-The server address of EdgeX message bus, default value is ``localhost``.
|
|
|
|
|
|
+The server address of EdgeX message bus, default value is `localhost`.
|
|
|
|
|
|
### port
|
|
### port
|
|
|
|
|
|
-The port of EdgeX message bus, default value is ``5573``.
|
|
|
|
|
|
+The port of EdgeX message bus, default value is `5573`.
|
|
|
|
|
|
### connectionSelector
|
|
### connectionSelector
|
|
|
|
|
|
-specify the stream to reuse the connection to EdgeX message bus. The connection profile located in ``connections/connection.yaml``.
|
|
|
|
|
|
+specify the stream to reuse the connection to EdgeX message bus. The connection profile located in `connections/connection.yaml`.
|
|
```yaml
|
|
```yaml
|
|
edgex:
|
|
edgex:
|
|
redisMsgBus: #connection key
|
|
redisMsgBus: #connection key
|
|
@@ -113,7 +113,7 @@ edgex:
|
|
# KeyPEMBlock:
|
|
# KeyPEMBlock:
|
|
# SkipCertVerify: true/false
|
|
# SkipCertVerify: true/false
|
|
```
|
|
```
|
|
-There is one configuration group for EdgeX message bus in the example, user need use ``edgex.redisMsgBus`` as the selector.
|
|
|
|
|
|
+There is one configuration group for EdgeX message bus in the example, user need use `edgex.redisMsgBus` as the selector.
|
|
For example
|
|
For example
|
|
```yaml
|
|
```yaml
|
|
#Global Edgex configurations
|
|
#Global Edgex configurations
|
|
@@ -129,23 +129,23 @@ default:
|
|
# Username: user1
|
|
# Username: user1
|
|
# Password: password
|
|
# Password: password
|
|
```
|
|
```
|
|
-*Note*: once specify the connectionSelector in specific configuration group , all connection related parameters will be ignored , in this case ``protocol: tcp | server: localhost | port: 5573``
|
|
|
|
|
|
+*Note*: once specify the connectionSelector in specific configuration group , all connection related parameters will be ignored , in this case `protocol: tcp | server: localhost | port: 5573`
|
|
|
|
|
|
|
|
|
|
### topic
|
|
### topic
|
|
|
|
|
|
-The topic name of EdgeX message bus, default value is ``events``. Users can subscribe to the topics of message bus
|
|
|
|
|
|
+The topic name of EdgeX message bus, default value is `events`. Users can subscribe to the topics of message bus
|
|
directly or subscribe to topics exported by EdgeX application service. Notice that, the message type of the two types of
|
|
directly or subscribe to topics exported by EdgeX application service. Notice that, the message type of the two types of
|
|
topics are different, remember to set the appropriate messageType property.
|
|
topics are different, remember to set the appropriate messageType property.
|
|
|
|
|
|
### type
|
|
### type
|
|
|
|
|
|
The EdgeX message bus type, currently three types of message buses are supported. If specified other values, then will
|
|
The EdgeX message bus type, currently three types of message buses are supported. If specified other values, then will
|
|
-use the default ``redis`` value.
|
|
|
|
|
|
+use the default `redis` value.
|
|
|
|
|
|
-- ``zero``: Use ZeroMQ as EdgeX message bus.
|
|
|
|
-- ``mqtt``: Use the MQTT broker as EdgeX message bus.
|
|
|
|
-- ``redis``: Use Redis as EdgeX message bus. When using EdgeX docker compose, the type will be set to this by default.
|
|
|
|
|
|
+- `zero`: Use ZeroMQ as EdgeX message bus.
|
|
|
|
+- `mqtt`: Use the MQTT broker as EdgeX message bus.
|
|
|
|
+- `redis`: Use Redis as EdgeX message bus. When using EdgeX docker compose, the type will be set to this by default.
|
|
|
|
|
|
### messageType
|
|
### messageType
|
|
|
|
|
|
@@ -153,13 +153,13 @@ The EdgeX message model type. If connected to the topic of EdgeX application ser
|
|
Otherwise, if connected to the topic of EdgeX message bus directly to receive the message from device service or core
|
|
Otherwise, if connected to the topic of EdgeX message bus directly to receive the message from device service or core
|
|
data, the message is a "request". There are two available types of messageType property:
|
|
data, the message is a "request". There are two available types of messageType property:
|
|
|
|
|
|
-- ``event``: The message will be decoded as a `dtos.Event` type. This is the default.
|
|
|
|
-- ``request``: The message will be decoded as a `requests.AddEventRequest` type.
|
|
|
|
|
|
+- `event`: The message will be decoded as a `dtos.Event` type. This is the default.
|
|
|
|
+- `request`: The message will be decoded as a `requests.AddEventRequest` type.
|
|
|
|
|
|
### optional
|
|
### optional
|
|
|
|
|
|
If MQTT message bus is used, some other optional configurations can be specified. Please notice that all of values in
|
|
If MQTT message bus is used, some other optional configurations can be specified. Please notice that all of values in
|
|
-optional are **<u>string type</u>**, so values for these configurations should be string - such as ``KeepAlive: "5000"``
|
|
|
|
|
|
+optional are **<u>string type</u>**, so values for these configurations should be string - such as `KeepAlive: "5000"`
|
|
. Below optional configurations are supported, please check MQTT specification for the detailed information.
|
|
. Below optional configurations are supported, please check MQTT specification for the detailed information.
|
|
|
|
|
|
- ClientId
|
|
- ClientId
|
|
@@ -178,7 +178,7 @@ optional are **<u>string type</u>**, so values for these configurations should b
|
|
|
|
|
|
### Override the default settings
|
|
### Override the default settings
|
|
|
|
|
|
-In some cases, maybe you want to consume message from multiple topics from message bus. eKuiper supports to specify another configuration, and use the ``CONF_KEY`` to specify the newly created key when you create a stream.
|
|
|
|
|
|
+In some cases, maybe you want to consume message from multiple topics from message bus. eKuiper supports to specify another configuration, and use the `CONF_KEY` to specify the newly created key when you create a stream.
|
|
|
|
|
|
```yaml
|
|
```yaml
|
|
#Override the global configurations
|
|
#Override the global configurations
|
|
@@ -189,7 +189,7 @@ demo1: #Conf_key
|
|
topic: events
|
|
topic: events
|
|
```
|
|
```
|
|
|
|
|
|
-If you have a specific connection that need to overwrite the default settings, you can create a customized section. In the previous sample, we create a specific setting named with ``demo1``. Then you can specify the configuration with option ``CONF_KEY`` when creating the stream definition (see [stream specs](../../sqls/streams.md) for more info).
|
|
|
|
|
|
+If you have a specific connection that need to overwrite the default settings, you can create a customized section. In the previous sample, we create a specific setting named with `demo1`. Then you can specify the configuration with option `CONF_KEY` when creating the stream definition (see [stream specs](../../sqls/streams.md) for more info).
|
|
|
|
|
|
**Sample**
|
|
**Sample**
|
|
|
|
|
|
@@ -197,5 +197,5 @@ If you have a specific connection that need to overwrite the default settings, y
|
|
create stream demo1() WITH (FORMAT="JSON", type="edgex", CONF_KEY="demo1");
|
|
create stream demo1() WITH (FORMAT="JSON", type="edgex", CONF_KEY="demo1");
|
|
```
|
|
```
|
|
|
|
|
|
-The configuration keys used for these specific settings are the same as in ``default`` settings, any values specified in specific settings will overwrite the values in ``default`` section.
|
|
|
|
|
|
+The configuration keys used for these specific settings are the same as in `default` settings, any values specified in specific settings will overwrite the values in `default` section.
|
|
|
|
|