//
// Created by zx on 2023/10/7.
//
#include <iostream>
#include "log/log.h"
#include "tof3d_manager.h"
#include "communication/rabbitmq_communication.h"

int main(int argc, char * argv[]) {
    // 初始化日志系统
    ZX::InitGlog(PROJECT_NAME, ETC_PATH PROJECT_NAME "/LogInfo/");

    /*LOG(INFO) << "begain init rabbitmq.";
    auto ret = RabbitmqCommunicationTof3D::get_instance_references().rabbitmq_init_from_protobuf(ETC_PATH"Tof3d/rabbitmq.prototxt");
    if (ret != SUCCESS) {
        LOG(ERROR) << "system communication mq init failed: " << ret.to_string();
        return -1;
    }
    RabbitmqCommunicationTof3D::get_instance_references().set_encapsulate_status_cycle_time(100);
*/
    tof3dManager tof3d;
    auto err = tof3d.init();
    LOG(INFO) << err.to_string();

    while (1) {
        usleep(2000 * 1000);
    }
    return err.get_error_code();
}
