Example #1
0
/* demonstrates the use of libdetectionModule */
int main(int argc, char** argv) 
{
        std::cerr << "Got command line arguments: " << std::endl;
        for (int i = 0; i != argc; ++i) {
                std::cerr << "Argument " << i << ": " << argv[i] << std::endl;
        }

        if (argc == 2) {
                ExampleModule m(argv[1]);
                return m.exec();
        }

        ExampleModule m;
        return m.exec();

}
Example #2
0
/* demonstrates the use of libdetectionModule */
int main(int argc, char** argv) 
{
	msgStr.setName("First Examplemodule");
	msgStr.setLevel(MsgStream::INFO);
		
        msgStr.print(MsgStream::INFO, "Got command line arguments:");
        for (int i = 0; i != argc; ++i) {
                msgStr << MsgStream::INFO << "Argument " << i << ": " << argv[i] << MsgStream::endl;
        }

        if (argc == 2) {
                ExampleModule m(argv[1]);
                return m.exec();
        }

        ExampleModule m;
        return m.exec();

}