Skip to main content

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 NameRequiredData TypeMeaningful Value RangeDefaultDescription
fmdYESSTRINGFast Message Dispatcher of the send module
bufferSizeNoINT1 -1024(default) Buffer size of the created channels
channelPrefixNoSTRINGChannel prefix (useful if several DBC modules are used and the DBC files have overlapping channel names)
namespaceNoARRAY [ STRING ]channel prefix in the form of hierarchically linked namespaces
channelsYESJSON arrayList of JSON objects of configured channels

Configuration of a channel (JSON object)

Parameter NameRequiredData TypeMeaningful Value RangeDefaultDescription
nameYESSTRINGName of the channel
dataTypeNoSTRINGData type of the channel
bufferSizeNoINT1 -1024Buffer size of the created channel
scaleNoFLOAT1Scaling factor of the produced value
offsetNoFLOAT0additive offset of the produced value
physicalDimensionNoSTRINGphysical size
physicalUnitNoSTRINGphysical unit
messageKeyNo*UINTID of the received message (e.g. CAN bus message ID, MVB port, ...)
bitOffsetYESUINTBit offset of the value stored in the message
bitLengthNo**UINTBit length of the value stored in the message
imageTypeYESSTRINGSupported source data type of the stored value (see below)
byteOrderNoSTRING"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

InformationValue
AuthorsoptiMEAS Measurement and Automation Systems GmbH
since smartCORE0.103
Module TypeFast Message Receiver, Producer
DependenciesFast Message Transmitter Module (e.g. fmudp, canbus, smartmvb, ...)