-
Notifications
You must be signed in to change notification settings - Fork 5
/
AutoLinkLogics.py
31 lines (25 loc) · 945 Bytes
/
AutoLinkLogics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
''' SvxLinkWrapper - wrapper for SvxLink
Module to auto-connect Two logics together
Created on Feb 1, 2012
@author: Guy Sheffer <guysoft at gmail dot com>
'''
import SvxlinkwrapperModule
import time
import json
QSO_CALLSIGN_SEPERATOR=":"
class AutoLinkLogics(SvxlinkwrapperModule.SvxlinkwrapperModule):
''' Module to handle autoconnect to stations at startup '''
def __init__(self,SvxLink):
#Init
SvxlinkwrapperModule.SvxlinkwrapperModule.__init__(self, SvxLink)
self.CONNECT_COMMAND=self.getConfigVar("CONNECT_COMMAND")
self.SECOND_LOGIC=self.getConfigVar("SECOND_LOGIC")
return
def handleStdout(self,line):
'''
Every stdout message would call this function
'''
if line.startswith("Starting logic: " + self.SECOND_LOGIC):
self.SvxLink.sendToSvxLink(self.CONNECT_COMMAND)#Open echolink
return