The ImageColumn class is a container for sample data retrieved from a single sonar ping. More...
Public Member Functions | |
ImageColumn (STFishFinder *pFF) | |
This is the first of two ImageColumn class constructors. More... | |
ImageColumn (STFishFinder *pFF, FF_Frequency_t frequency, FF_RangeSetting_t inputRange, uint16_t numInputSamples, uint16_t numDataBytes, uint8_t *pInputData, uint32_t sequenceId) | |
This is a secondary ImageColumn class constructor. More... | |
~ImageColumn () | |
This is the ImageColumn destructor. More... | |
ImageColumn (const ImageColumn &) | |
This is the ImageColumn copy constructor. More... | |
const ImageColumn & | operator= (const ImageColumn &) |
This is the ImageColumn assignment operator. More... | |
FF_Frequency_t | Frequency () const |
Provides the sonar frequency context when the ImageColumn sample data was collected. More... | |
uint32_t | SequenceId () const |
Provides the Sequence ID for the ImageColumn. More... | |
FF_Error_t | GetImageData (const FF_RangeSetting_t *pRangeSetting, uint16_t numSamples, uint8_t *pImageData, bool *pSimulated) const |
Fills a buffer provided by the caller with a single column of sample data. More... | |
The ImageColumn class is a container for sample data retrieved from a single sonar ping.
The sample data is stored within each ImageColumn instance privately in packed form. The sample data may be retrieved by calling GetImageData(), at which time it is unpacked and sample-rate converted to fit the dimensions and offset required by the viewing window.
Definition at line 43 of file STFF-ImageColumn.h.
STFF::ImageColumn::ImageColumn | ( | STFishFinder * | pFF | ) |
This is the first of two ImageColumn class constructors.
The ImageColumn object created with this constructor is empty, containing no image data.
[in] | pFF | pointer to the STFishFinder instance with which this ImageColumn object is associated |
STFF::ImageColumn::ImageColumn | ( | STFishFinder * | pFF, |
FF_Frequency_t | frequency, | ||
FF_RangeSetting_t | inputRange, | ||
uint16_t | numInputSamples, | ||
uint16_t | numDataBytes, | ||
uint8_t * | pInputData, | ||
uint32_t | sequenceId | ||
) |
This is a secondary ImageColumn class constructor.
The ImageColumn object created with this constructor is populated with the data provided in the argument list.
[in] | pFF | pointer to the STFishFinder instance with which this ImageColumn object is associated |
[in] | frequency | the frequency context of the sample data |
[in] | inputRange | the shallow and deep Range bounds that define the start and end of the sample data |
[in] | numInputSamples | the number of data samples recorded |
[in] | numDataBytes | the total number of contiguous bytes containing the sample data |
[in] | pInputData | pointer to the start of the data buffer containing the sample data to be copied into the new ImageColumn object being created |
[in] | sequenceId | a unique number that increments with each ImageColumn object created by the black box |
STFF::ImageColumn::~ImageColumn | ( | ) |
This is the ImageColumn destructor.
STFF::ImageColumn::ImageColumn | ( | const ImageColumn & | ) |
This is the ImageColumn copy constructor.
const | ImageColumn & reference to an existing ImageColumn object |
STFF::ImageColumn::Frequency | ( | ) | const |
Provides the sonar frequency context when the ImageColumn sample data was collected.
STFF::ImageColumn::GetImageData | ( | const FF_RangeSetting_t * | pRangeSetting, |
uint16_t | numSamples, | ||
uint8_t * | pImageData, | ||
bool * | pSimulated | ||
) | const |
Fills a buffer provided by the caller with a single column of sample data.
The data is sample rate converted (i.e. stretched or compressed) on the fly to fit into the specified buffer.
The produced image data is not packed (i.e. each uint8_t value in the buffer contains one sample). With a bit depth of 4 (i.e. 4 bits per sample), one of 16 colors can be represented by each sample in the buffer.
[in] | pRangeSetting | pointer to a FF_RangeSetting_t struct containing the shallow and deep range limits (and associated depth units) defining the depths of the first and last samples in the pImageData buffer. The rangeShallow and rangeDeep members must be provided in hundredths of the depth units specified in the units member. |
[in] | numSamples | the number of uint8_t samples to be copied into the buffer |
[out] | pImageData | pointer to the start of the output buffer. |
[out] | pSimulated | pointer to a location that will be written with the value true if the provided image data is a simulation for demonstration purposes; false otherwise |
FF_ERR_NO_ERROR | if the operation completed successfully |
FF_ERR_ARGUMENT_OUT_OF_RANGE | if any of the arguments, or any of the members of the pRangeSetting parameter, are outside the range of allowable values. |
FF_ERR_INVALID_FREQUENCY | the ImageColumn object contains no valid sample data |
ImageColumn & STFF::ImageColumn::operator= | ( | const ImageColumn & | ) |
This is the ImageColumn assignment operator.
const | ImageColumn & reference to a first existing ImageColumn object (right hand side of assignment) |
STFF::ImageColumn::SequenceId | ( | ) | const |
Provides the Sequence ID for the ImageColumn.
The Sequence ID starts at 0 and increments by 1 for each new ImageColumn transmitted by the black box. Separate sequences are used for ImageColumns having different frequencies.