GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > SIIS / dev
Constituent: siis2moc     Tag: sun-gcc
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_pri.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_printProc.h"
#include "PBS/TASK.h"
#include "SIIS/SIIS_file.h"
#include "SIIS/SIIS_moc.h"
#include "SIIS/SIIS_rec.h"
#include "SIIS/SIIS_vcdu.h"
Include dependency graph for siis2moc.c:
Data Structures | |
struct | _Apid_Info |
Defines | |
#define | GLAST_ID 251 |
#define | DIM(a) (sizeof (a) / sizeof (*a)) |
Typedefs | |
typedef _Apid_Info | Apid_Info |
Functions | |
static unsigned int | find_apid_entry (Apid_Info **apid_info_p, const unsigned short apid, const unsigned short vcid) |
static unsigned int | add_apid_entry (Apid_Info **apid_info_p, const unsigned short apid, const unsigned short vcid) |
static unsigned int | parse_command_line (int argc, char *argv[]) |
Interpret the command line parameters. | |
void | print_message (MSG_OutputModes mode, void *prm, const MSG_Message *msg) |
Output processor callback routine to print messages. | |
static unsigned int | start_message_system (void) |
static unsigned int | stop_message_system (void) |
static unsigned int | skip_file_data (FILE *in_file, const unsigned int num_bytes) |
static unsigned int | create_moc_file (Apid_Info *apid_info, const SIIS_Pdu_Hdr *pdu_hdr) |
static unsigned int | get_apid_info (Apid_Info **apid_info_p, const SIIS_Pdu_Hdr *pdu_hdr, const unsigned short apid) |
static unsigned int | close_moc_files (void) |
static unsigned int | gather_pdu_header (SIIS_Pdu_Hdr *pdu_hdr, const unsigned int vcdu_status, const unsigned int time_tag, const SIIS_Vcdu_Hdr *vcdu_hdr) |
static unsigned int | parse_ccsds_header (const unsigned char *data, const unsigned int data_bytes, unsigned short *type, unsigned short *apid, unsigned short *length) |
static unsigned int | write_ccsds_packet (SIIS_Pdu_Hdr *pdu_hdr, const unsigned char *data, const unsigned int data_bytes, const unsigned short apid, const unsigned short length) |
static unsigned int | extract_ccsds_packets (SIIS_Pdu_Hdr *pdu_hdr, const unsigned char *data, unsigned int data_bytes) |
static unsigned int | process_raw_telem (const unsigned char *body, const unsigned int body_bytes, const unsigned int time_tag) |
unsigned int | process_record (FILE *in_file) |
int | main (int argc, char *argv[]) |
Variables | |
static char * | In_File_Name |
Pointer to the name of the input file. | |
static int | Include_All |
Indicates whether we're including all APIDs. | |
static int | Frame_Count = 0 |
Number of VCDU frames processed. | |
static int | Packet_Read_Count = 0 |
Number of CCSDS packets read. | |
static int | Packet_Write_Count = 0 |
Number of CCSDS packets written. | |
static int | Apid_Count = 0 |
Number of different APIDs found. | |
static Apid_Info | Apid_Vcid [32] = { { 0 } } |
Table of APID/VCIDs found in the archive file. |
CVS $Id: siis2moc.c,v 1.3 2004/12/02 17:52:51 dmay Exp $
Extract CCSDS packets from a SIIS archive file and write them to level 0 MOC files.
|
Calculate the number of items in an array. |
|
Spacecraft ID for GLAST |
|
The typedef for _Apid_Info |
|
Add a new entry in the APID/VCID table for a particular APID and VCID.
|
|
Close all level 0 MOC files that have been created.
|
|
Create a level 0 MOC file for a CCSDS packet.
|
|
Extract the CCSDS packets from within a VCDU frame and store them in MOC level 0 files.
|
|
Find an entry in the APID/VCID table for a particular APID and VCID.
|
|
Gather information that will be stored in a packet annotation header.
|
|
Find the entry in the APID/VCID table for a particular APID and VCID. If there is no entry, then create a new entry and a new level 0 MOC file.
|
|
The application entry point.
|
|
Extract information from the header of a CCSDS packet. Note that the 'length' value includes the length of the packet header.
|
|
Interpret the command line parameters.
|
|
Output processor callback routine to print messages.
printf . |
|
Process a raw telemetry record from the SIIS archive file. For each CCSDS packet within the record, add a packet annotation header to it and store it into a level 0 MOC file.
|
|
Process a record from the SIIS archive file. Do nothing with the record unless it is a raw telemetry record. For raw telemetry records, extract the CCSDS packets and store them in MOC level 0 files. When finished, the file position indicator for in_file will point to the start of the next record within the archive file.
|
|
Read and discard data from a file.
|
|
Start the messaging system.
|
|
Stop the messaging system.
|
|
Write a CCSDS packet and packet annotation header to a level 0 MOC file. There is a separate file for each APID/VCID. The file is created if this is the first packet for a given file.
|