Microsoft Visual C++ Sample Program
Microsoft Visual C++ Monitor Program
Screen layout
| # | Item | Description |
|---|---|---|
| 1 | Start button | Starts monitoring when clicked. |
| 2 | Stop button | Stops monitoring when clicked. |
| 3 | Log viewer | Displays 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
| Item | Description |
|---|---|
| msec | Displays timestamps in milliseconds. |
| usec | Displays timestamps in microseconds. |
| Dir | Displays the log direction. Rx: Receive log / Tx: Transmit log |
| IDfmt | Displays the ID format. Std: Standard ID / Ext: Extended ID |
| ID | Displays the CAN ID in hexadecimal. |
| DL | Displays the data length (1 to 64). |
| Data | Displays 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
| # | Item | Description |
|---|---|---|
| 1 | Start button | Starts monitoring when clicked and sends the periodic transmission preset frame every 1 second. |
| 2 | Stop button | Stops monitoring and stops sending the periodic transmission preset frame when clicked. |
| 3 | Log viewer | Displays 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. |
| 4 | ChangeData button | Increments the data (D1–D64) of the periodic transmission preset frame by +1 when clicked. |
| 5 | SlotSend button | Sends the event transmission preset frame when clicked. |
| 6 | DirectSend button | Sends the direct transmission preset frame when clicked. |
Log viewer details
| Item | Description |
|---|---|
| msec | Displays timestamps in milliseconds. |
| usec | Displays timestamps in microseconds. |
| Dir | Displays the log direction. Rx: Receive log / Tx: Transmit log |
| IDfmt | Displays the ID format. Std: Standard ID / Ext: Extended ID |
| ID | Displays the CAN ID in hexadecimal. |
| DL | Displays the data length (1 to 64). |
| Data | Displays data (D1–D64) in hexadecimal. Data items are separated by commas. |
Preset frames
The contents of each preset frame are shown below.
| Frame type | Slot | ID | DL | Data (hexadecimal) (Note 1) | |||
|---|---|---|---|---|---|---|---|
| Format | CAN ID | D1 | … | D64 | |||
| Periodic transmission preset frame | 0 | Standard ID | 100H | 64 | 10 | … | 10 |
| Event transmission preset frame | 1 | Standard ID | 200H | 64 | 20 | … | 20 |
| Direct transmission preset frame | - | Standard ID | 300H | 64 | 30 | … | 30 |
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.