示例#1
0
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'))
示例#2
0
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.')
        
示例#3
0
def example3():
    from core import reply_aprs
    reply_aprs('This is the final test')
示例#4
0
def example2():
    import core
    time.sleep(2)
    reply_aprs('Example 2')
    time.sleep(2)
示例#5
0
def example():
    from core import reply_aprs
    reply_aprs('This is an example reply')
示例#6
0
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)
示例#7
0
def echo():
    import time, os, core, parse_packet
    from core import reply_aprs
    reply_aprs(parse_packet['message_text'])
    print("Echoing SMS")
示例#8
0
def uptime():
    import time, os, core
    from core import reply_aprs
    print('Getting uptime...')
    uptime = os.popen('uptime').read()
    reply_aprs(str(uptime))