本文整理汇总了C++中Publisher::printInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ Publisher::printInfo方法的具体用法?C++ Publisher::printInfo怎么用?C++ Publisher::printInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Publisher
的用法示例。
在下文中一共展示了Publisher::printInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
// default setup choices
cout<<endl;
Device* dev = new MPU6050("SparkFun MPU6050");
cout<<"Default "; dev->printInfo();
string dF = "Sweden";
cout<<"Default Dataset: " <<dF <<endl;
Publisher* p = new LogFile("log.txt");
cout<<"Default "; p->printInfo();
// instantiate & initialize the HMPdetector components
Creator oneCreator(dF, dev);
Classifier oneClassifier(dF, dev, p);
cout<<endl <<"Initialization phase of HMPdetector: DONE" <<endl;
/*
// instantiate & initialize the PEIS component
peiskmt_initialize(&argc, argv);
// retrieve componentID from the component
int componentID = peiskmt_peisid();
printf("componentID: %d\n", componentID);
Classifier one_classifier(dF);
//DEBUG: one_classifier.printSetInfo();
SensingBracelet one_sensingBracelet(dF);
//DEBUG: one_sensingBracelet.printSetStatus();
*/
// available options (short-form)
//const char *short_options = "v:r:wbBctl:mh";
const char *short_options = "v:::mhE";
// available options (long-form)
static struct option long_options[] =
{
{"validate", required_argument, 0, 'v'},
//{"reason", required_argument, 0, 'r'},
//{"wearable", required_argument, 0, 'w'},
//{"Bracelet", required_argument, 0, 'B'},
//{"classify", required_argument, 0, 'c'},
//{"test", required_argument, 0, 't'},
//{"load", required_argument, 0, 'l'},
{"model", optional_argument, 0, 'm'},
{"help", no_argument, 0, 'h'},
{"EXIT", no_argument, 0, 'E'},
{0, 0, 0, 0} //required line
};
// retrieve & execute the chosen option
//!\todo make it possible to have multiple iterations
char c;
do
{
c = getopt_long(argc, argv, short_options, long_options, NULL);
switch (c)
{
case 'E':
return EXIT_SUCCESS;
case 'h':
print_help();
break;
case 'm':
if(argv[2])
{
cout<<"Modelling folder: " <<argv[2] <<endl;
oneCreator.driver->printInfo();
oneCreator.setDatasetFolder(argv[2]);
}
oneCreator.generateAllModels();
cout<<"Created dataset in: "<<oneCreator.datasetFolder <<endl;
break;
/*
case 'l':
oneClassifier.buildSet(argv[2], argv[3], argv[4]);
cout<<"Loaded dataset from: "<<oneClassifier.datasetFolder <<endl;
break;
*/
case 'v':
oneClassifier.validateModel(argv[2], argv[3], atoi(argv[4]));
cout<<"results in: ./Results/" <<argv[3] <<"/" <<endl;
break;
/*
case 't':
one_classifier.longTest(argv[2]);
cout<<"results in: ./Results/longTest/" <<endl;
return EXIT_SUCCESS;
break;
case 'c':
cout<<"use 'tupleview' to monitor the system" <<endl;
one_classifier.onlineTest(argv[2]);
return EXIT_SUCCESS;
break;
case 'r':
one_sensingBracelet.offlineSensingBracelet(argv[2], argv[3]);
cout<<"results in: " <<argv[2] <<endl;
return EXIT_SUCCESS;
break;
case 'B':
cout<<"use 'tupleview' to monitor the system" <<endl;
one_sensingBracelet.onlineSensingBracelet(argv[2]);
//.........这里部分代码省略.........