Skip to content

Conversation

@AntonioCohimbra
Copy link
Contributor

@AntonioCohimbraAntonioCohimbra commented Jun 18, 2018

Closes 328.

@felixdivo
Copy link
Collaborator

This doesn't really allow more than the two filters, right?

@christiansandberg
Copy link
Collaborator

As I interpreted the API docs, you can only set one filter per ID type, but I don't remember actually testing it.

@felixdivo
Copy link
Collaborator

felixdivo commented Jun 18, 2018

Yes, that's how I got that as well. I was just confused by the commit message "allow more than one filter for vector". Ah, but now I get how the bugfix works!

@AntonioCohimbra
Copy link
ContributorAuthor

From the vector doc I also understood, that only 1 filter per ID type is possible. Reading it again, it also could work with more than that... Anyway it is possible to pack multiple message IDs in one call of SetChannelAcceptance by combining them in the mask parameter:

BinaryGeneral rule
ID = 6 (0x006)0110-
ID = 4 (0x004)0100-
Mask1101Compare the Ids at each bit position. If they are different, mask at this bit position must be ‘0’.
Code0110Take one Id (it does not matter which one).

@AntonioCohimbraAntonioCohimbra deleted the fix-328 branch June 19, 2018 06:41
@felixdivo
Copy link
Collaborator

felixdivo commented Jun 19, 2018

Ah right: We could write an interface independent helper function that combines the masks, each for the extended and normal type. Then, we could send that to the driver, and signal in _receive_internal() that filtering has not yet taken place. That way, we at least let the driver do some of the "heavy lifting".

Do you by chance have time for that that as well?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@AntonioCohimbra@felixdivo@christiansandberg