1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-08 17:46:09 -05:00
aprsd/examples/plugins/example_plugin.py
Hemna 123b3ffa81 Change RX packet processing to enqueu
This changes the RX thread to send the packet into a queue instead of
starting a new thread for every packet.
2022-12-18 08:52:58 -05:00

21 lines
409 B
Python

import logging
from aprsd import plugin
LOG = logging.getLogger("APRSD")
class HelloPlugin(plugin.APRSDRegexCommandPluginBase):
"""Hello World."""
version = "1.0"
# matches any string starting with h or H
command_regex = "^[hH]"
command_name = "hello"
def command(self, packet):
LOG.info("HelloPlugin")
reply = f"Hello '{packet.from_call}'"
return reply