Skip to main content

Structure Definitions (Common)

This page describes the common structure definitions for this product.

Main APIs​

Definition List​

Type NameDescription
StMPXAPIVersionAPI version information
StMPXDeviceInfoMicroPeckerX device information
StMPXLogLog information for the log acquisition API

Definition Details​

StMPXAPIVersion​

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

VariableTypeDescription
APIVersionint8_t [32]API version number

StMPXDeviceInfo​

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

VariableTypeDescriptionNotes
Serialuint32_tSerial numberSame as the serial No. label attached to MicroPeckerX.
Modelint8_t [64]Product model name (example: S810-MX-FD2) 

StMPXLog​

Members of the StMPXLog structure (log information for the log acquisition API) are as follows.

VariableTypeDescriptionNotes
mSecuint32_tTimestamp (milliseconds)The timestamp is represented by combining the values of 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 the meaning of each value, see Log Type.
Diruint8_tDirectionFor the meaning of each value, see Log Direction.
MiscunionMiscellaneous informationA union that collects information that differs between CAN communication and LIN communication (for details, see Misc in StMPXLog).
Datauint8_t [64]DataElement numbers (0 to 63) correspond to data D1 to D64 respectively.
For LIN communication, the element number equal to DL is the checksum.

Supplementary Information​

Misc in StMPXLog​

Misc in the StMPXLog structure is a union whose active branch changes according to the protocol (CAN/LIN).
As shown below, determine the protocol from the value of Protocol, and read the active branch according to the result (a union shares the same memory, so multiple branches cannot be read at the same time).

Judgment Condition (Protocol)Active Member
Any of the following
MPX_LOG_TYPE_CAN, MPX_LOG_TYPE_CANFD, MPX_LOG_TYPE_CANFD_NOBRS
Misc.CAN
MPX_LOG_TYPE_LINMisc.LIN

Misc.CAN in StMPXLog​

Misc.CAN in the StMPXLog structure is a structure with the following members.

VariableTypeDescriptionNotes
IDuint32_tCAN ID (standard ID or extended ID)For standard ID, the lower 11 bits (bit 10 to bit 0) are set.
RTRuint8_tRemote transmission request (RTR)For the meaning of each value, see CAN Remote Transmission Request.
IDEuint8_tID format (IDE)For the meaning of each value, see CAN ID Format.
DLuint8_tData length (DL) 
Erroruint8_tError flagFor the meaning of each value, see CAN Error Flag.
ErrorInfouint32_tError informationFor the meaning of each value, see CAN Error Information.

Misc.LIN in StMPXLog​

Misc.LIN in the StMPXLog structure is a structure with the following members.

VariableTypeDescriptionNotes
IDuint8_tLIN ID 
SBLenuint8_tSyncBreak width 
WakeupWidthuint16_tWakeup pulse width 
Typeuint8_tLIN log typeFor the meaning of each value, see LIN Log Type.
DLuint8_tData length (DL) 
Reserved1uint8_t [2]Reserved area 1 
ErrorCodeuint8_tError codeFor the meaning of each value, see LIN Error Code.
Reserved2uint8_t [3]Reserved area 2