#include #include #include #include "canctrl.h" #include #include #include #include #include #include "ivversion.h" iv::Ivfault *gfault = nullptr; iv::Ivlog *givlog = nullptr; //void func() //{ // int i; // i = 0; // while(1) // { // std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // i++; // qDebug("pid is ",getpid()); // if(i == 10)break; // } // qDebug("pid is %d ",getpid()); // kill(getpid(),SIGINT); //} int main(int argc, char *argv[]) { showversion("driver_can_kvaser"); QCoreApplication a(argc, argv); gfault = new iv::Ivfault("kvaser_can"); givlog = new iv::Ivlog("kvaser_can"); QString strpath = QCoreApplication::applicationDirPath(); if(argc < 2){ givlog->info("read param form driver_can_vci.xml"); strpath = strpath + "/driver_can_kvaser.xml"; } else{ strpath = argv[1]; givlog->info("set param by default value"); } std::cout<start(); // std::thread b(func); return a.exec(); }