def ping(): from core import reply_aprs import time, os, core print("Received ping...") time.sleep(0.5) print("Pong") reply_aprs('Pong '+time.strftime('%H:%M:%S - %m/%d/%Y'))
def command_help(): from core import reply_aprs import time, os, core print('\n' + "--------------------------------------" + '\n') print('Here are the available commands: ') print('\n') print('HELP - prints current message') print('ECHO - replies eniter message back to user') print('TIME - current local time') print('UPTIME - uptime of host system') print('PING - replies with pong') print('ID - returns your DMR ID') print('If "TO-" and "@" are in message, will send email to address.') print('\n' + "--------------------------------------" + '\n') reply_aprs('See https://armds.net for help and information.')
def example3(): from core import reply_aprs reply_aprs('This is the final test')
def example2(): import core time.sleep(2) reply_aprs('Example 2') time.sleep(2)
def example(): from core import reply_aprs reply_aprs('This is an example reply')
def time(): import time, os, core from core import reply_aprs print('Getting time...') current_time = time.strftime('%H:%M %A %B %d, %Y - Timezone: %z') reply_aprs(current_time)
def echo(): import time, os, core, parse_packet from core import reply_aprs reply_aprs(parse_packet['message_text']) print("Echoing SMS")
def uptime(): import time, os, core from core import reply_aprs print('Getting uptime...') uptime = os.popen('uptime').read() reply_aprs(str(uptime))