Gateway(一)

发布时间 2023-09-18 17:55:54作者: $KAMISAMALZ

 

 

code/src/main.cpp

#include <unistd.h>
#include "common.h"
#include "global_config.h"
#include "drive_interface.h"
#include "other.h"

const char dev_version[20] = "V1.1.3.15";

void create_thread(void);
void test_fun();

int main(int argc, char *argv[])
{
    init_syslog();
    GW_LOG(LOG_INFO, "----------start run!----------\n");
    GW_LOG(LOG_INFO, "gateway version:%s!\n", dev_version);

    if ((compare_unique_by_rjgt() == NOT_OK) && (compare_unique_by_4gmodel() == NOT_OK ))
    {                
        GW_LOG(LOG_INFO, "verify unique error, program exit!\n");
        sleep(10);
        exit(0);
    }

    init_drive();
    init_other();
    parse_json();
    init_other_a();

    test_fun();

    create_thread();

    while (1)
    {
        sleep(1);
    }

    return 0;
}
View Code