Main Page | Class List | File List | Class Members | File Members

libxrit_types.h

Go to the documentation of this file.
00001 /* libxrit_types.h */
00002 
00003 /* 
00004    Copyright (C) 2005 Fabrice Ducos <fabrice.ducos@icare.univ-lille1.fr>
00005    This file is part of the LibXRIT Library.
00006 
00007    The LibXRIT Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    The LibXRIT Library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with the LibXRIT Library; if not, write to the Free
00019    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00020    02111-1307 USA.
00021 
00022 */
00023 
00024 #ifndef _LIBXRIT_TYPES_H
00025 #define _LIBXRIT_TYPES_H
00026 
00027 #include <stdint.h>
00028 #include <time.h>
00029 #include "ccsds_time.h"
00030 
00031 typedef enum _xrit_file_types_t {
00032   XRIT_IMAGE_DATA_FILE = 0,
00033   XRIT_GTS_MESSAGE = 1,
00034   XRIT_ALPHANUM_TEXT_FILE = 2,
00035   XRIT_ENCRYPT_KEY_MESSAGE = 3,
00036   /* 4..127 reserved for future global usage */
00037   /* 128..255 for mission specific use */
00038   XRIT_CYCLE_PROLOGUE = 128, /* MSG specific */
00039   XRIT_CYCLE_EPILOGUE = 129  /* MSG specific */
00040 } xrit_file_types_t;
00041 
00042 typedef enum _xrit_header_types_t {
00043   XRIT_PRIM_HEADER = 0,
00044   XRIT_IMAGE_STRUCT = 1,
00045   XRIT_IMAGE_NAVIGATION = 2,
00046   XRIT_IMAGE_DATA_FUNC = 3,
00047   XRIT_ANNOTATION = 4,
00048   XRIT_TIME_STAMP = 5,
00049   XRIT_ANCILLARY_TEXT = 6,
00050   XRIT_KEY_HEADER = 7,
00051   /* 8..127 reserved for future global usage */
00052   /* 128..255 for mission specific use */
00053   XRIT_SEGMENT_IDENTIFICATION = 128,
00054   XRIT_IMAGE_SEGMENT_ROW_QUALITY = 129
00055 } xrit_header_types_t;
00056 
00057 typedef struct _xrit_prim_header_t {
00058   uint8_t segment_type;
00059   uint32_t total_header_len;
00060   uint64_t data_field_len;
00061 } xrit_prim_header_t;
00062 
00063 typedef struct _xrit_image_struct_t {
00064   uint8_t nbits_per_pixel;
00065   uint16_t ncolumns;
00066   uint16_t nrows;
00067   uint8_t compression_flag;
00068 } xrit_image_struct_t;
00069 
00070 typedef struct _xrit_image_navig_t {
00071   char projection_name[33];
00072   int32_t column_scaling_factor;
00073   int32_t row_scaling_factor;
00074   int32_t column_offset;
00075   int32_t row_offset;
00076 } xrit_image_navig_t;
00077 
00078 typedef struct _xrit_data_func_t {
00079   char *data_def_block; /* up to 65532 bytes */
00080 } xrit_data_func_t;
00081 
00082 typedef struct _xrit_annotation_t {
00083   char *annotation_text; /* up to 64 bytes */
00084 } xrit_annotation_t;
00085 
00086 typedef struct _xrit_time_stamp_t {
00087   // char time_stamp[7]; /* data type is in fact 'CCSDS time' (7 bytes); obsolete; replaced by the following fields */
00088   /* uint8_t p_field; */ /* preambule field from CCSDS Recommandation for Time Formats (won't be used here) */
00089   uint16_t tai_day; /* count of days since 1-Jan-1958 (TAI Epoch, Temps Atomique International) */
00090   uint16_t unix_day; /* count of days since 1-Jan-1970 (Unix Epoch) */
00091   uint32_t ms_of_day; /* ms in the current day */
00092   time_t unix_seconds; /* count of seconds since 1-Jan-1970 (Unix Epoch) */
00093 } xrit_time_stamp_t;
00094 
00095 typedef struct _xrit_ancillary_text_t {
00096   char *ancillary_text; /* up to 65532 bytes */
00097 } xrit_ancillary_text_t;
00098 
00099 typedef struct _xrit_key_header_t {
00100   char *key_header_info; /* mission specific, up to 65532 */
00101 } xrit_key_header_t;
00102 
00103 typedef struct _xrit_segment_id_t {
00104   uint16_t GP_SC_ID;
00105   uint8_t spectral_channel_id;
00106   uint16_t segment_sequence_number;
00107   uint16_t planned_start_segment_seq_number;
00108   uint16_t planned_end_segment_seq_number;
00109   uint8_t data_field_representation;
00110 } xrit_segment_id_t;
00111 
00112 #endif

Generated on Wed Oct 19 13:55:57 2005 for LibXRIT by doxygen 1.3.5