HiRISE
 Observation

Public Types | Public Member Functions | Static Public Attributes | List of all members
MROSP_Header Class Reference

An MROSP_Header contains information used by the HiRISE instrument to identify a stored data block to the MRO spacecraft for downlink to Earth. More...

#include <MROSP_Header.hh>

Inheritance diagram for MROSP_Header:
Inheritance graph
[legend]
Collaboration diagram for MROSP_Header:
Collaboration graph
[legend]

Public Types

enum  Elements {
  Protocol_ID ,
  Transaction ,
  Transaction_ID ,
  Data_Amount ,
  Sync ,
  Pad_0 ,
  Checksum ,
  Pad_1 ,
  Total_Elements
}
 An Element refers to a data containing constituent of a component. More...
 
enum  Transaction_Type {
  SCIENCE = 1 ,
  ENGINEERING = 2
}
 Known transaction type values for the Transaction Element. More...
 
enum  Transaction_Segmentation {
  NONE ,
  START ,
  MIDDLE ,
  END
}
 Known segmentation values for the Transaction Element. More...
 
- Public Types inherited from Data_Block
enum  Data_Order
 
enum  Array_Index_Counts
 
enum  Array_Offset_Counts
 
typedef unsigned int Index
 
typedef std::vector< IndexValue_List
 
typedef void(* Copier) (unsigned char *destination, int destination_amount, const unsigned char *source, int source_amount)
 

Public Member Functions

 MROSP_Header ()
 Constructs an empty MROSP_Header. More...
 
 MROSP_Header (std::istream &stream)
 Constructs an MROSP_Header loaded from a data stream. More...
 
 MROSP_Header (const MROSP_Header &component, bool data_duplicate=true)
 Copy constructor. More...
 
MROSP_Headeroperator= (const MROSP_Header &component)
 Assigns another MROSP_Header to this one. More...
 
std::string id () const
 Provides the class ID on a line followed by the base Data_Component::id. More...
 
const char * name () const
 Gets the NAME of this class. More...
 
u_int_8 protocol_ID () const
 Gets the Protocol_ID Element value. More...
 
MROSP_Headerprotocol_ID (u_int_8 ID)
 Sets the Protocol_ID Element value. More...
 
u_int_8 transaction () const
 Gets the Transaction Element value. More...
 
MROSP_Headertransaction (u_int_8 value)
 Sets the Transaction Element value. More...
 
int transaction_type () const
 Gets the transaction type value from the Transaction Element. More...
 
MROSP_Headertransaction_type (Transaction_Type type)
 Sets the transaction type value in the Transaction Element. More...
 
int transaction_segmentation () const
 Gets the segmentation value from the Transaction Element. More...
 
MROSP_Headertransaction_segmentation (Transaction_Segmentation segmentation)
 Sets the segmentation value in the Transaction Element. More...
 
bool transaction_compressed () const
 Tests if the compression flag is set in the Transaction Element. More...
 
MROSP_Headertransaction_compressed (bool compressed)
 Sets or resets the compression flag in the Transaction Element. More...
 
u_int_16 transaction_ID () const
 Gets the Transaction_ID Element value. More...
 
MROSP_Headertransaction_ID (u_int_16 ID)
 Sets the Transaction_ID Element value. More...
 
u_int_32 data_amount () const
 Gets the Data_Amount Element value. More...
 
MROSP_Headerdata_amount (u_int_32 amount)
 Sets the Data_Amount Element value. More...
 
u_int_32 sync () const
 Gets the Sync Element value. More...
 
MROSP_Headersync (u_int_32 sync_pattern)
 Sets the Sync Element value. More...
 
u_int_16 checksum () const
 Gets the Checksum Element value. More...
 
MROSP_Headerchecksum (u_int_16 value)
 Sets the Checksum Element value. More...
 
u_int_16 pad_0 () const
 Gets the Pad_0 Element value. More...
 
MROSP_Headerpad_0 (u_int_16 value)
 Sets the Pad_0 Element value. More...
 
u_int_32 pad_1 () const
 Gets the Pad_1 Element value. More...
 
MROSP_Headerpad_1 (u_int_32 value)
 Sets the Pad_1 Element value. More...
 
std::ostream & print (std::ostream &stream=std::cout, bool verbose=false) const
 Prints the component structure and contents. More...
 
idaeim::PVL::AggregatePVL () const
 Produces a PVL rendition of the component. More...
 
bool is_valid () const
 Tests if the component data is valid. More...
 
- Public Member Functions inherited from Data_Component
 Data_Component (const char **names=NULL, unsigned int size=0, const Index *offsets=NULL, const Index indexed_arrays[][2]=NULL, Data_Order order=Data_Block::MSB)
 Constructs a Data_Component using component specifications. More...
 
 Data_Component (const Data_Component &component, bool data_duplicate=true)
 Copy constructor. More...
 
Data_Componentoperator= (const Data_Component &component)
 Assignment operator. More...
 
virtual ~Data_Component ()
 Destructor. More...
 
const char * name (Index element) const
 Gets the name of a component Element. More...
 
virtual u_int_32 get (Index element, Index index=0) const
 Gets a value from a data Element or array entry of the component. More...
 
virtual Data_Componentput (const u_int_32 value, Index element, Index index=0)
 Puts a value into a data Element or array entry of the component. More...
 
std::ostream & print_element (const Index element, int format=DECIMAL, std::ostream &stream=std::cout, int width=0) const
 Prints an Element description. More...
 
std::ostream & print_element (const Index element, std::ostream &stream) const
 Prints an Element description. More...
 
std::ostream & print_element_location (const Index element, std::ostream &stream=std::cout) const
 Prints the location of an Element in the component. More...
 
unsigned int element_location_print_width (Index element) const
 Gets the width of the Element location printing fields. More...
 
unsigned int name_field_width () const
 Gets the width of the Element name printing field. More...
 
Data_Componentname_field_width (unsigned int width)
 Sets the width of the Element name field for printing. More...
 
Data_Blockdata (void *const block)
 Overrides the base Data_Block::data to reset Local_Data. More...
 
Data_Blockattach (void *const block, unsigned int size)
 Attaches a new block of data to the component. More...
 
Data_Componentresize (unsigned int size)
 Resizes the block of local data storage. More...
 
unsigned char * data () const
 Gets a pointer to the current component storage. More...
 
unsigned int local_data ()
 Gets the size of the local data storage area. More...
 
u_int_16 internet_checksum () const
 Calculates the Internet Checksum as per RFC 1071. More...
 
- Public Member Functions inherited from Data_Block
 Data_Block ()
 
 Data_Block (void *const data, const Index *offsets, Index total_elements=0, const Index *array_counts=NULL, bool native_order=true)
 
 Data_Block (void *const data, const Value_List &offsets, const Value_List &array_counts, bool native_order=true)
 
 Data_Block (void *const data, const Value_List &offsets, bool native_order=true)
 
 Data_Block (void *const data, const Index *offsets, Index total_elements, const Index *array_counts, Data_Order data_order)
 
 Data_Block (void *const data, const Value_List &offsets, const Value_List &array_counts, Data_Order data_order)
 
 Data_Block (void *const data, const Index *offsets, Index total_elements, Data_Order data_order)
 
 Data_Block (void *const data, const Index *offsets, Data_Order data_order)
 
 Data_Block (void *const data, const Value_List &offsets, Data_Order data_order)
 
 Data_Block (void *const data, const Index *offsets, const Index indexed_counts[][2], Data_Order data_order)
 
 Data_Block (const Data_Block &data_block)
 
Data_Blockoperator= (const Data_Block &data_block)
 
virtual ~Data_Block ()
 
bool native () const
 
Data_Blocknative (bool native_order)
 
Data_Order data_order () const
 
Data_Blockdata_order (Data_Order order)
 
unsigned char * data () const
 
Index size () const
 
Value_List element_offsets_list () const
 
Indexelement_offsets ()
 
bool element_offsets (const Value_List &offsets)
 
bool element_offsets (const Index *offsets, Index total_elements=NO_INDEX)
 
bool element_sizes (const Value_List &sizes)
 
bool element_sizes (const Index *sizes, Index total_elements=NO_INDEX)
 
Index offset_of (Index element) const
 
bool offset_of (Index element, Index offset)
 
bool insert_element (Index offset, Index size, Index array_count=1)
 
Data_Blockdelete_element (Index element)
 
Data_Blockshift_offsets (int amount)
 
Index elements () const
 
Index size_of (Index element) const
 
bool size_of (Index element, Index size)
 
Index value_size_of (Index element) const
 
Data_Blockvalue_size_of (Index element, Index size)
 
Index index_of (Index offset) const
 
Value_List array_counts_list () const
 
Indexarray_counts ()
 
Data_Blockarray_counts (const Value_List &counts, Index begin=0)
 
Data_Blockarray_counts (const Index *counts, Index begin=0, Index end=NO_INDEX)
 
Data_Blockarray_indexed_counts (const Index indexed_counts[][2], Index total_counts=NO_INDEX)
 
Data_Blockarray_offset_counts (const Index offset_counts[][2], Index total_counts=NO_INDEX)
 
Index count_of (Index element) const
 
Data_Blockcount_of (Index element, Index count)
 
bool reset_counts (bool unconditional=true, Index begin=0, Index end=NO_INDEX)
 
const Data_Blockget (T &value, const Index element, const Index index=0) const
 
const Data_Blockget (T &value, const Index element, const Index index=0) const
 
get (const Index element, const Index index=0) const
 
get (const Index element, const Index index=0) const
 
Data_Blockput (T &value, const Index element, const Index index=0)
 
Data_Blockput (T &value, const Index element, const Index index=0)
 
const Data_Blockget (T *array, const Index element, Index count=0) const
 
const Data_Blockget (T *array, const Index element, Index count=0) const
 
Data_Blockput (T *array, const Index element, Index count=0)
 
Data_Blockput (T *array, const Index element, Index count=0)
 
std::istream & input (std::istream &stream)
 
std::ostream & output (std::ostream &stream) const
 
std::ostream & print (std::ostream &stream=std::cout) const
 

Static Public Attributes

static const char *const ID
 Class identification name with source code version and date. More...
 
static const char *const NAME = "MROSP Header"
 The component name. More...
 
static const char * NAMES []
 The name of each Element. More...
 
static const Index COMPONENT_BYTES = MROSP_HEADER_BYTES
 Total number of bytes in the Data_Block. More...
 
static const Index OFFSETS []
 Data_Block data storage address offset for each Element. More...
 
static const u_int_8 PROTOCOL_ID = 0xFF
 The expected Protocol_ID Element value. More...
 
static const u_int_8 TRANSACTION_TYPE_BIT_MASK = 0x1F
 Transaction Element: transaction type bit fields. More...
 
static const char * Transaction_Type_Names []
 Names of the known transaction type values of the Transaction Element. More...
 
static const unsigned int Transaction_Types = (sizeof (Transaction_Type_Names) / sizeof (char*))
 Total number of known transaction type values of the Transaction Element. More...
 
static const u_int_8 TRANSACTION_SEGMENTATION_BIT_MASK = 0x60
 Transaction Element: segmentation bit fields. More...
 
static const char * Transaction_Segmentation_Names []
 Names of the known segmentation values of the Transaction Element. More...
 
static const unsigned int Transaction_Segmentations = (sizeof (Transaction_Segmentation_Names) / sizeof (char*))
 Total number of known segmentation values of the Transaction Element. More...
 
static const u_int_8 TRANSACTION_COMPRESSED_BIT_MASK = 0x80
 Transaction Element: Compressed data flag bit. More...
 
static const u_int_32 SYNC = 0xFED4AFEE
 Expected Sync Element value. More...
 
- Static Public Attributes inherited from Data_Component
static const char *const ID
 Class identification name with source code version and date. More...
 
static const int DECIMAL = 0
 Format specifier. More...
 
static const int HEX = -1
 
static const int BOOLEAN = -2
 
static const char PATHNAME_DELIMITER = FILESYSTEM_PATHNAME_DELIMITER
 Host filesystem pathname delimiter. More...
 
static const int UTC_SECONDS_PRECISION = SECONDS_PRECISION
 UTC seconds precision (digits after the decimal point). More...
 
static const char SUBSECONDS_DELIMITER = ':'
 Delimits subseconds from seconds in clock count representations. More...
 
static const char *const SPICE_METAKERNEL_VARIABLE
 The name of the environment variable for the SPICE metakernel pathname. More...
 
static const char *const DEFAULT_SPICE_METAKERNEL
 The default SPICE metakernal pathname. More...
 
static const int MRO_CLOCK_ID = MRO_CLOCK_NAIF_ID
 The ID used by NAIF for specifying the MRO clock to CSPICE routines. More...
 
static const char *const INVALID_UTC_TIME = DEFAULT_INVALID_UTC_TIME
 
- Static Public Attributes inherited from Instrument
static const char *const ID
 
static const unsigned int CCDS
 
static const unsigned int CCD_UNKNOWN
 
static const char *const CCD_NAMES []
 
static const char *const CCD_FILTER_NAMES []
 
static const unsigned int CCD_BY_CPMM []
 
static const unsigned int CPMM_BY_CCD []
 
static const char *const WAVELENGTH_UNITS
 
static const unsigned int CCD_CENTER_WAVELENGTHS []
 
static const unsigned int CCD_BANDWIDTHS []
 
static const double CCD_FOCAL_PLANE_X_OFFSETS_MM []
 
static const double CCD_FOCAL_PLANE_Y_OFFSETS_MM []
 
static const double CCD_PIXEL_SIZE_MM
 
static const unsigned int CCD_CHANNELS
 
static const unsigned int CCD_CHANNEL_UNKNOWN
 
static const unsigned int CCD_IMAGE_SENSORS
 
static const unsigned int MAX_BYTES_PER_PIXEL
 
static const unsigned int MAX_PIXEL_VALUES []
 
static const unsigned int MAX_IMAGE_LINES
 
static const unsigned int TOTAL_TDI_STAGES
 
static const unsigned int TDI_STAGES []
 
static const unsigned int TOTAL_BINNING_FACTORS
 
static const unsigned int BINNING_FACTORS []
 
static const unsigned int CCD_BINNED_PIXELS []
 
static const unsigned int STORED_LUTS
 
static const unsigned int STIMULATOR_LEDS
 
static const char *const STIMULATOR_LED_NAMES []
 
static const double EXPOSURE_SETUP_MICROS
 
static const unsigned int DELTA_LINE_TIME_MAX
 
static const double DELTA_LINE_TIME_TICK_NANOS
 
static const double LINE_TIME_PRE_OFFSET
 
static const unsigned int TRIM_ADDITION_LINES
 
static const unsigned int REVERSE_READOUT_LINES
 
static const unsigned int MASKED_LINES
 
static const unsigned int DLL_LOCKED
 
static const unsigned int DLL_NOT_LOCKED
 
static const unsigned int SPACECRAFT_EPOCH
 
static const double MRO_CLOCK_SUBTICK_MICROS
 
static const double HIRISE_CLOCK_SUBTICK_MICROS
 
static const int SPACECRAFT_NAIF_ID
 
static const unsigned int SSR_BYTE_BOUNDARY
 
static const int UNKNOWN_NUMBER
 
static const int NOT_APPLICABLE_NUMBER
 
static const char *const UNKNOWN_STRING
 
static const char *const NOT_APPLICABLE_STRING
 
- Static Public Attributes inherited from Data_Block
static const char *const ID
 
static const Index NO_INDEX
 

Additional Inherited Members

- Static Public Member Functions inherited from Instrument
static unsigned int calibration_lines_minimum (unsigned int TDI, unsigned int binning)
 
static int focal_plane_x_offset (unsigned int CPMM, unsigned int binning=1)
 
- Static Public Member Functions inherited from Data_Block
static Data_Order native_order ()
 
static Value_Listsizes_to_offsets (Value_List &sizes)
 
static Indexsizes_to_offsets (Index *sizes, Index total_elements=NO_INDEX)
 
static Value_Listoffsets_to_sizes (Value_List &offsets)
 
static Indexoffsets_to_sizes (Index *offsets, Index total_elements=NO_INDEX)
 
- Public Attributes inherited from Data_Block
 MSB
 
 LSB
 
 ELEMENT_INDEX
 
 INDEX_COUNT
 
 ELEMENT_OFFSET
 
 OFFSET_COUNT
 
Copier Get
 
Copier Put
 
- Protected Member Functions inherited from Data_Block
void limits_checker (const Index element, const Index index, bool getter, bool array) const
 
- Static Protected Member Functions inherited from Data_Block
static void get_forwards (unsigned char *host, int host_amount, const unsigned char *data, int data_amount)
 
static void get_backwards (unsigned char *host, int host_amount, const unsigned char *data, int data_amount)
 
static void put_forwards (unsigned char *data, int data_amount, const unsigned char *host, int host_amount)
 
static void put_backwards (unsigned char *data, int data_amount, const unsigned char *host, int host_amount)
 

Detailed Description

An MROSP_Header contains information used by the HiRISE instrument to identify a stored data block to the MRO spacecraft for downlink to Earth.

This Data_Component is the zero-th data block in the observation data stream. It is stripped from the observation data stream by ground processing before delivery to the HiROC facility. It is likely to be present in sample images from the instrument manufacturer, but will not be present in any production images.

Header data block layout:

    Offset  Size  Description
    ------  ----  -----------
         0     1  Protocol ID (0xFF)
         1     1  Transaction -
                    Bits   Description
                    -----  -----------
                    0 - 4  Transaction type
                             1 - Science data
                             2 - Engineering data
                    5 - 6  Segmentation
                             0 - None
                             1 - Start
                             2 - Middle
                             3 - End
                        7  Compressed data flag

         2     2  Transaction ID from EXPOSE_TIME command
         4     4  Observation length including all headers and data (bytes)
         8     4  Sync pattern (0xFED4AFEE)
        12     2  (padding)
        14     2  Checksum
        16     4  (padding)

N.B.: Data_Block values are MSB ordered.

Author
Bradford Castalia, UA/PIRL, 12/03 1.24

Member Enumeration Documentation

◆ Elements

enum Elements

An Element refers to a data containing constituent of a component.

Each named Element is an Index into various data sets that define the attributes of a component; including their NAMES, data storage address OFFSETS, and number of array element values. It is the key Index argument of the data access methods.

See also
Data_Block
Enumerator
Protocol_ID 
Transaction 
Transaction_ID 
Data_Amount 
Sync 
Pad_0 
Checksum 
Pad_1 
Total_Elements 

◆ Transaction_Type

Known transaction type values for the Transaction Element.

Enumerator
SCIENCE 
ENGINEERING 

◆ Transaction_Segmentation

Known segmentation values for the Transaction Element.

Enumerator
NONE 
START 
MIDDLE 
END 

Constructor & Destructor Documentation

◆ MROSP_Header() [1/3]

Constructs an empty MROSP_Header.

The base Data_Component is initialized with the NAMES, COMPONENT_BYTES and OFFSETS that define an MROSP_Header component structure.

◆ MROSP_Header() [2/3]

MROSP_Header ( std::istream &  stream)
explicit

Constructs an MROSP_Header loaded from a data stream.

The base Data_Component is initialized with the NAMES, COMPONENT_BYTES and OFFSETS that define an MROSP_Header component structure. The stream is then read for COMPONENT_BYTES to fill the data block. Therefore, the stream must be positioned at the beginning of the MROSP_Header data.

Parameters
streamThe istream from which to read the component data.

References Data_Block::input().

◆ MROSP_Header() [3/3]

MROSP_Header ( const MROSP_Header component,
bool  data_duplicate = true 
)

Copy constructor.

Parameters
componentThe MROSP_Header to be copied.
data_duplicatetrue if the data content of the copied component is to be duplicated in the copy; false if the data content is to be shared.
See also
Data_Component(const Data_Component&, bool)

Member Function Documentation

◆ operator=()

MROSP_Header & operator= ( const MROSP_Header component)

Assigns another MROSP_Header to this one.

Parameters
componentThe MROSP_Header to be assigned.
See also
Data_Component::operator=(const Data_Component&)

References Data_Component::operator=().

◆ id()

string id ( ) const
virtual

Provides the class ID on a line followed by the base Data_Component::id.

Returns
The multi-line identification string.
See also
Data_Component::id()

Reimplemented from Data_Component.

References Data_Component::id(), and MROSP_Header::ID.

◆ name()

const char * name ( ) const
virtual

Gets the NAME of this class.

Returns
A pointer to the constant class name C-string.
See also
Data_Component::name()

Implements Data_Component.

References MROSP_Header::NAME.

◆ protocol_ID() [1/2]

u_int_8 protocol_ID ( ) const

Gets the Protocol_ID Element value.

Returns
The Element value.

References MROSP_Header::ID, and MROSP_Header::Protocol_ID.

Referenced by MROSP_Header::PVL().

◆ protocol_ID() [2/2]

MROSP_Header & protocol_ID ( u_int_8  ID)

Sets the Protocol_ID Element value.

Parameters
IDThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::ID, and MROSP_Header::Protocol_ID.

◆ transaction() [1/2]

u_int_8 transaction ( ) const

◆ transaction() [2/2]

MROSP_Header & transaction ( u_int_8  value)

Sets the Transaction Element value.

Parameters
valueThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::Transaction.

◆ transaction_type() [1/2]

int transaction_type ( ) const

Gets the transaction type value from the Transaction Element.

The value is least significant bit aligned: the lsb of the bit field is the lsb of the returned value.

Returns
The value from the bit field.

References MROSP_Header::transaction(), and MROSP_Header::TRANSACTION_TYPE_BIT_MASK.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ transaction_type() [2/2]

MROSP_Header & transaction_type ( Transaction_Type  type)

Sets the transaction type value in the Transaction Element.

The value is least significant bit aligned: the lsb of the bit field is the lsb of the returned value.

Parameters
typeThe Transaction_Type value to put in the bit field.
Returns
This MROSP_Header.

References MROSP_Header::Transaction, MROSP_Header::transaction(), and MROSP_Header::TRANSACTION_TYPE_BIT_MASK.

◆ transaction_segmentation() [1/2]

int transaction_segmentation ( ) const

Gets the segmentation value from the Transaction Element.

The value is least significant bit aligned: the lsb of the bit field is the lsb of the returned value.

Returns
The value from the bit field.

References MROSP_Header::transaction(), and MROSP_Header::TRANSACTION_SEGMENTATION_BIT_MASK.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ transaction_segmentation() [2/2]

MROSP_Header & transaction_segmentation ( Transaction_Segmentation  segmentation)

Sets the segmentation value in the Transaction Element.

The value is least significant bit aligned: the lsb of the bit field is the lsb of the returned value.

Parameters
segmentationThe Transaction_Segmentation value to put in the bit field.
Returns
This MROSP_Header.

References MROSP_Header::Transaction, MROSP_Header::transaction(), and MROSP_Header::TRANSACTION_SEGMENTATION_BIT_MASK.

◆ transaction_compressed() [1/2]

bool transaction_compressed ( ) const

Tests if the compression flag is set in the Transaction Element.

Returns
true if the bit flag is set; false otherwise.

References MROSP_Header::transaction(), and MROSP_Header::TRANSACTION_COMPRESSED_BIT_MASK.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ transaction_compressed() [2/2]

MROSP_Header & transaction_compressed ( bool  compressed)

Sets or resets the compression flag in the Transaction Element.

Parameters
compressedtrue if the bit flag is to be set; false otherwise.
Returns
This MROSP_Header.

References MROSP_Header::Transaction, MROSP_Header::transaction(), and MROSP_Header::TRANSACTION_COMPRESSED_BIT_MASK.

◆ transaction_ID() [1/2]

u_int_16 transaction_ID ( ) const

Gets the Transaction_ID Element value.

Returns
The Element value.

References MROSP_Header::ID, and MROSP_Header::Transaction_ID.

Referenced by MROSP_Header::PVL().

◆ transaction_ID() [2/2]

MROSP_Header & transaction_ID ( u_int_16  ID)

Sets the Transaction_ID Element value.

Parameters
IDThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::ID, and MROSP_Header::Transaction_ID.

◆ data_amount() [1/2]

u_int_32 data_amount ( ) const

Gets the Data_Amount Element value.

Returns
The Element value.

References MROSP_Header::Data_Amount.

Referenced by MROSP_Header::PVL().

◆ data_amount() [2/2]

MROSP_Header & data_amount ( u_int_32  amount)

Sets the Data_Amount Element value.

Parameters
amountThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::Data_Amount.

◆ sync() [1/2]

u_int_32 sync ( ) const

Gets the Sync Element value.

Returns
The Element value.

References MROSP_Header::Sync.

Referenced by MROSP_Header::PVL().

◆ sync() [2/2]

MROSP_Header & sync ( u_int_32  sync_pattern)

Sets the Sync Element value.

Parameters
sync_patternThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::Sync.

◆ checksum() [1/2]

u_int_16 checksum ( ) const

Gets the Checksum Element value.

Returns
The Element value.

References MROSP_Header::Checksum.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ checksum() [2/2]

MROSP_Header & checksum ( u_int_16  value)

Sets the Checksum Element value.

Parameters
valueThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::Checksum.

◆ pad_0() [1/2]

u_int_16 pad_0 ( ) const

Gets the Pad_0 Element value.

Returns
The Element value.

References MROSP_Header::Pad_0.

◆ pad_0() [2/2]

MROSP_Header & pad_0 ( u_int_16  value)

Sets the Pad_0 Element value.

Parameters
valueThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::Pad_0.

◆ pad_1() [1/2]

u_int_32 pad_1 ( ) const

Gets the Pad_1 Element value.

Returns
The Element value.

References MROSP_Header::Pad_1.

◆ pad_1() [2/2]

MROSP_Header & pad_1 ( u_int_32  value)

Sets the Pad_1 Element value.

Parameters
valueThe Element value.
Returns
This MROSP_Header.

References MROSP_Header::Pad_1.

◆ print()

ostream & print ( std::ostream &  stream = std::cout,
bool  verbose = false 
) const
virtual

◆ PVL()

Aggregate * PVL ( ) const
virtual

◆ is_valid()

bool is_valid ( ) const
virtual

Tests if the component data is valid.

The Protocol_ID and Sync Element values must equal the expected PROTOCOL_ID and SYNC constants, and the internet_checksum should produce a zero value.

Returns
true if the component has valid data; false otherwise.
See also
Data_Component::internet_checksum() const

The checksum should also be tested:

! internet_checksum ();

Implements Data_Component.

References Data_Component::get(), MROSP_Header::Protocol_ID, MROSP_Header::PROTOCOL_ID, MROSP_Header::Sync, and MROSP_Header::SYNC.

Referenced by Observation::components(), list_data(), list_selections(), and Observation::print().

Member Data Documentation

◆ ID

const char *const ID
static
Initial value:
=
"UA::HiRISE::MROSP_Header (1.32 2020/02/14 01:17:18)"

Class identification name with source code version and date.

Referenced by MROSP_Header::id(), main(), MROSP_Header::print(), MROSP_Header::protocol_ID(), and MROSP_Header::transaction_ID().

◆ NAME

const char *const NAME = "MROSP Header"
static

The component name.

Referenced by MROSP_Header::name(), MROSP_Header::print(), and MROSP_Header::PVL().

◆ NAMES

const char * NAMES
static
Initial value:
=
{
"Protocol_ID",
"Transaction",
"Transaction_ID",
"Data_Amount",
"Sync",
"Pad_0",
"Checksum",
"Pad_1",
NULL
}

The name of each Element.

Referenced by MROSP_Header::PVL().

◆ COMPONENT_BYTES

const Index COMPONENT_BYTES = MROSP_HEADER_BYTES
static

Total number of bytes in the Data_Block.

Referenced by Observation::components().

◆ OFFSETS

const Index OFFSETS
static
Initial value:
=
{
0,
1,
2,
4,
8,
12,
14,
16,
0
}
static const Index COMPONENT_BYTES
Total number of bytes in the Data_Block.
Definition: MROSP_Header.hh:127

Data_Block data storage address offset for each Element.

◆ PROTOCOL_ID

const u_int_8 PROTOCOL_ID = 0xFF
static

The expected Protocol_ID Element value.

Referenced by MROSP_Header::is_valid(), and MROSP_Header::print().

◆ TRANSACTION_TYPE_BIT_MASK

const u_int_8 TRANSACTION_TYPE_BIT_MASK = 0x1F
static

Transaction Element: transaction type bit fields.

Referenced by MROSP_Header::transaction_type().

◆ Transaction_Type_Names

const char * Transaction_Type_Names
static
Initial value:
=
{
"Science",
"Engineering"
}

Names of the known transaction type values of the Transaction Element.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ Transaction_Types

const unsigned int Transaction_Types = (sizeof (Transaction_Type_Names) / sizeof (char*))
static

Total number of known transaction type values of the Transaction Element.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ TRANSACTION_SEGMENTATION_BIT_MASK

const u_int_8 TRANSACTION_SEGMENTATION_BIT_MASK = 0x60
static

Transaction Element: segmentation bit fields.

Referenced by MROSP_Header::transaction_segmentation().

◆ Transaction_Segmentation_Names

const char * Transaction_Segmentation_Names
static
Initial value:
=
{
"None",
"Start",
"Middle",
"End"
}

Names of the known segmentation values of the Transaction Element.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ Transaction_Segmentations

const unsigned int Transaction_Segmentations = (sizeof (Transaction_Segmentation_Names) / sizeof (char*))
static

Total number of known segmentation values of the Transaction Element.

Referenced by MROSP_Header::print(), and MROSP_Header::PVL().

◆ TRANSACTION_COMPRESSED_BIT_MASK

const u_int_8 TRANSACTION_COMPRESSED_BIT_MASK = 0x80
static

Transaction Element: Compressed data flag bit.

Referenced by MROSP_Header::transaction_compressed().

◆ SYNC

const u_int_32 SYNC = 0xFED4AFEE
static

Expected Sync Element value.

Referenced by MROSP_Header::is_valid(), and MROSP_Header::print().


The documentation for this class was generated from the following files: