コード例 #1
0
def FrequentTest(Messages):
    vespliter = splitter()
    FinalBorders = vespliter.split_by_frequent(Messages)
    ModbusConfig = modbus()
    RightBorders = [ModbusConfig.GetMessageBorder(Message) for Message in Messages]
    MeasureTool = MessageSplitMeasure()
    print(MeasureTool.Measure(RightBorders, FinalBorders))
コード例 #2
0
def OrderTest(Messages):
    vespliter = splitter()
    FinalBorders = vespliter.SplitByOrder(Messages)
    print(FinalBorders[0])
    ModbusConfig = modbus()
    RightBorders = [ModbusConfig.GetMessageBorder(Message) for Message in Messages]
    MeasureTool = MessageSplitMeasure()
    print(MeasureTool.Measure(RightBorders, FinalBorders))
コード例 #3
0
def OrderMergeTest(Messages, VoterA, VoterB):
    vespliter = splitter()
    FinalBorders = vespliter.CombineSplitBorders(Messages, VoterA, VoterB)
    print(FinalBorders[0])
    ModbusConfig = modbus()
    RightBorders = [ModbusConfig.GetMessageBorder(Message) for Message in Messages]
    MeasureTool = MessageSplitMeasure()
    print(MeasureTool.Measure(RightBorders, FinalBorders))
コード例 #4
0
ファイル: BorderTest.py プロジェクト: WXW322/backend
 def __init__(self):
     self.msgLogic = MegSplitLogic()
     self.modbus = ModBusDataTuning()
     self.md = modbus()
     self.anlzer = base_analyzer()
     self.ftp = FTPDataTuning()
     self.ftpPaser = FTPParser()
     self.cmPaser = ComPaser()
     self.cvt = Converter()
     self.mtool = MessageSplitMeasure()
     self.rds = redis_deal()