Structure Definitions (Common)
This section describes common structure definitions of this product.
Main APIs
Definition List
| Type Name | Description |
|---|---|
| StMPXAPIVersion | API version information |
| StMPXDeviceInfo | Device information of MicroPeckerX |
| StMPXLog | Log information for log acquisition API mode |
Definition Details
StMPXAPIVersion
Members of StMPXAPIVersion (API version information) are as follows.
| Variable | Type | Description |
|---|---|---|
| APIVersion | int8_t [32] | API version number |
StMPXDeviceInfo
Members of StMPXDeviceInfo (MicroPeckerX device information) are as follows.
| Variable | Type | Description | Notes |
|---|---|---|---|
| Serial | uint32_t | Serial number | Same as the serial number printed on the serial label attached to MicroPeckerX. |
| Model | int8_t [64] | Product model name (for example, S810-MX-FD2) |
StMPXLog
Members of StMPXLog (log information for log acquisition API mode) are as follows.
| Variable | Type | Description | Notes |
|---|---|---|---|
| mSec | uint32_t | Timestamp (milliseconds) | Timestamp is represented by combining mSec and uSec.For example, for 12.345ms (12ms + 345us), mSec=12 and uSec=345. |
| uSec | uint16_t | Timestamp (microseconds) | |
| Protocol | uint8_t | Protocol | See Log Type for value meanings. |
| Dir | uint8_t | Direction | See Log Direction for value meanings. |
| Misc | union | Miscellaneous information | Union containing different fields for CAN and LIN (see Misc in StMPXLog). |
| Data | uint8_t [64] | Data | Element indices 0 to 63 correspond to D1 to D64. In LIN, the same index as DL is checksum. |
Supplementary Information
Misc in StMPXLog
Misc in StMPXLog is a union whose active branch changes by protocol (CAN/LIN).
Determine protocol from Protocol and read only the active branch below.
Condition (Protocol) | Active Member |
|---|---|
Any of: MPX_LOG_TYPE_CAN, MPX_LOG_TYPE_CANFD, MPX_LOG_TYPE_CANFD_NOBRS | Misc.CAN |
MPX_LOG_TYPE_LIN | Misc.LIN |
Misc.CAN in StMPXLog
Misc.CAN in StMPXLog has the following members.
| Variable | Type | Description | Notes |
|---|---|---|---|
| ID | uint32_t | CAN ID (standard or extended) | For standard ID, value is set in lower 11 bits (bit10 to bit0). |
| RTR | uint8_t | Remote Transmission Request (RTR) | See CAN RTR. |
| IDE | uint8_t | ID format (IDE) | See CAN ID Format. |
| DL | uint8_t | Data length (DL) | |
| Error | uint8_t | Error flag | See CAN Error Flag. |
| ErrorInfo | uint32_t | Error information | See CAN Error Information. |
Misc.LIN in StMPXLog
Misc.LIN in StMPXLog has the following members.
| Variable | Type | Description | Notes |
|---|---|---|---|
| ID | uint8_t | LIN ID | |
| SBLen | uint8_t | SyncBreak width | |
| WakeupWidth | uint16_t | Wakeup pulse width | |
| Type | uint8_t | LIN log type | See LIN Log Type. |
| DL | uint8_t | Data length (DL) | |
| Reserved1 | uint8_t [2] | Reserved 1 | |
| ErrorCode | uint8_t | Error code | See LIN Error Code. |
| Reserved2 | uint8_t [3] | Reserved 2 |