Fast Message Producer module "fmproducer"
Description
The "fmproducer" module receives (generally raw) data packets from the Fast Message Dispatcher of the "dispatching" (=sending) module (e.g. fmudp, canbus, smartmvb, ...) and produces from these data blocks channel values into appropriately configured channels.
Interfaces & protocols used
- Fast Message Dispatching
JSON configuration
The following section describes the entire JSON configuration of the module and explains the individual parameters.
Example configuration (minimum)
{
"module": "FmProducer",
"factory": "fmproducer",
"config":{
"fmd": "FastMessageDispatcher",
"channels":[
{
"name": "Channel",
"dataType": "double",
"messageKey":42,
"bitOffset":0,
"bitLength":64,
"imageType": "float"
},
[...]
]
}
}
Example configuration (maximum)
{
"module": "FmProducerSmartMVB",
"factory": "fmproducer",
"config":{
"fmd": "smartmvb0",
"bufferSize":1024,
"namespace":["directory", "subDirectory"],
"channelPrefix": "SmartMVB",
"channels":[
{
"name": "SmartMVBmessageData",
"dataType": "bytearray",
"bufferSize":1024,
"scale":1,
"offset":0,
"physicalDimension":"",
"physicalUnit":"",
"messageKey":10012,
"bitOffset":0,
"bitLength":0,
"imageType": "bytearray",
"produceOnChangeOnly":true,
"absoluteTolerance":0
},
[...]
]
}
}
Global module parameters
| Parameter Name | Required | Data Type | Meaningful Value Range | Default | Description |
|---|---|---|---|---|---|
| fmd | YES | STRING | Fast Message Dispatcher of the send module | ||
| bufferSize | No | INT | 1 - | 1024 | (default) Buffer size of the created channels |
| channelPrefix | No | STRING | Channel prefix (useful if several DBC modules are used and the DBC files have overlapping channel names) | ||
| namespace | No | ARRAY [ STRING ] | channel prefix in the form of hierarchically linked namespaces | ||
| channels | YES | JSON array | List of JSON objects of configured channels |
Configuration of a channel (JSON object)
| Parameter Name | Required | Data Type | Meaningful Value Range | Default | Description |
|---|---|---|---|---|---|
| name | YES | STRING | Name of the channel | ||
| dataType | No | STRING | Data type of the channel | ||
| bufferSize | No | INT | 1 - | 1024 | Buffer size of the created channel |
| scale | No | FLOAT | 1 | Scaling factor of the produced value | |
| offset | No | FLOAT | 0 | additive offset of the produced value | |
| physicalDimension | No | STRING | physical size | ||
| physicalUnit | No | STRING | physical unit | ||
| messageKey | No* | UINT | ID of the received message (e.g. CAN bus message ID, MVB port, ...) | ||
| bitOffset | YES | UINT | Bit offset of the value stored in the message | ||
| bitLength | No** | UINT | Bit length of the value stored in the message | ||
| imageType | YES | STRING | Supported source data type of the stored value (see below) | ||
| byteOrder | No | STRING | "bigendian", "littleendian" | "bigendian" | Byte order of the stored value |
*If the "messageKey" is not configured, data from all messages is processed further (this is useful for CAN RAW and debugging applications, for example).
**If the "bitLength" is not configured, it is determined from the length of the forwarded message.
Supported channel data types (target data types) 'dataType'
- string
- bytearray
- double
- float
- int64, int32, int16, int8
- uint64, uint32, uint16, uint8
- bool
Supported source data types 'imageType'
- signed
- "unsigned"
- "float"
- "timedate48"
- "time64"
- "bytearray"
- "string"
unipolar<M>.<N>bipolar<M>.<N>
Module information
| Information | Value |
|---|---|
| Authors | optiMEAS Measurement and Automation Systems GmbH |
| since smartCORE | 0.103 |
| Module Type | Fast Message Receiver, Producer |
| Dependencies | Fast Message Transmitter Module (e.g. fmudp, canbus, smartmvb, ...) |