def callbackCommandSendAndRunClips(data): print 'SEND AND RUN COMMAND' _clipsLock.acquire() clips.SendCommand(data.data, True) clipsFunctions.PrintOutput() _clipsLock.release() clipsFunctions.Run('') clipsFunctions.PrintOutput()
def str_query_KDB(req): print 'QUERY IN KDB ' + req.query _clipsLock.acquire() clips.SendCommand(req.query, True) clipsFunctions.PrintOutput() _clipsLock.release() clipsFunctions.Run('') result = str(clips.StdoutStream.Read()) print 'RESULT OF QUERY= ' + result print '' return StrQueryKDBResponse(result)
def str_query(req): print 'Query in KDB' + req.query _clipsLock.acquire() clips.SendCommand(req.query, True) clipsFunctions.PrintOutput() _clipsLock.release() clipsFunctions.Run('') result = str(clips.StdoutStream.Read()) if result.count('ROS') == 2: print 'ROS response' r = result.split('ROS') print r result = r[1] else: result = 'None' print 'Result of Query= ' + result print '' return StrQueryKDBResponse(result)
def callbackCommandSendCLIPS(data): print 'SEND COMMAND' _clipsLock.acquire() clips.SendCommand(data.data, True) clipsFunctions.PrintOutput() _clipsLock.release()
def callbackCommandSendCommand(data): clips.SendCommand(data.command, True) clipsFunctions.PrintOutput()
def setLogLevelTest(): _clipsLock.acquire() clips.SendCommand('(bind ?*logLevel* ' + 'getloglevel' + ')') #clipsFunctions.PrintOutput() _clipsLock.release()
def sendCommand(self): _clipsLock.acquire() clips.SendCommand(self.cmdVar.get(), True) clipsFunctions.PrintOutput() _clipsLock.release()
def setLogLevel(self): _clipsLock.acquire() clips.SendCommand('(bind ?*logLevel* ' + self.logLevelVar.get() + ')') clipsFunctions.PrintOutput() _clipsLock.release()