GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-2 > qse_print / rhel6-64
#include <QSD/CCSDS_istream.h>
#include <QSD/CCSDS_telemetry.h>
#include <PBI/BSWP.ih>
#include <PBI/Endianness.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
Classes | |
struct | _Ctl |
Run time print options/parameters. More... | |
struct | _Packet |
A maximally sized CCSDS packet. More... | |
Defines | |
#define | RND_TO(_x, _r) (((_x) + (_r) - 1) / (_r)) * (_r) |
Round _x up to the nearest boundary of _r. | |
Typedefs | |
typedef enum _PRT_M | PRT_M |
Typedef for enum PRT_M. | |
typedef struct _Ctl | Ctl |
Typedef for struct _Ctl. | |
typedef struct _Packet | Packet |
Typedef for struct _Packet. | |
Enumerations | |
enum | _PRT_M { PRT_M_HDR = 0x1, PRT_M_PKT = 0x2 } |
What to print. More... | |
Functions | |
static void | report_usage (void) |
Brief explanation on qsep_print usage. | |
static int | get_ctl (Ctl *ctl, int argc, char *const argv[]) |
Examines the command line parameters and fills the print run time options control structure. | |
static void | printRaw (const unsigned int *pdata, unsigned int cnt) |
Bare bones dump of the specified number of 32-bit words. | |
static void | new_line (void) |
Prints a new line. | |
int | QSE_print (int argc, char *const argv[]) |
Process a file of CCSDS packets. | |
int | main (int argc, char *const argv[]) |
Process a file of physics events datagrams. |
Cvs $Id: qse_print.c,v 1.7 2011/03/27 01:45:45 russell Exp $
> qse_print -n:<number# of packets> -s<# to skip> <file_name>
#define RND_TO | ( | _x, | |||
_r | ) | (((_x) + (_r) - 1) / (_r)) * (_r) |
Round _x up to the nearest boundary of _r.
_x | The value to round | |
_r | The rounding |
enum _PRT_M |
static int get_ctl | ( | Ctl * | ctl, | |
int | argc, | |||
char *const | argv[] | |||
) | [static] |
Examines the command line parameters and fills the print run time options control structure.
ctl | The parameter run time options block. | |
argc | The number of command line parameters. | |
argv | The array of pointers to the command line parameters. |
0,Everything | is okay. | |
-1,Incorrect | command usage. Usually this means that the input file name was absent. |
References _Ctl::file, _Ctl::nprint, _Ctl::nskip, _Ctl::options, PRT_M_HDR, PRT_M_PKT, and report_usage().
Referenced by QSE_print().
int main | ( | int | argc, | |
char *const | argv[] | |||
) |
Process a file of physics events datagrams.
argc | The argument count | |
argv | The vector of command line strings |
References QSE_print().
static void printRaw | ( | const unsigned int * | pdata, | |
unsigned int | cnt | |||
) | [static] |
Bare bones dump of the specified number of 32-bit words.
pdata | Pointer to the data to print | |
cnt | The number of 32-bit words to dump |
References new_line().
Referenced by QSE_print().
int QSE_print | ( | int | argc, | |
char *const | argv[] | |||
) |
Process a file of CCSDS packets.
argc | The argument count | |
argv | The vector of command line strings |
References _Packet::buf, _Ctl::file, get_ctl(), _Ctl::nprint, _Ctl::nskip, _Ctl::options, printRaw(), PRT_M_HDR, and PRT_M_PKT.
Referenced by main().