From fdc34f4d51e30668f810b4abf76a061e40a23bd5 Mon Sep 17 00:00:00 2001 From: dandaedre Date: Tue, 19 Oct 2021 17:21:01 +0200 Subject: [PATCH] Working Detection and switch --- CONNECT | 37 +++++++++++++++++++++++++++++++++++++ DISCONNECT | 46 ++++++++++++++++++++++++++++++++++++++++++++++ bindings.py | 7 ++++--- 3 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 CONNECT create mode 100644 DISCONNECT diff --git a/CONNECT b/CONNECT new file mode 100644 index 0000000..d5af3b0 --- /dev/null +++ b/CONNECT @@ -0,0 +1,37 @@ +CONNECT: +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,0,72 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,1,68 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,2,84 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,4,32 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,5,49 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,6,48 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,7,56 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,8,48 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,9,112 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,10,0 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,11,0 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,12,0 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,13,0 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,14,0 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:IEbri - postargs:4,3,129 +[pAW:DEBUG] preargs: - msg:IEaou - postargs:4,3,3 +[pAW:DEBUG] preargs: - msg:IEchs - postargs:4,3,213 +[pAW:DEBUG] preargs: - msg:IEcvs - postargs:4,3,217 +[pAW:DEBUG] preargs: - msg:IEche - postargs:4,3,286 +[pAW:DEBUG] preargs: - msg:IEcve - postargs:4,3,209 +[pAW:DEBUG] preargs: - msg:ISsnu - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISiwi - postargs:4,3,1421 +[pAW:DEBUG] preargs: - msg:ISihe - postargs:4,3,654 +[pAW:DEBUG] preargs: - msg:ISaud - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:ISaut - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:ISacc - postargs:4,3,2 +[pAW:DEBUG] preargs: - msg:ISasf - postargs:4,3,44100 +[pAW:DEBUG] preargs: - msg:ISaus - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:ISacy - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:IShvi - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:IScsp - postargs:4,3,3 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:4,3,1 diff --git a/DISCONNECT b/DISCONNECT new file mode 100644 index 0000000..564935b --- /dev/null +++ b/DISCONNECT @@ -0,0 +1,46 @@ +DISCONNECT: +[pAW:DEBUG] preargs: - msg:ISdfo - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IScfo - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,0,78 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,1,79 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,2,32 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,4,65 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,5,76 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,6,73 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,7,68 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,8,32 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,9,83 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,10,73 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,11,71 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,12,78 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,13,65 +[pAW:DEBUG] preargs: - msg:IScfn - postargs:4,3,14,76 +[pAW:DEBUG] preargs: - msg:IShtt - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISswi - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISshe - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISfwi - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISfhe - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISiwi - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISihe - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISffi - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISfli - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IShpo - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISvpo - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISvss - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IShss - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IShtm - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IShvi - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:4,3,1 +[pAW:DEBUG] preargs: - msg:ISsnu - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IEbri - postargs:4,3,128 +[pAW:DEBUG] preargs: - msg:IEaou - postargs:4,3,2 +[pAW:DEBUG] preargs: - msg:IEchs - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IEcvs - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IEche - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:IEcve - postargs:4,3,0 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:2,3,0 +[pAW:DEBUG] preargs: - msg:ISaut - postargs:2,3,0 +[pAW:DEBUG] preargs: - msg:ISasf - postargs:2,3,0 +[pAW:DEBUG] preargs: - msg:ISaus - postargs:2,3,0 +[pAW:DEBUG] preargs: - msg:ISacy - postargs:2,3,0 +[pAW:DEBUG] preargs: - msg:ISscc - postargs:2,3,1 diff --git a/bindings.py b/bindings.py index 6b0e7f2..837f07c 100755 --- a/bindings.py +++ b/bindings.py @@ -145,7 +145,7 @@ _FILTER={ # PROGRESS "PSprg99" # GCfrl ? # 0,0GCtio ? -_MESSAGE_REGEX=re.compile("(?P(\d)*(,\d)*)(?P\D*)(?P(\d)*(,\d)*)") +_MESSAGE_REGEX=re.compile("(?P(\d*)*(,\d*)*)(?P\D*)(?P(\d*)*(,\d*)*)") _MATCHS={ "*":"CONNECT", @@ -165,7 +165,7 @@ _MATCHS={ "GCfra":"FREEZEALL", "GCfrl":"FREEZELAYER", "GCply":"DISPLAYLAYER", - "ISsva":"DETECTED", + "ISsva":"DETECTED", # Undocumented "E":"ERROR" } @@ -362,6 +362,7 @@ class analogController(object): def POSTMATCH_LOADMM(self,match): "Result of a load master memory" return True + # def POSTMATCH_TAKEAVL(self,match): # "Take available answer 1" # if match.group("postargs")[-1]=="1": @@ -620,7 +621,7 @@ class analogController(object): self.connect() self.getDevice() self.getVersion() - # self.getStatus(3) + self.getStatus(3) #########################################