APIs, concepts, guides, and more

◆ NetworkInputDataTypeGet()

RSIDataType NetworkInputDataTypeGet ( int32_t index)
Parameters
indexThe index of the Network Input.
Returns
(RSIDataType) The data type derived from the input's ESI/ENI type name.
Description:
NetworkInputDataTypeGet maps the type name reported by NetworkInputDataTypeNameGet to an RSIDataType value. Standard elementary names route directly: BOOL, INT/UINT, DINT/UDINT, LINT/ULINT, WORD/DWORD/LWORD, REAL, LREAL, plus the eight-bit names SINT (-> RSIDataTypeINT8) and USINT / BYTE (-> RSIDataTypeUINT8). The lookup is case-insensitive.
Note
When the ESI/ENI provides no type name, or a vendor-defined / structured name outside the elementary set (for example DT-prefixed records, ARRAY[N] OF BYTE, sub-byte BIT2 / BIT4 fields, or non-power-of-two widths such as INT24 / INT48), the returned type falls back to a bit-size-keyed unsigned value: RSIDataTypeUINT32 for inputs up to 32 bits, RSIDataTypeUINT64 otherwise. The same fallback applies when an elementary name is paired with a bit size wider than its natural width (for example "INT" reported with a 32-bit bit size), so vendor-mislabeled PDOs preserve their raw bits instead of being truncated. Consult NetworkInputDataTypeNameGet for the original string when the fallback applies.
See also
NetworkInputDataTypeNameGet, NetworkInputBitSizeGet, NetworkInputFirmwareValueGet, NetworkInputValueGet