Skip to content

Make the Krake parse and accept the GPAP protocol (with alarm number and alarm id) #387

@RobertLRead

Description

@RobertLRead

Dear @TheBakedPotato,

As discussed in an issue at the GPAP repo, @nk25719 and I have decided not to use your suggestion of moving to a CSV-style protocol.

This issue is for you to code the Krake to accept that protocol. I assured her that you could easily code this protocol (which is admittedly an estimate rather than certain knowledge) and that I would help you if not. So I would like you to begin coding the Krake C++ code to accept this protocol, and in particular to parse out the 3-digit alarm number in square brackets and the hexadecimal number in curly brackets. This needs to be done for two reasons: we need the number to find the correct sound file to play, and we need to present the content text without those parts (because the operator should not see them on the krake screen.)

I suspect this will be child's play for you---but here are two approaches.

  1. You could use a C++ regex library. I would probably do that because it creates maximum extensibility for the future.
  2. It is very easy to code this by hand, since you "lexically" just look for the open square bracket/curly brace and then just read characters until you find the close.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions