Commit e119b208 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Minor updates to doxygen documentation

parent 2f60099a
...@@ -371,7 +371,7 @@ INLINE_GROUPED_CLASSES = NO ...@@ -371,7 +371,7 @@ INLINE_GROUPED_CLASSES = NO
# Man pages) or section (for LaTeX and RTF). # Man pages) or section (for LaTeX and RTF).
# The default value is: NO. # The default value is: NO.
INLINE_SIMPLE_STRUCTS = NO INLINE_SIMPLE_STRUCTS = YES
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
# enum is documented as struct, union, or enum with the name of the typedef. So # enum is documented as struct, union, or enum with the name of the typedef. So
......
This diff is collapsed.
...@@ -53,12 +53,12 @@ int camogm_start_jpeg(camogm_state *state) ...@@ -53,12 +53,12 @@ int camogm_start_jpeg(camogm_state *state)
int rslt; int rslt;
if (!state->rawdev_op) { if (!state->rawdev_op) {
strcpy(state->path, state->path_prefix); //!make state->path a directory name (will be replaced when the frames will be written) strcpy(state->path, state->path_prefix); // make state->path a directory name (will be replaced when the frames will be written)
slash = strrchr(state->path, '/'); slash = strrchr(state->path, '/');
D2(fprintf(debug_file, "camogm_start_jpeg\n")); D2(fprintf(debug_file, "camogm_start_jpeg\n"));
if (slash) { if (slash) {
D3(fprintf(debug_file, "Full path %s\n", state->path)); D3(fprintf(debug_file, "Full path %s\n", state->path));
slash[0] = '\0'; //! truncate path to the directory name slash[0] = '\0'; // truncate path to the directory name
D3(fprintf(debug_file, "directory path %s\n", state->path)); D3(fprintf(debug_file, "directory path %s\n", state->path));
rslt = mkdir(state->path, 0777); rslt = mkdir(state->path, 0777);
D3(fprintf(debug_file, "mkdir (%s, 0777) returned %d, errno=%d\n", state->path, rslt, errno)); D3(fprintf(debug_file, "mkdir (%s, 0777) returned %d, errno=%d\n", state->path, rslt, errno));
......
...@@ -311,7 +311,7 @@ int parse_special(void) ...@@ -311,7 +311,7 @@ int parse_special(void)
// a hack - invlude length'skip if data position (header size is known and there is a gap) // a hack - invlude length'skip if data position (header size is known and there is a gap)
if (strcmp(str, "data_size") == 0) { if (strcmp(str, "data_size") == 0) {
gap = headerSize - lseek(ofd, 0, SEEK_CUR) - 8; gap = headerSize - lseek(ofd, 0, SEEK_CUR) - 8;
if (gap > 0) { //!it should be exactly 0 if there is no gap or >8 if there is if (gap > 0) { //it should be exactly 0 if there is no gap or >8 if there is
D4(fprintf(debug_file, "Inserting a skip tag to compensate for a gap (%d bytes) between the header and the frame data\n", gap)); D4(fprintf(debug_file, "Inserting a skip tag to compensate for a gap (%d bytes) between the header and the frame data\n", gap));
if (gap < 8) { if (gap < 8) {
D0(fprintf(debug_file, "not enough room to insret 'skip' tag - %d (need 8)\n", gap)); D0(fprintf(debug_file, "not enough room to insret 'skip' tag - %d (need 8)\n", gap));
...@@ -321,7 +321,7 @@ int parse_special(void) ...@@ -321,7 +321,7 @@ int parse_special(void)
putBigEndian(gap, 4); putBigEndian(gap, 4);
D4(fprintf(debug_file, "writing string <%s>\n", "skip")); D4(fprintf(debug_file, "writing string <%s>\n", "skip"));
write(ofd, "skip", 4); write(ofd, "skip", 4);
lseek(ofd, gap - 8, SEEK_CUR); //! lseek over the gap and proceed as before lseek(ofd, gap - 8, SEEK_CUR); // lseek over the gap and proceed as before
} }
if (sizes != NULL) { if (sizes != NULL) {
l = 0; l = 0;
......
...@@ -178,7 +178,7 @@ int camogm_frame_ogm(camogm_state *state) ...@@ -178,7 +178,7 @@ int camogm_frame_ogm(camogm_state *state)
* @brief Finish OGM file operation * @brief Finish OGM file operation
* @param[in] state a pointer to a structure containing current state * @param[in] state a pointer to a structure containing current state
* @return 0 if file was saved successfully and negative error code otherwise * @return 0 if file was saved successfully and negative error code otherwise
* @note: zero packets are OK, use them to end file with "last" turned on * @note Zero packets are OK, use them to end file with "last" turned on
*/ */
int camogm_end_ogm(camogm_state *state) int camogm_end_ogm(camogm_state *state)
{ {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
/** @brief The size of file search window. This window is memory mapped. */ /** @brief The size of file search window. This window is memory mapped. */
#define SEARCH_SIZE_WINDOW ((uint64_t)4 * (uint64_t)1048576) #define SEARCH_SIZE_WINDOW ((uint64_t)4 * (uint64_t)1048576)
/** @brief Time window (in seconds) used for disk index search. Index within this window is considered a candidate */ /** @brief Time window (in seconds) used for disk index search. Index within this window is considered a candidate */
#define SEARCH_TIME_WINDOW 600 #define SEARCH_TIME_WINDOW 60
/** @brief File starting marker on a raw device. It corresponds to SOI JPEG marker */ /** @brief File starting marker on a raw device. It corresponds to SOI JPEG marker */
static unsigned char elphelst[] = {0xff, 0xd8}; static unsigned char elphelst[] = {0xff, 0xd8};
/** @brief File ending marker on a raw device. It corresponds to EOI JPEG marker */ /** @brief File ending marker on a raw device. It corresponds to EOI JPEG marker */
...@@ -253,7 +253,6 @@ void dump_index_dir(const struct disk_idir *idir) ...@@ -253,7 +253,6 @@ void dump_index_dir(const struct disk_idir *idir)
{ {
struct disk_index *ind = idir->head; struct disk_index *ind = idir->head;
printf("Head pointer = 0x%p, tail pointer = 0x%p\n", idir->head, idir->tail);
while (ind != NULL) { while (ind != NULL) {
fprintf(debug_file, INDEX_FORMAT_STR, fprintf(debug_file, INDEX_FORMAT_STR,
ind->port, ind->rawtime, ind->usec, ind->f_offset, ind->f_size); ind->port, ind->rawtime, ind->usec, ind->f_offset, ind->f_size);
...@@ -993,7 +992,7 @@ static struct disk_index *find_disk_index(rawdev_buffer *rawdev, struct disk_idi ...@@ -993,7 +992,7 @@ static struct disk_index *find_disk_index(rawdev_buffer *rawdev, struct disk_idi
* @return None * @return None
* @warning The main processing loop of the function is enclosed in @e pthread_cleanup_push and @e pthread_cleanup_pop * @warning The main processing loop of the function is enclosed in @e pthread_cleanup_push and @e pthread_cleanup_pop
* calls. The effect of use of normal @b return or @b break to prematurely leave this loop is undefined. * calls. The effect of use of normal @b return or @b break to prematurely leave this loop is undefined.
* @todo print unrecognized command to debug output file * @todo Print unrecognized command to debug output file
*/ */
void *reader(void *arg) void *reader(void *arg)
{ {
...@@ -1106,6 +1105,7 @@ void *reader(void *arg) ...@@ -1106,6 +1105,7 @@ void *reader(void *arg)
} }
break; break;
case CMD_READ_FILE: case CMD_READ_FILE:
// read single file by offset given
if (index_dir.size > 0) { if (index_dir.size > 0) {
struct disk_index indx; struct disk_index indx;
if (get_indx_args(cmd_ptr, &indx) > 0 && if (get_indx_args(cmd_ptr, &indx) > 0 &&
...@@ -1115,6 +1115,7 @@ void *reader(void *arg) ...@@ -1115,6 +1115,7 @@ void *reader(void *arg)
} }
break; break;
case CMD_FIND_FILE: { case CMD_FIND_FILE: {
// find file by time stamp
struct disk_index indx; struct disk_index indx;
struct disk_index *indx_ptr = NULL; struct disk_index *indx_ptr = NULL;
if (get_timestamp_args(cmd_ptr, &indx) > 0) { if (get_timestamp_args(cmd_ptr, &indx) > 0) {
...@@ -1124,12 +1125,6 @@ void *reader(void *arg) ...@@ -1124,12 +1125,6 @@ void *reader(void *arg)
index_sparse.curr_indx = indx_ptr; index_sparse.curr_indx = indx_ptr;
} else { } else {
indx_ptr = find_nearest_by_time(&index_dir, indx.rawtime); indx_ptr = find_nearest_by_time(&index_dir, indx.rawtime);
/* debug code follows */
if (indx_ptr != NULL)
printf("Index found in pre-built index directory: offset = 0x%llx\n", indx_ptr->f_offset);
else
printf("Index NOT found in pre-built index directory. Probably it should be rebuilt\n");
/* end of debug code */
} }
if (indx_ptr != NULL) if (indx_ptr != NULL)
send_file(rawdev, indx_ptr, fd); send_file(rawdev, indx_ptr, fd);
...@@ -1137,6 +1132,7 @@ void *reader(void *arg) ...@@ -1137,6 +1132,7 @@ void *reader(void *arg)
break; break;
} }
case CMD_NEXT_FILE: { case CMD_NEXT_FILE: {
// read next file after previously found file
struct range rng; struct range rng;
struct disk_index *new_indx = NULL; struct disk_index *new_indx = NULL;
struct disk_index *indx_ptr = NULL; struct disk_index *indx_ptr = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment