main.cpp 536 B

12345678910111213141516171819
  1. #include "acq_vendor.h"
  2. int main(int argc, char *argv[])
  3. {
  4. HTELINK_LOG_ENABLE(true);
  5. if (getenv(VENDOR_RUN_PATH_ENV) == nullptr) {
  6. HTELINK_LOG_INFO("execute env not set");
  7. std::string exe_dir = get_current_dir_name();
  8. setenv(VENDOR_RUN_PATH_ENV, exe_dir.c_str(), 1);
  9. }
  10. HTELINK_LOG_INFO("execute directory is %s", getenv(VENDOR_RUN_PATH_ENV));
  11. vendor::VendorBase *vdor = new iot_acq::AcqVendor();
  12. if (vendor::VendorBase::ParseOptionArgs(vdor, argc, argv) != 0) {
  13. exit(-1);
  14. }
  15. return vdor->Exec();
  16. }