Skip to main content

Microsoft Visual C++ Sample Program

Microsoft Visual C++ Monitor Program

Screen layout

C++ monitor program
#ItemDescription
1Start buttonStarts monitoring when clicked.
2Stop buttonStops monitoring when clicked.
3Log viewerDisplays log information for received frames. Up to 100 log entries are retained; when the limit is exceeded, the oldest entries are cleared.
All log entries are cleared when monitoring is restarted after being stopped.
For details on the display, see Log viewer details.

Log viewer details

ItemDescription
msecDisplays timestamps in milliseconds.
usecDisplays timestamps in microseconds.
DirDisplays the log direction.
Rx: Receive log / Tx: Transmit log
IDfmtDisplays the ID format.
Std: Standard ID / Ext: Extended ID
IDDisplays the CAN ID in hexadecimal.
DLDisplays the data length (1 to 64).
DataDisplays data (D1–D64) in hexadecimal. Data items are separated by commas.

Error handling

The program treats the following as errors. When an error occurs, an error dialog is displayed and the program terminates.

  • MicroPeckerX could not be detected when the program started.
  • An API call failed when monitoring started or stopped, or while monitoring was running.

Microsoft Visual C++ Simulation Program

Screen layout

C++ simulation program
#ItemDescription
1Start buttonStarts monitoring when clicked and sends the periodic transmission preset frame every 1 second.
2Stop buttonStops monitoring and stops sending the periodic transmission preset frame when clicked.
3Log viewerDisplays log information for transmitted and received frames. Up to 100 log entries are retained; when the limit is exceeded, the oldest entries are cleared.
All log entries are cleared when monitoring is restarted after being stopped.
4ChangeData buttonIncrements the data (D1–D64) of the periodic transmission preset frame by +1 when clicked.
5SlotSend buttonSends the event transmission preset frame when clicked.
6DirectSend buttonSends the direct transmission preset frame when clicked.

Log viewer details

ItemDescription
msecDisplays timestamps in milliseconds.
usecDisplays timestamps in microseconds.
DirDisplays the log direction.
Rx: Receive log / Tx: Transmit log
IDfmtDisplays the ID format.
Std: Standard ID / Ext: Extended ID
IDDisplays the CAN ID in hexadecimal.
DLDisplays the data length (1 to 64).
DataDisplays data (D1–D64) in hexadecimal. Data items are separated by commas.

Preset frames

The contents of each preset frame are shown below.

Frame typeSlotIDDLData (hexadecimal) (Note 1)
FormatCAN IDD1D64
Periodic transmission preset frame0Standard ID100H641010
Event transmission preset frame1Standard ID200H642020
Direct transmission preset frame-Standard ID300H643030

Note 1: All data bytes from D1 to D64 contain the same value.

Error handling

The program treats the following as errors. When an error occurs, an error dialog is displayed and the program terminates.

  • MicroPeckerX could not be detected when the program started.
  • An API call failed when monitoring started or stopped, or while monitoring was running.