Closed
Description
Currently the advertising prefix
mechanism requires counting bytes and manually including a length. I was thinking about some helper functions for this. Straw ideas:
class SomeAdvertisement(Advertisement):
prefix = Advertisement.prefixes(<prefix>, <prefix>, ...)
The class method would add length headers and merge into a single bytes
and maybe also include any/all matching designation in a Prefix
object:
prefix = Advertisement.Prefix.match_any(...)
...
prefix = Advertisement.Prefix.match_all(...)
The prefix
class-variable name might be renamed to prefixes
or match_prefixes
, since it's actually multiple prefixes.