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))
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))
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))
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()