Set monitor mode.
Ret = CanSetMonitorMode ( Id , ChannelNo , MonitorMode )
Id
[ C: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved from CanInit.
ChannelNo
[ C: unsigned short ] [ Python: ctypes.c_ushort ]
Specify the channel number.
MonitorMode
[ C: unsigned short ] [ 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 [ C: long ] [ Python: ctypes.c_long ]
Definition |
Value |
Description |
CAN_ERR_SUCCESS |
0 |
Normality completion |
CAN_ERR_DLL_INVALID_ID |
10001 |
Invalid ID specified. |
CAN_ERR_DLL_CALL_DRIVER |
10002 |
Driver can't be called (Failed in the ioctl). |
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.
C |
long Ret; |
Python |
Ret = ctypes.c_long() |
None