Hello,
I have problems to understand the filter techniques in the frame api for C/C++.
My current structure is as follows:
- I have a NI CAN Card (Series 2 HW, Philips SAJ 1000 Contoller, 1 CAN Interface (CAN0))
- On the CAN BUS Interface one target device is connected (it is a controlling unit for a sliding gate, automotive)
- I 've created 2 CAN Network Interface Objects, one for receiving, another for transmitting frames
- all received Frames from the target (incomming frames) are handled by the receiving Object.
- its configuration is as follows:
m_attrList[0] = NC_ATTR_BAUD_RATE;
m_valueList[0] = 83333; //CC.NC_BAUD_100K;
m_attrList[1] =
NC_ATTR_START_ON_OPEN;
m_valueList[1] = NC_TRUE;
m_attrList[2] = NC_ATTR_READ_Q_LEN;
m_valueList[2] = 0; //number of frames (not bytes!)
m_attrList[3] = NC_ATTR_WRITE_Q_LEN;
m_valueList[3] = 0;
m_attrList[4] = NC_ATTR_COMP_STD;
m_valueList[4] = NC_CAN_ARBID_NONE; //handle all
frames that are not handled trough CANObjects
//CC.NC_MASK_STD_DONTCARE;//0x791;
m_attrList[5] = NC_ATTR_MASK_STD;
m_valueList[5] = NC_MASK_STD_DONTCARE;//0x791;
m_attrList[6] = NC_ATTR_COMP_XTD;
m_valueList[6] = NC_MASK_XTD_DONTCARE;
m_attrList[7] = NC_ATTR_MASK_XTD;
m_valueList[7] = NC_MASK_XTD_DONTCARE;
- opening it as follows:
iStatus = ncConfig("CAN0", 8, m_attrList, m_valueList);
iStatus = ncOpenObject("CAN0", objRXHandle);
- I 've configured it with ncCreateNotification(objRXHandle,...), so on any received frame a callback is invoked.
- no remote frames are used, since the target doesn't support them.
- similarly I've defined the transmitting Object, but not opened it,
because I do the transmitting via CANObjects (one per ArbID)
- frames are only received after a command is written to the target
(calling ncWrite(...)) within a manufcturer specific frame for a
CANObject
- up to now all fine
- now I want a filter mechanism wich allows me to define a list of ArbIDs that must not be processed
- my intention was to define the attribute and value of the receiving CAN Network Interface Object (as mentioned above):
(...please continue on part 2)