Failed to filter message
Posted: Thu 13. Aug 2020, 09:09
Hello,everyone
I want to filter some message that no need to receive,so I used PCANBasic.FilterMessages() function,however I still can read other message that i don't want to receive,there is my code.
As shown in the code,I only want to read CANID 0x18DAF13A,0x18FF003A,0x18DA3AF1,0x18DA3AF1,but 0x18FF803A can still read it,as shown in the URL image below.
Does anybody know how to solve it?
Any effective help will be greatly appreciated!
Best regards
Embers
I want to filter some message that no need to receive,so I used PCANBasic.FilterMessages() function,however I still can read other message that i don't want to receive,there is my code.
Code: Select all
UInt32 iBuffer = PCANBasic.PCAN_FILTER_CLOSE;
stsResult = PCANBasic.SetValue(PCANBasic.PCAN_USBBUS1, TPCANParameter.PCAN_MESSAGE_FILTER, ref iBuffer, sizeof(UInt32));
if (stsResult == TPCANStatus.PCAN_ERROR_OK)
{
PCANBasic.FilterMessages(m_PcanHandle, 0x18DAF13A, 0x18DAF13A, TPCANMode.PCAN_MODE_EXTENDED);
PCANBasic.FilterMessages(m_PcanHandle, 0x18FF003A, 0x18FF003A, TPCANMode.PCAN_MODE_EXTENDED);
//PCANBasic.FilterMessages(m_PcanHandle, 0x18FF1019, 0x18FF1019, TPCANMode.PCAN_MODE_EXTENDED);
PCANBasic.FilterMessages(m_PcanHandle, 0x18DA3AF1, 0x18DA3AF1, TPCANMode.PCAN_MODE_EXTENDED);
}
Does anybody know how to solve it?
Any effective help will be greatly appreciated!
Best regards
Embers