OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
RadarSatRecordHeader.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
12 #ifndef RadarSatRecordHeader_h
13 #define RadarSatRecordHeader_h
14 
15 #include<iostream>
16 #include<cstring>
17 
18 namespace ossimplugins
19 {
25 {
26 public:
31 
36 
41 
49  friend std::ostream& operator<<(std::ostream& os, const RadarSatRecordHeader& data);
50 
55 
60  {
61  return _rec_seq;
62  };
63 
67  unsigned char get_rec_sub1()
68  {
69  return _rec_sub1;
70  };
71 
75  unsigned char get_rec_type()
76  {
77  return _rec_type;
78  };
79 
83  unsigned char get_rec_sub2()
84  {
85  return _rec_sub2;
86  };
87 
91  unsigned char get_rec_sub3()
92  {
93  return _rec_sub3;
94  };
95 
99  int get_length()
100  {
101  return _length;
102  };
103 protected:
104 
108  void SwitchEndian(int& value);
109 
113  int _rec_seq;
117  unsigned char _rec_sub1;
121  unsigned char _rec_type;
125  unsigned char _rec_sub2;
129  unsigned char _rec_sub3;
133  int _length;
134 private:
135 
136 
137 };
138 }
139 #endif
void SwitchEndian(int &value)
This function switches the LSB value and the MSB value of the parameter.
unsigned char get_rec_sub1()
First record sub-type code.
unsigned char _rec_sub3
Third record sub-type code.
friend std::istream & operator>>(std::istream &is, RadarSatRecordHeader &data)
This function reads a RecordHeader from a stream.
unsigned char _rec_sub1
First record sub-type code.
unsigned char get_rec_sub3()
Third record sub-type code.
unsigned char get_rec_sub2()
Second record sub-type code.
friend std::ostream & operator<<(std::ostream &os, const RadarSatRecordHeader &data)
This function writes the RecordHeader in a stream.
unsigned char _rec_sub2
Second record sub-type code.
unsigned char get_rec_type()
Record type code.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
int get_rec_seq()
Record sequence number.
int _length
Length of this record (in bytes)
This class is able to read a record header.
int _rec_seq
Record sequence number.
int get_length()
Length of this record (in bytes)
unsigned char _rec_type
Record type code.
RadarSatRecordHeader & operator=(const RadarSatRecordHeader &rhs)
Copy operator.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23