forked from cwalter-at/freemodbus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow user provided address checking
If user provided address checking is enabled, the user function takes complete responsibility for validating. An example function would be: ``` BOOL isMBUserAddressValid( UCHAR ucMBAddress, UCHAR ucRcvAddress ) { if ( /* Accept our originally configured address */ (ucMBAddress == ucRcvAddress) || /* Accept all even, non-broadcast addresses less than 50 */ (ucRcvAddress > 0 && ucRcvAddress < 50 && ((ucRcvAddress & 0x1) == 0)) ) { return true; } return false; } ``` This allows fixing issues such as: cwalter-at#27 in a more general fashion. Note that this does not affect the STRICT_ADDRESSING or QUIRK_REPLY_BROADCAST_READ options, which are _after_ we have decided to look at the frame. Signed-off-by: Karl Palsson <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters