#include "ftu_cfg_parse.h"
#include "make_out_cfg.h"

LOCAL std::string g_cfg_path = "/mnt/RTU/test/file/SYSCONFIG/";
LOCAL std::string g_out_put_path = "./";

int main(int argc, char *argv[])
{
    if(argc >= 2)
    {
        g_cfg_path = argv[1];
        if(argc >= 3)
        {
            g_out_put_path = argv[2];
        }
    }

    if(0 != parse_ftu_cfg(g_cfg_path))
    {
        LOG_E("parse_ftu_cfg failed, path: %s", g_cfg_path.c_str());
        return -1;
    }

    LOG_I("parse_ftu_cfg success, path: %s", g_cfg_path.c_str());

    if(0 != output_ftu_cfg(g_out_put_path))
    {
        LOG_E("output_ftu_cfg failed, path: %s", g_out_put_path.c_str());
        return -1;
    }

    LOG_I("output_ftu_cfg success, path: %s", g_out_put_path.c_str());

    return 0;
}