Skip to main content

Structure Definitions (struct)

This section describes the structure definitions of this product.

Definition List

Structure Type NameDescription
StMPXAPIVersionAPI version information
StMPXCoreVersionMicroPeckerX version information
StMPXDeviceInfoMicroPeckerX device information
StMPXCANParamParameter configuration information
StMPXCANLogCBCallback log information
StMPXCANLogLog information for log acquisition APIs
StMPXCANFrameOptionCAN/CAN FD frame option information
StMPXCANFrameTypeCAN/CAN FD frame attribute information
StMPXCANIDCAN ID information
StMPXCANFrameCAN/CAN FD frame information
StMPXCANSlotSlot information
StMPXCANDirectDirect transmission information
StMPXCANReplayLogLog replay transmission information

Definition Details

StMPXAPIVersion

Members of the StMPXAPIVersion structure (API version information) are as follows.

Variable NameType NameDescription
APIVersionint8_t [32]API version number

StMPXCoreVersion

Members of the StMPXCoreVersion structure (MicroPeckerX version information) are as follows.

Variable NameType NameDescription
BootVersionint8_t [16]Boot version number
APPVersionint8_t [32]APP version number
FPGAVersionint8_t [32]FPGA-IP version number

StMPXDeviceInfo

Members of the StMPXDeviceInfo structure (MicroPeckerX device information) are as follows.

Variable NameType NameDescriptionRemarks
Serialuint32_tSerial numberSame as the serial number shown on the serial label attached to MicroPeckerX.
Modelint8_t [64]Product model name (example: S810-MX-FD2) 

StMPXCANParam

Members of the StMPXCANParam structure (parameter configuration information) are as follows.

Variable NameType NameDescriptionRemarks
EnableTerminateuint8_tTermination resistor enable/disableFor setting values, see Termination resistor.
Modeuint8_tOperation modeFor setting values, see Operation modes.
ArbitrationBaudrateuint8_tArbitration baud rateFor setting values, see Arbitration baud rates.
ArbitrationSamplepointuint8_tArbitration sample pointFor setting values, see Sample points.
DataBaudrateuint8_tData baud rateFor setting values, see Data baud rates.
DataSamplepointuint8_tData sample pointFor setting values, see Sample points.
Reserveduint8_t [2]Reserved area

StMPXCANLogCB

Members of the StMPXCANLogCB structure (callback log information) are as follows.

Variable NameType NameDescriptionRemarks
mSecuint32_tTimestamp (milliseconds)Timestamp values are represented by combining mSec and uSec.
For example, for 12.345 ms (12 ms and 345 us), mSec is 12 and uSec is 345.
uSecuint16_tTimestamp (microseconds)
LogTypeuint8_tLog typeBit-field structure (see LogType).
DLuint8_tData lengthBit-field structure (see DL).
CANuint32_tCAN informationUnion of ID (ID information) and ErrorInfo (error information).
When handled as ErrorInfo, it is uint32_t (see Error information).
When handled as ID, it is a bit-field structure (see ID).
Datauint8_t [64]Data (D1 to D64)Array indexes 0 to 63 correspond to data bytes D1 to D64.

StMPXCANLog

Members of the StMPXCANLog structure (log information for log acquisition APIs) are as follows.

Variable NameType NameDescriptionRemarks
mSecuint32_tTimestamp (milliseconds)Timestamp values are represented by combining mSec and uSec.
For example, for 12.345 ms (12 ms and 345 us), mSec is 12 and uSec is 345.
uSecuint16_tTimestamp (microseconds)
Protocoluint8_tProtocolFor value meanings, see Log types.
Diruint8_tDirectionFor value meanings, see Log direction.
IDuint32_tCAN ID (standard ID or extended ID)For a standard ID, use the lower 11 bits (bit 10 to bit 0).
RTRuint8_tRemote transmission request (RTR)For value meanings, see Remote transmission request.
IDEuint8_tID format (IDE)For value meanings, see ID format.
DLuint8_tData length (DL)
Erroruint8_tError flagFor value meanings, see Error flag.
ErrorInfouint32_tError informationFor value meanings, see Error information.
Datauint8_t [64]Data (D1 to D64)Array indexes 0 to 63 correspond to data bytes D1 to D64.

StMPXCANFrameOption

Members of the StMPXCANFrameOption structure (CAN/CAN FD frame option information) are as follows.

Variable NameType NameDescriptionRemarks
Protocoluint8_tProtocolFor setting values, see Protocols.
BRSuint8_tBit rate switch (BRS)For setting values, see Bit rate switch.
ErrorActionuint8_tError behaviorFor setting values, see Error behavior.
Reserveduint8_tReserved area

StMPXCANFrameType

Members of the StMPXCANFrameType structure (CAN/CAN FD frame attribute information) are as follows.

Variable NameType NameDescriptionRemarks
isOneShotuint8_tOne-shot transmission enable/disableFor setting values, see One-shot transmission.
FrameTypeuint8_tFrame typeFor setting values, see Frame types.
Enableduint8_tSlot enable/disableFor setting values, see Slot enablement.
isLastDatauint8_tFinal frame determinationValid only when operation mode is log replay mode or burst transfer mode (log replay).
For setting values, see Final frame flag.
OptionStMPXCANFrameOptionCAN/CAN FD frame option information

StMPXCANID

Members of the StMPXCANID structure (CAN ID information) are as follows.

Variable NameType NameDescriptionRemarks
IDuint32_tCAN ID (standard ID or extended ID)For a standard ID, set the lower 11 bits (bit 10 to bit 0).
RTRuint8_tRemote transmission request (RTR)For setting values, see Remote transmission request.
IDEuint8_tID format (IDE)For setting values, see ID format.
Reserveduint8_t [2]Reserved area

StMPXCANFrame

Members of the StMPXCANFrame structure (CAN/CAN FD frame information) are as follows.

Variable NameType NameDescriptionRemarks
IDStMPXCANIDCAN ID information
DLuint8_tData length (DL)
Reserveduint8_t [3]Reserved area
Datauint8_t [64]Data (D1 to D64)Array indexes 0 to 63 correspond to data bytes D1 to D64.

StMPXCANSlot

Members of the StMPXCANSlot structure (slot information) are as follows.

Variable NameType NameDescriptionRemarks
SlotNouint8_tSlot number (1 to 28)
TriggerTypeuint8_tTransmission trigger typeFor setting values, see Trigger types.
Reserved1uint8_t [2]Reserved area
FrameTypeStMPXCANFrameTypeFrame attribute information
TriggerIDStMPXCANIDReception trigger ID
msSendDelayuint32_tDelay time for event transmission (milliseconds)Delay time for event transmission, transmission offset, transmission cycle, and minimum guaranteed transmission interval are represented by combining each pair below.
[Delay time for event transmission] msSendDelay, usSendDelay
[Transmission offset] msSendOffset, usSendOffset
[Transmission cycle] msSendCycle, usSendCycle
[Minimum guaranteed transmission interval] usMinTransInterval, usMinTransInterval
For example, to set 12.345 ms (12 ms and 345 us) for transmission offset, set msSendOffset = 12 and usSendOffset = 345.
msSendOffsetuint32_tTransmission offset (milliseconds)
msSendCycleuint32_tTransmission cycle (milliseconds)
msMinTransIntervaluint32_tMinimum guaranteed transmission interval (milliseconds)
usSendDelayuint16_tDelay time for event transmission (microseconds)
usSendOffsetuint16_tTransmission offset (microseconds)
usSendCycleuint16_tTransmission cycle (microseconds)
usMinTransIntervaluint16_tMinimum guaranteed transmission interval (microseconds)
SendCounteruint16_tTransmission countIf set to 0, transmissions are unlimited.
Reserved2uint8_t [2]Reserved area
FrameStMPXCANFrameTransmission frame information
Incrementuint8_t [64]Increment enabled/disabledArray indexes 0 to 63 correspond to data bytes D1 to D64.
For setting values, see Increment enablement.

StMPXCANDirect

Members of the StMPXCANDirect structure (direct transmission information) are as follows.

Variable NameType NameDescription
FrameTypeStMPXCANFrameTypeFrame attribute information
FrameStMPXCANFrameTransmission frame information

StMPXCANReplayLog

Members of the StMPXCANReplayLog structure (log replay transmission information) are as follows.

Variable NameType NameDescriptionRemarks
mSecuint32_tTimestamp (milliseconds)Timestamp values are represented by combining mSec and uSec.
For example, for 12.345 ms (12 ms and 345 us), mSec is 12 and uSec is 345.
uSecuint16_tTimestamp (microseconds)
IDuint32_tID informationBit-field structure (see ID).
DLuint8_tData length (DL)Bit-field structure (see DL).
FrameTypeuint8_tFrame attribute informationBit-field structure (see FrameType).
Datauint8_t [64]Data (D1 to D64)Array indexes 0 to 63 correspond to data bytes D1 to D64.

Supplementary Information

Bit-field Structures

LogType

LogType is a bit-field structure of type uint8_t.
Members are as follows.

Variable NameBit CountDescriptionRemarks
Type6Log typeFor value meanings, see Log types.
Dir1DirectionFor value meanings, see Log direction.
Error1Error flagFor value meanings, see Error flag.

DL

DL is a bit-field structure of type uint8_t.
Members are as follows.

Variable NameBit CountDescriptionRemarks
NotUsed4Not used
DLC4Data length code (DLC)For the relation between DLC and data length, see Data Length Code and Data Length.

ID

ID is a bit-field structure of type uint32_t.
Members are as follows.

Variable NameBit CountDescriptionRemarks
ID29CAN ID (standard ID or extended ID)For a standard ID, use the lower 11 bits (bit 10 to bit 0).
Reserved1Reserved area
RTR1Remote transmission request (RTR)For value meanings, see Remote transmission request.
IDE1ID format (IDE)For value meanings, see ID format.

FrameType

FrameType is a bit-field structure of type uint8_t.
Members are as follows.

Variable NameBit CountDescriptionRemarks
ErrorPassive1Error behaviorFor setting values, see Error behavior.
BRS1Bit rate switch (BRS)For setting values, see Bit rate switch.
FDF1FD format (FDF)For setting values, see FD format.
Terminator1Final frame determinationFor setting values, see Final frame flag.
Reserved4Not used (reserved area)

Data Length Code and Data Length

The relation between data length code (DLC) and data length (DL) is as follows.

Data Length CodeData Length
0 (0x0)0
1 (0x1)1
2 (0x2)2
3 (0x3)3
4 (0x4)4
5 (0x5)5
6 (0x6)6
7 (0x7)7
8 (0x8)8
9 (0x9)12
10 (0xA)16
11 (0xB)20
12 (0xC)24
13 (0xD)32
14 (0xE)48
15 (0xF)64