diff --git a/opcuaserv/pypcc2.py b/opcuaserv/pypcc2.py deleted file mode 100644 index ca0b4a21769f024112b41dda95589cfbce81b1b4..0000000000000000000000000000000000000000 --- a/opcuaserv/pypcc2.py +++ /dev/null @@ -1,59 +0,0 @@ -import opcuaserv -import threading -import signal -import sys -import time -#import Vars -import logging -import argparse -from opcuaserv import i2client -from opcuaserv import yamlreader - -def run(args): -#RCUthread1=RCU.start(Q1) -#CLKthread1=CLK.start(Q2) - - RunTimer=True; - def TimerThread(RCU_I2C,RCU_conf): - V1=opcuaserv.AddVar("RCU_monitor_rate_RW",30) - cnt=0;#Count second ticks - while RunTimer: - time.sleep(1) - T1=V1.get_data_value().Value.Value - if T1==0: - continue; - cnt+=1; - if cnt>=T1: - # if Q1.qsize()>3: continue; - cnt=0; - # logging.debug(str(("I2C bytes=",I2C.I2Ccounter," Qlength=",Q1.qsize()))) - # RCU.Queue_Monitor(Q1) - - logging.info("End Timer thread") - -#Timerthread1 = threading.Thread(target=TimerThread, args=(RCU_I2C,RCU_conf)) -#Timerthread1.start() - -# on SIGINT: stop thread(s) by adding None to instruction queue(s) - def signal_handler(sig, frame): -# logging.info('Stop RCU thread') -# Q1.put(None) -# Q2.put(None) -# logging.info('Stop timer thread') - global RunTimer; - RunTimer=False - signal.signal(signal.SIGINT, signal_handler) - - -# try: -#Do nothing. - while RunTimer: - time.sleep(1) -# time.sleep(0.001) -# RCU_conf.getvar();#Todo use thread and blocking - -# finally: -# RCU_I2C.stop(); -# RCUthread1.join() -# CLKthread1.join() -# Timerthread1.join()