Set monitor mode.
Ret = CanSetMonitorMode ( Id , ChannelNo , MonitorMode )
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved from CanInit.
ChannelNo
[ VB.NET: UShort ] [ C, C++: unsigned short ] [ C#: ushort ] [ Python: ctypes.c_ushort ]
Specify the channel number.
MonitorMode
[ VB.NET: UShort] [ C, C++: unsigned short ] [ C#: ushort ] [ Python: ctypes.c_ushort ]
Specify monitor mode.
Definition |
Value |
Description |
CCAN_MONITOR_OFF |
0 |
Monitor mode OFF |
CCAN_MONITOR_ON |
1 |
Monitor mode ON |
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Value |
Description |
CAN_ERR_SUCCESS |
0 |
Normality completion |
CAN_ERR_SYS_RECOVERED_FROM_STANDBY |
7 |
Execute CanResetDevice function because the device has recovered from standby mode. |
CAN_ERR_DLL_INVALID_ID |
10001 |
Invalid ID specified. |
CAN_ERR_DLL_CALL_DRIVER |
10002 |
Driver can't be called (Failed in the device I/O control). |
CAN_ERR_SYS_MONITOR_MODE |
20100 |
Monitor mode is outside the settable range. |
The others (See also: Details of Error Code)
MotionMode = CCAN_MONITOR_OFF: Monitor mode OFF
Set the monitor mode for each channel.
When monitor mode is set to ON, ACK is not returned when data is received
via CAN communication, and data is monitored without affecting the line.
You can call this function during disconnecting
from the CAN bus.
And also, you can not transmit by CAN/CAN FD communication during Monitor
mode is ON
Set the monitor mode ON for ChannelNo = 1.
VB.NET |
Dim Ret As Integer |
C, C++ |
long Ret; |
C# |
int Ret; |
Python |
Ret = ctypes.c_long() |
None