Loading...
Searching...
No Matches
peripheral::GatewaySensorManager::ModbusValueEncoding8 Struct Reference
Inheritance diagram for peripheral::GatewaySensorManager::ModbusValueEncoding8:

## Public Attributes

boolean | byteSwap
| 16-bit modbus words should be transferred in big-endian byte order.
long | mask
| mask raw value before interpreting (0 = not masked, the same as 0xFFFF...)
int | start
| The least significant bit of the read word used in numerical interpretation.
int | width
| Word width in bits used in numerical interpretation.
Public Attributes inherited from peripheral::GatewaySensorManager::NumericValueEncoding
float | scalingFactor
| multiply with when interpreting as numeric value
float | offset
| add value after applying scalingFactor
Public Attributes inherited from peripheral::GatewaySensorManager::ValueEncoding
string | encodingId
| encoding type id
EncodingType | type
| value coding type
boolean | invertState
| invert when interpreting as state
vector< InterpretationRule > | interpretationRules
| error/value interpretation rules
int | minAccessInterval
| minimum time interval between two read accesses in seconds

## Detailed Description

Definition at line 508 of file GatewaySensorManager.idl.

## Member Data Documentation

## byteSwap

boolean peripheral::GatewaySensorManager::ModbusValueEncoding8::byteSwap

16-bit modbus words should be transferred in big-endian byte order.

For modbus devices that do not comply with this, byteSwap = true must be set. Another application is to use byteSwap to address a single byte in a 16-bit modbus word in case 8-bit values are requested (ModbusValueEncoding8).

Definition at line 515 of file GatewaySensorManager.idl.

## mask

long peripheral::GatewaySensorManager::ModbusValueEncoding8::mask

mask raw value before interpreting (0 = not masked, the same as 0xFFFF...)

Definition at line 519 of file GatewaySensorManager.idl.

## start

int peripheral::GatewaySensorManager::ModbusValueEncoding8::start

The least significant bit of the read word used in numerical interpretation.

If `start` is greater than 0, then one or more least significant bits remain unused. 0 is the default value. For integer values a `start > 0` has mostly the same effect as using a `mask = ~(2^start-1)` and a `scalingFactor = 1/2^start`.

Definition at line 526 of file GatewaySensorManager.idl.

## width

int peripheral::GatewaySensorManager::ModbusValueEncoding8::width

Word width in bits used in numerical interpretation.

If `width` is smaller than the read word width, then the most significant bits remain unused. 0 is the default value. Example: 24 bit signed integer: `ModbusValueEncoding32` with `start = 0` and `width = 24` and 'type = INT`(Only for unsigned integer the use of`mask` would be sufficient.)

Definition at line 535 of file GatewaySensorManager.idl.

The documentation for this struct was generated from the following file:

- GatewaySensorManager.idl