-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add block 'Check ASCII address' #691
Conversation
DL7NDR
commented
Dec 6, 2024
changes made as discussed
added documentation
added default value '' for argument digicallsign in class constructor
added default value '' to parameter digicallsign
Checks data from input port "in" from the first byte on for an ASCII string entered in field "Address". If the incoming string matches the entered string, data will be passed to output port "ok", else to output port "fail". Unlike block 'check_address' (label: Check AX.25 address) 'check_address2' does not bitshift the bytes. If you are looking for the ASCII letter "A" (entered in field "Address"), the match would be 0x41. 'check_address' would match on 0x82.
If I understood correctly, this block takes a string provided by the user, takes the first bytes of the PDU (as determined by the length of that string), attempts to convert these bytes to an ASCII string, and if the conversion is successful, it compares it against the user-provided string. This is one small step of becoming something more general: take a list of bytes ( Since this doesn't have much to do with AX.25 addresses, another name for the block would be more suitable. Perhaps "Check prefix" (I haven't thought very hard about the name). And definitely avoid using Also, CI is failing. |
Do you mean like this?
|
Yes. Something along those lines. |
Going to create a new merge request and closing this one. |