Esempio n. 1
0
def testState(path):
    t_datas = readdata.read_datas(path)[0:20]
    t_datas = readdata.get_puredatas(t_datas)
    symbols = test_f()
    State = Stateline.StateLine(symbols)
    Results = State.messages2sym(t_datas)
    for result in Results:
        print(result)
Esempio n. 2
0
def raw_to_log(file_path, r_way, protocol):
    datas = read_datas(file_path, r_way)
    datas = get_puredatas(datas)
    raw_datas = []
    converter = Converter()
    logger_raw = get_logger(log_path + '/' + protocol, 'raw_message_logger')
    i = 0
    for data in datas:
        logger_raw.error(str(i) + ':' + converter.convert_raw_to_text(data))
Esempio n. 3
0
def raw_to_redis(file_path, r_way):
    datas = read_datas(file_path, r_way)
    datas = get_puredatas(datas)
    raw_datas = []
    converter = Converter()
    for data in datas:
        raw_datas.append(converter.convert_raw_to_text(data))
    key = file_path
    phrase_redis = redis_deal()
    phrase_redis.insert_to_redis(key, raw_datas)