OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
output_eng_data_to_scan.c
Go to the documentation of this file.
1 #include "L1A_prototype.h"
2 #include "PGS_IO.h"
3 #include "PH_pkt_hdr.h"
4 #include "SC_scan.h"
5 
6 
8  PGSt_IO_L0_Packet *pkt,
9  SC_SCAN_DATA_t *L1A_scan)
10 
11 /*
12 !C************************************************************************
13 
14 !Description: This routine determines what type of engineering packet the
15  current packet is, and calls the appropriate routines to output
16  the packet's data to the scan's structure
17 
18 !Input Parameters:
19  PH_PACKET_HEADER_t *pkt_header ** Buffer that contains pkt **
20  ** header info of the pckt **
21 
22  PGSt_IO_L0_Packet *pkt ** The structure containing **
23  ** the current packet's **
24  ** unpacked contents **
25 
26 !Output Parameters:
27  None
28 
29 !Input/Output Parameters:
30  SC_SCAN_DATA_t *L1A_scan ** The MODIS scan structure **
31  ** currently being built **
32 
33 Return Values: None
34 
35 Externally Defined:
36  PGSt_IO_L0_Packet (PGS_IO.h)
37  PH_PACKET_HEADER_t (PH_pkt_hdr.h)
38  PH_SEC_PKT_TYPE_ENG1_GROUP (PH_pkt_hdr.h)
39  PH_SEC_PKT_TYPE_ENG2_GROUP (PH_pkt_hdr.h)
40  PH_PRI_SEQUENCE_FIRST_PKT_IN_GROUP (PH_pkt_hdr.h)
41  PH_PRI_SEQUENCE_SECOND_PKT_IN_GROUP (PH_pkt_hdr.h)
42  SC_SCAN_DATA_t (SC_scan.h)
43 
44 Called By:
45  put_pkt_cont_in_scan
46 
47 Routines Called:
48  output_eng1_pkt1_to_scan
49  output_eng1_pkt2_to_scan
50  output_eng2_pkt1_to_scan
51  output_eng2_pkt2_to_scan
52 
53 !Revision History:
54  Revision 2.0 1997/08/15 07:30 EDT
55  Timi Adelekan/SAIC/GSC (adelekan@ltpmail.gsfc.nasa.gov)
56  Originated Code for version 2.
57 
58  Revision 1.1 1997/08/27 9:45
59  Tom Johnson (johnson@ltpmail.gsfc.nasa.gov)
60  Incorporate PDL walkthru comments
61 
62  Revision 1.0 1997/06/18 16:40 EDT
63  Timi Adelekan/SAIC/GSC (adelekan@ltpmail.gsfc.nasa.gov)
64  Original design.
65 
66 !Team-unique Header:
67  This software is developed by the MODIS Science
68  Data Support Team (SDST) for the National Aeronautics
69  and Space Administration (NASA), Goddard Space Flight
70  Center (GSFC), under contract NAS5-32373.
71 
72 !References and Credits:
73  None
74 
75 !Design Notes:
76  The CODE below was developed in C language.
77 
78  This routine was designed totally under the assumption that
79  the packet header has been previously validated and there
80  is no need to test for error conditions.
81 
82 !END*************************************************************************
83 */
84 
85  {
86  /**************************************************************************/
87  /* */
88  /* Determine what type of engineering packet the current packet is then */
89  /* call the appropiate routine to output the data to the scan structure. */
90  /* */
91  /**************************************************************************/
92  /* */
93  /* IF PH_PACKET_HEADER_t.pkt_type is equal to PH_SEC_PKT_TYPE_ENG1_GROUP */
94  /* THEN */
95  /* IF PH_PACKET_HEADER_t.sequence_flag is equal to */
96  /* PH_PRI_SEQUENCE_FIRST_PKT_IN_GROUP */
97  /* THEN */
98  /* CALL output_eng1_pkt1_to_scan to output the Engineering group 1 */
99  /* packet 1 data to the scan structure */
100  /* INPUTS: pkt, SC_SCAN_DATA_t */
101  /* OUTPUTS: SC_SCAN_DATA_t */
102  /* RETURN: NONE */
103  /* ELSE */
104  /* CALL output_eng1_pkt2_to_scan to output the Engineering group 1 */
105  /* packet 2 data to the scan structure */
106  /* INPUTS: pkt, SC_SCAN_DATA_t */
107  /* OUTPUTS: SC_SCAN_DATA_t */
108  /* RETURN: NONE */
109  /* ENDIF */
110  /* ELSE */
111  /* IF PH_PACKET_HEADER_t.sequence_flag is equal to */
112  /* PH_PRI_SEQUENCE_FIRST_PKT_IN_GROUP */
113  /* THEN */
114  /* CALL output_eng2_pkt1_to_scan to output the Engineering group 2 */
115  /* packet 1 data to the scan structure */
116  /* INPUTS: pkt, SC_SCAN_DATA_t */
117  /* OUTPUTS: SC_SCAN_DATA_t */
118  /* RETURN: NONE */
119  /* ELSE */
120  /* CALL output_eng2_pkt2_to_scan to output the Engineering group 2 */
121  /* packet 2 data to the scan structure */
122  /* INPUTS: pkt, SC_SCAN_DATA_t */
123  /* OUTPUTS: SC_SCAN_DATA_t */
124  /* RETURN: NONE */
125  /* ENDIF */
126  /* ENDIF */
127  /* */
128  /**************************************************************************/
129 
130  if (pkt_header->pkt_type == PH_SEC_PKT_TYPE_ENG1_GROUP) {
132  output_eng1_pkt1_to_scan (pkt, L1A_scan);
133  else
134  output_eng1_pkt2_to_scan (pkt, L1A_scan);
135  }
136 
137  else {
139  output_eng2_pkt1_to_scan (pkt, L1A_scan);
140  else
141  output_eng2_pkt2_to_scan (pkt, L1A_scan);
142  }
143 
144  } /* End of routine output_eng_data_to_scan */
void output_eng1_pkt2_to_scan(PGSt_IO_L0_Packet *pkt, SC_SCAN_DATA_t *L1A_scan)
void output_eng2_pkt2_to_scan(PGSt_IO_L0_Packet *pkt, SC_SCAN_DATA_t *L1A_scan)
void output_eng_data_to_scan(PH_PACKET_HEADER_t *pkt_header, PGSt_IO_L0_Packet *pkt, SC_SCAN_DATA_t *L1A_scan)
void output_eng1_pkt1_to_scan(PGSt_IO_L0_Packet *pkt, SC_SCAN_DATA_t *L1A_scan)
#define PH_PRI_SEQUENCE_FIRST_PKT_IN_GROUP
Definition: PH_pkt_hdr.h:127
#define PH_SEC_PKT_TYPE_ENG1_GROUP
Definition: PH_pkt_hdr.h:163
void output_eng2_pkt1_to_scan(PGSt_IO_L0_Packet *pkt, SC_SCAN_DATA_t *L1A_scan)