Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new module to auto-connect two logics on startup, or baisclly s…
…end any command at startup after a logic has finished starting up
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |