Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
src
l1bextract_meris
FlagsDSR.cpp
Go to the documentation of this file.
1
/*
2
* FlagsDSR.cpp
3
*
4
* Created on: Jan 7, 2013
5
* Author: dshea
6
*/
7
8
#include "
FlagsDSR.h
"
9
10
#include <stdio.h>
11
#include <stdlib.h>
12
#include <stdint.h>
13
14
FlagsDSR::FlagsDSR
(
int
size
) :
15
MeasurementDSR
(
size
) {
16
17
// 12 bytes for time
18
// 1 byte for quality indicator
19
// 1 bytes needed for each pixel quality
20
// 2 bytes needed for each pixel Detector Index
21
pixelSize
= 1;
22
numPixels
= (
size
-
arrayOffset
) / 3;
23
if
(
numPixels
* 3 +
arrayOffset
!=
size
) {
24
printf(
"Error %s:%s:%d size does not divide evenly into pixels\n"
,
25
__FILE__, __func__, __LINE__);
26
exit(1);
27
}
28
}
29
30
FlagsDSR::~FlagsDSR
() {
31
// TODO Auto-generated destructor stub
32
}
33
34
void
FlagsDSR::setRange
(
int
offset
,
int
count
,
int
val
) {
35
if
(
offset
< 0)
36
return
;
37
if
(
offset
+
count
>
numPixels
)
38
count
=
numPixels
-
offset
;
39
40
uint8_t* ptr = (uint8_t*) (
getBuffer
() +
arrayOffset
+
offset
);
41
int
i
;
42
for
(
i
= 0;
i
<
count
;
i
++) {
43
*ptr =
val
;
44
ptr++;
45
}
46
}
47
48
void
FlagsDSR::print
() {
49
MeasurementDSR::print
();
50
printf(
"\nFlagsDSR-----\n"
);
51
}
EnvsatDSR::numPixels
int numPixels
Definition:
EnvsatDSR.h:46
MeasurementDSR::print
virtual void print()
Definition:
MeasurementDSR.cpp:25
EnvsatDSR::getBuffer
virtual char * getBuffer()
Definition:
EnvsatDSR.h:24
FlagsDSR::FlagsDSR
FlagsDSR(int size)
Definition:
FlagsDSR.cpp:14
MeasurementDSR
Definition:
MeasurementDSR.h:13
FlagsDSR::~FlagsDSR
virtual ~FlagsDSR()
Definition:
FlagsDSR.cpp:30
FlagsDSR.h
EnvsatDSR::pixelSize
int pixelSize
Definition:
EnvsatDSR.h:44
FlagsDSR::print
virtual void print()
Definition:
FlagsDSR.cpp:48
mapgen_overlay.size
size
Definition:
mapgen_overlay.py:242
offset
l2prod offset
Definition:
HOWTO_Add_a_product.txt:70
EnvsatDSR::arrayOffset
int arrayOffset
Definition:
EnvsatDSR.h:42
i
int i
Definition:
decode_rs.h:71
val
msiBandIdx val
Definition:
l1c_msi.cpp:34
FlagsDSR::setRange
virtual void setRange(int offset, int count, int val)
Definition:
FlagsDSR.cpp:34
count
int count
Definition:
decode_rs.h:79