OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
print_stats.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include "PGS_SMF.h"
3 #include "packet_stats.h"
5 
6 void print_stats(void)
43 {
44  char buffer[1024];
45 
46  sprintf(buffer, "Packet filtering statistics.\n"
47  "\tpackets: %9lu\n"
48  "\tNon-zero version: %9lu\n"
49  "\tTest: %9lu\n"
50  "\tNon-zero sec_flag: %9lu\n"
51  "\tNon-zero sec_hdr_flag: %9lu\n"
52  "\tBad APID: %9lu\n"
53  "\tInvalid time_tag: %9lu\n"
54  "\tQuick Look: %9lu\n"
55  "\tBad Packet type: %9lu\n"
56  "\tSeq_flag/type mismatch: %9lu\n"
57  "\tLength/type mismatch: %9lu\n"
58  "\tType mismatch: %9lu\n"
59  "\tinvalid frame_count: %9lu\n",
64 
65  PGS_SMF_GenerateStatusReport(buffer);
66  /* The only way this function can fail is if it can't open the log file.
67  * Therefore, there's no way to report the failure of this function.
68  */
69 }
70 
unsigned long length_type
Definition: packet_stats.h:58
unsigned long version
Definition: packet_stats.h:47
void print_stats(void)
Definition: print_stats.c:6
unsigned long frame_count
Definition: packet_stats.h:60
unsigned long quick_look
Definition: packet_stats.h:53
unsigned long time_tag
Definition: packet_stats.h:52
struct packet_stats stats
Definition: print_stats.c:4
unsigned long type
Definition: packet_stats.h:48
unsigned long packets
Definition: packet_stats.h:45
unsigned long apid
Definition: packet_stats.h:51
unsigned long sec_hdr_flag
Definition: packet_stats.h:50
unsigned long seq_flag
Definition: packet_stats.h:49
unsigned long type_flag
Definition: packet_stats.h:59
unsigned long seq_type
Definition: packet_stats.h:57
unsigned long pkt_type
Definition: packet_stats.h:54