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
APIVersionchar [32]API version number

StMPXCoreVersion

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

Variable NameType NameDescription
BootVersionchar [16]Boot version number
APPVersionchar [32]APP version number
FPGAVersionchar [32]FPGA-IP version number

StMPXDeviceInfo

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

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

StMPXCANParam

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

Variable NameType NameDescriptionRemarks
EnableTerminateunsigned charTermination resistor enable/disableFor setting values, see 終端抵抗有無.
Modeunsigned charOperation modeFor setting values, see 動作モード.
ArbitrationBaudrateunsigned charArbitration baud rateFor setting values, see アービトレーションボーレート.
ArbitrationSamplepointunsigned charArbitration sample pointFor setting values, see サンプルポイント.
DataBaudrateunsigned charData baud rateFor setting values, see データボーレート.
DataSamplepointunsigned charData sample pointFor setting values, see サンプルポイント.
Reservedunsigned char [2]Reserved area

StMPXCANLogCB

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

Variable NameType NameDescriptionRemarks
mSecunsigned longTimestamp (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.
uSecunsigned shortTimestamp (microseconds)
LogTypeunsigned charLog typeBit-field structure (see LogType).
DLunsigned charData lengthBit-field structure (see DL).
CANunsigned longCAN informationUnion of ID (ID information) and ErrorInfo (error information).
When handled as ErrorInfo, it is unsigned long (see エラー情報).
When handled as ID, it is a bit-field structure (see ID).
Dataunsigned char [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
mSecunsigned longTimestamp (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.
uSecunsigned shortTimestamp (microseconds)
Protocolunsigned charProtocolFor value meanings, see ログ種別.
Dirunsigned charDirectionFor value meanings, see ログ方向.
IDunsigned longCAN ID (standard ID or extended ID)For a standard ID, use the lower 11 bits (bit 10 to bit 0).
RTRunsigned charRemote transmission request (RTR)For value meanings, see リモート送信要求.
IDEunsigned charID format (IDE)For value meanings, see IDフォーマット.
DLunsigned charData length (DL)
Errorunsigned charError flagFor value meanings, see エラーフラグ.
ErrorInfounsigned longError informationFor value meanings, see エラー情報.
Dataunsigned char [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
Protocolunsigned charProtocolFor setting values, see プロトコル.
BRSunsigned charBit rate switch (BRS)For setting values, see ビットレートスイッチ.
ErrorActionunsigned charError behaviorFor setting values, see エラーの振る舞い.
Reservedunsigned charReserved area

StMPXCANFrameType

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

Variable NameType NameDescriptionRemarks
isOneShotunsigned charOne-shot transmission enable/disableFor setting values, see ワンショット送信有効/無効.
FrameTypeunsigned charFrame typeFor setting values, see フレーム種別.
Enabledunsigned charSlot enable/disableFor setting values, see スロット有効/無効.
isLastDataunsigned charFinal frame determinationValid only when operation mode is log replay mode or burst transfer mode (log replay).
For setting values, see 最終フレーム判定.
OptionStMPXCANFrameOptionCAN/CAN FD frame option information

StMPXCANID

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

Variable NameType NameDescriptionRemarks
IDunsigned longCAN ID (standard ID or extended ID)For a standard ID, set the lower 11 bits (bit 10 to bit 0).
RTRunsigned charRemote transmission request (RTR)For setting values, see リモート送信要求.
IDEunsigned charID format (IDE)For setting values, see IDフォーマット.
Reservedunsigned char [2]Reserved area

StMPXCANFrame

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

Variable NameType NameDescriptionRemarks
IDStMPXCANIDCAN ID information
DLunsigned charData length (DL)
Reservedunsigned char [3]Reserved area
Dataunsigned char [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
SlotNounsigned charSlot number (1 to 28)
TriggerTypeunsigned charTransmission trigger typeFor setting values, see トリガ種別.
Reserved1unsigned char [2]Reserved area
FrameTypeStMPXCANFrameTypeFrame attribute information
TriggerIDStMPXCANIDReception trigger ID
msSendDelayunsigned longDelay 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.
msSendOffsetunsigned longTransmission offset (milliseconds)
msSendCycleunsigned longTransmission cycle (milliseconds)
msMinTransIntervalunsigned longMinimum guaranteed transmission interval (milliseconds)
usSendDelayunsigned shortDelay time for event transmission (microseconds)
usSendOffsetunsigned shortTransmission offset (microseconds)
usSendCycleunsigned shortTransmission cycle (microseconds)
usMinTransIntervalunsigned shortMinimum guaranteed transmission interval (microseconds)
SendCounterunsigned shortTransmission countIf set to 0, transmissions are unlimited.
Reserved2unsigned char [2]Reserved area
FrameStMPXCANFrameTransmission frame information
Incrementunsigned char [64]Increment enabled/disabledArray indexes 0 to 63 correspond to data bytes D1 to D64.
For setting values, see インクリメント有無.

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
mSecunsigned longTimestamp (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.
uSecunsigned shortTimestamp (microseconds)
IDunsigned longID informationBit-field structure (see ID).
DLunsigned charData length (DL)Bit-field structure (see DL).
FrameTypeunsigned charFrame attribute informationBit-field structure (see FrameType).
Dataunsigned char [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 unsigned char.
Members are as follows.

Variable NameBit CountDescriptionRemarks
Type6Log typeFor value meanings, see ログ種別.
Dir1DirectionFor value meanings, see ログ方向.
Error1Error flagFor value meanings, see エラーフラグ.

DL

DL is a bit-field structure of type unsigned char.
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 unsigned long.
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 リモート送信要求.
IDE1ID format (IDE)For value meanings, see IDフォーマット.

FrameType

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

Variable NameBit CountDescriptionRemarks
ErrorPassive1Error behaviorFor setting values, see エラーの振る舞い.
BRS1Bit rate switch (BRS)For setting values, see ビットレートスイッチ.
FDF1FD format (FDF)For setting values, see FDフォーマット.
Terminator1Final frame determinationFor setting values, see 最終フレーム判定.
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