Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
playground:doxycode [2024/01/15 17:52] – lprobsth1 | playground:doxycode [2024/01/21 15:06] (current) – fix language lprobsth1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | sadsadsa | + | |< 100% min:1000px 50% 50%>| |
- | + | ^ Dokuwiki/ | |
- | <doxycode tagfiles=" | + | | The following example shows some C code from our custom library. Unfortunately the doxygen instance is not publicly available. || |
+ | | <file c test.c> | ||
#include " | #include " | ||
Line 24: | Line 25: | ||
TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | ||
} | } | ||
- | </doxycode> | + | </file> | < |
- | + | ||
- | < | + | |
- | #include < | + | |
- | cv:: | + | |
- | inputVideo.open(0); | + | |
- | cv:: | + | |
- | cv:: | + | |
- | cv:: | + | |
- | + | ||
- | while (inputVideo.grab()) { | + | |
- | cv::Mat image, imageCopy; | + | |
- | inputVideo.retrieve(image); | + | |
- | image.copyTo(imageCopy); | + | |
- | std:: | + | |
- | std:: | + | |
- | detector.detectMarkers(image, | + | |
- | // if at least one marker detected | + | |
- | if (ids.size() > 0) | + | |
- | cv:: | + | |
- | cv:: | + | |
- | char key = (char) cv:: | + | |
- | if (key == 27) | + | |
- | break; | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | <file c [enable_line_numbers=" | + | |
#include " | #include " | ||
Line 74: | Line 48: | ||
TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | ||
} | } | ||
- | </file> | + | </doxycode> | |
- | + | | Here the same example - but with linenumbers enabled. The doxycode code snippet uses the same XML cache file as the example above. || | |
- | + | | <file c [enable_line_numbers=" | |
- | <code c [enable_line_numbers=" | + | |
#include " | #include " | ||
Line 100: | Line 73: | ||
TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | ||
} | } | ||
- | </code> | + | </file> | < |
- | + | ||
- | ^ Step 1 ^ Doxycode ^ | + | |
- | | 1 | < | + | |
#include " | #include " | ||
Line 125: | Line 95: | ||
TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE," | ||
+ | } | ||
+ | </ | ||
+ | | < | ||
+ | The following example is taken from [[https:// | ||
+ | Building the snippet through the task runner is enabled globally for the tag file. | ||
+ | </ | ||
+ | | <code c> | ||
+ | #include < | ||
+ | cv:: | ||
+ | inputVideo.open(0); | ||
+ | cv:: | ||
+ | cv:: | ||
+ | cv:: | ||
+ | |||
+ | while (inputVideo.grab()) { | ||
+ | cv::Mat image, imageCopy; | ||
+ | inputVideo.retrieve(image); | ||
+ | image.copyTo(imageCopy); | ||
+ | std:: | ||
+ | std:: | ||
+ | detector.detectMarkers(image, | ||
+ | // if at least one marker detected | ||
+ | if (ids.size() > 0) | ||
+ | cv:: | ||
+ | cv:: | ||
+ | char key = (char) cv:: | ||
+ | if (key == 27) | ||
+ | break; | ||
+ | } | ||
+ | </ | ||
+ | #include < | ||
+ | cv:: | ||
+ | inputVideo.open(0); | ||
+ | cv:: | ||
+ | cv:: | ||
+ | cv:: | ||
+ | |||
+ | while (inputVideo.grab()) { | ||
+ | cv::Mat image, imageCopy; | ||
+ | inputVideo.retrieve(image); | ||
+ | image.copyTo(imageCopy); | ||
+ | std:: | ||
+ | std:: | ||
+ | detector.detectMarkers(image, | ||
+ | // if at least one marker detected | ||
+ | if (ids.size() > 0) | ||
+ | cv:: | ||
+ | cv:: | ||
+ | char key = (char) cv:: | ||
+ | if (key == 27) | ||
+ | break; | ||
} | } | ||
</ | </ | ||