frames.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DAT0_FRAME   0
#define DAT1_FRAME   1
#define TIME_FRAME   2
#define OFFSET_FRAME   3
#define INFO_FRAME   4
#define GPST_FRAME   5
#define MISC_FRAME   6
#define DAT2_FRAME   7
#define frame2i32_64(frame, offset)   ( ((int64_t)(frame[offset])<<24)+((int64_t)(frame[offset+1])<<16)+((int64_t)(frame[offset+2])<<8)+(int64_t)(frame[offset+3]) )
 extract a 32bit (64) int from a frame starting at the offset' byte, cast
#define frame2i32(frame, offset)   ( (frame[offset]<<24)+(frame[offset+1]<<16)+(frame[offset+2]<<8)+frame[offset+3] )
 extract a 32bit int from a frame starting at the offset' byte, cast
#define frame2i24_64(frame, offset)   ( ((int64_t)(frame[offset])<<16)+((int64_t)(frame[offset+1])<<8)+(int64_t)(frame[offset+2]) )
 extract a 24bit (64) int from a frame starting at the offset' byte
#define frame2i24(frame, offset)   ( (frame[offset]<<16)+(frame[offset+1]<<8)+frame[offset+2] )
 extract a 24bit int from a frame starting at the offset' byte
#define frame2i16(frame, offset)   ( (frame[offset]<<8)+frame[offset+1] )
 extract a 16bit int from a frame starting at the offset' byte, cast

Functions

unsigned char ProcessMiscFrame (const unsigned char *frame)
 Identify and process the frame.
unsigned char ProcessInfoFrame (const unsigned char *frame)
 Identify and process the frame.
int64_t ProcessDataFrame (const unsigned char *frame)
 Identify and process the frame.
unsigned char ProcessTimeFrame (const unsigned char *frame)
 Identify and process the frame Both GPS and TIME frames are processed here.
unsigned char ProcessOffsetFrame (const unsigned char *frame)
 Identify and process the frame.


Define Documentation

#define DAT0_FRAME   0

Definition at line 23 of file frames.h.

Referenced by ProcessDataFrame().

#define DAT1_FRAME   1

Definition at line 24 of file frames.h.

Referenced by ProcessDataFrame().

#define DAT2_FRAME   7

Definition at line 30 of file frames.h.

Referenced by ProcessDataFrame().

#define frame2i16 ( frame,
offset   )     ( (frame[offset]<<8)+frame[offset+1] )

extract a 16bit int from a frame starting at the offset' byte, cast

Parameters:
frame the frame to read
offset the offset in the frame
Returns:
the extracted value

Definition at line 70 of file frames.h.

Referenced by ProcessInfoFrame(), and ProcessMiscFrame().

#define frame2i24 ( frame,
offset   )     ( (frame[offset]<<16)+(frame[offset+1]<<8)+frame[offset+2] )

extract a 24bit int from a frame starting at the offset' byte

Parameters:
frame the frame to read
offset the offset in the frame
Returns:
the extracted value

Definition at line 55 of file frames.h.

Referenced by ProcessAux1Frame(), ProcessDataFrame(), ProcessInfoFrame(), ProcessMiscFrame(), ProcessOffsetFrame(), ProcessTimeFrame(), and UpdateIndex().

#define frame2i24_64 ( frame,
offset   )     ( ((int64_t)(frame[offset])<<16)+((int64_t)(frame[offset+1])<<8)+(int64_t)(frame[offset+2]) )

extract a 24bit (64) int from a frame starting at the offset' byte

Parameters:
frame the frame to read
offset the offset in the frame
Returns:
the extracted value

Definition at line 49 of file frames.h.

Referenced by ProcessTimeFrame().

#define frame2i32 ( frame,
offset   )     ( (frame[offset]<<24)+(frame[offset+1]<<16)+(frame[offset+2]<<8)+frame[offset+3] )

extract a 32bit int from a frame starting at the offset' byte, cast

Parameters:
frame the frame to read
offset the offset in the frame
Returns:
the extracted value

Definition at line 43 of file frames.h.

Referenced by ProcessInfoFrame(), ProcessMiscFrame(), and UpdateIndex().

#define frame2i32_64 ( frame,
offset   )     ( ((int64_t)(frame[offset])<<24)+((int64_t)(frame[offset+1])<<16)+((int64_t)(frame[offset+2])<<8)+(int64_t)(frame[offset+3]) )

extract a 32bit (64) int from a frame starting at the offset' byte, cast

Parameters:
frame the frame to read
offset the offset in the frame
Returns:
the extracted value

Definition at line 37 of file frames.h.

Referenced by ProcessInfoFrame(), ProcessTimeFrame(), and UpdateIndex().

#define GPST_FRAME   5

Definition at line 28 of file frames.h.

Referenced by AddTitFrame(), and ProcessTimeFrame().

#define INFO_FRAME   4

Definition at line 27 of file frames.h.

#define MISC_FRAME   6

Definition at line 29 of file frames.h.

#define OFFSET_FRAME   3

Definition at line 26 of file frames.h.

#define TIME_FRAME   2

Definition at line 25 of file frames.h.

Referenced by AddTitFrame(), and ProcessTimeFrame().


Function Documentation

int64_t ProcessDataFrame ( const unsigned char *  frame  ) 

Identify and process the frame.

Parameters:
frame the frame to be analysed and processed
Returns:
a bit mask representing the channels contained in the frame

Definition at line 694 of file data.c.

References HWConfigType::absOffset, auxiliaryMask, Titan2SRType::base, channelMask, currentFile, DAT0_FRAME, DAT1_FRAME, DAT2_FRAME, HWConfigType::data, Titan2SRType::div, extracting, HWConfigType::formatVersion, frame2i24, HWConfig, lastData, MAX_CHANNEL, MAX_SAMPLE, msf, Titan2SRType::npts, nTitan1, nTitan2, PrintDebug, PrintError, PrintWarning, ProcessAux1Frame(), HWConfigType::srExp, HWConfigType::srObs, StrFrame(), titan2File, and HWConfigType::trigger.

Here is the call graph for this function:

unsigned char ProcessInfoFrame ( const unsigned char *  frame  ) 

Identify and process the frame.

Parameters:
frame the frame to be analysed and processed
Returns:
0 if the frame was interprered or the frame number if the frame was not identified

Definition at line 157 of file info.c.

References info0_3_t::active, DigitizerType::adcDecimationLength, DigitizerType::adcDelay, DigitizerType::adcId, info20_t::ADCType, info20_t::auxPresent, HWConfigType::avgPos, info18_t::batteryVoltage, info0_3_t::ch, info20_t::channels, CheckSoftwareRelease(), info20_t::continuousGPS, info5_t::cycles, info18_t::detections, HWConfigType::digitizer, PositionType::elev, info5_t::endDuration, info5_t::endDurationMode, HWConfigType::fieldIdent, info19_t::flashBytes, info19_t::flashCycles, info20_t::flashSize, info19_t::flushRunning, info19_t::flushState, frame2i16, frame2i24, frame2i32, frame2i32_64, info5_t::gain, HWConfig, HWConfigType::info03, HWConfigType::info15, HWConfigType::info18, HWConfigType::info19, HWConfigType::info20, HWConfigType::info5, HWConfigType::infoFrame, info20_t::internalInfo1, PositionType::lat, PositionType::lon, info18_t::lostFlushLowBatt, info19_t::lostFlushMediumError, info0_3_t::lta, manualStationName, info18_t::mediaBytes, info19_t::mediumError, info20_t::mediumSize, MY_PI, info0_3_t::offset, DigitizerType::ok, info20_t::parallelLink, info5_t::postEvent, info15_t::PPM, info5_t::preEvent, info15_t::pulseLength, info15_t::pulseTest, info20_t::radioMode, info15_t::reboot, HWConfigType::rebootTime, info20_t::recordingMedium, info20_t::recordingMode, HWConfigType::resetTime, info20_t::samplingSet, HWConfigType::serialNumber, HWConfigType::softwareRealease, info0_3_t::srCode, info0_3_t::sta, info0_3_t::threshold, info15_t::time, info19_t::triggerInProcess, UpdateTitan1ADCInfo(), and Titan2TimeType::usecond.

Here is the call graph for this function:

unsigned char ProcessMiscFrame ( const unsigned char *  frame  ) 

unsigned char ProcessOffsetFrame ( const unsigned char *  frame  ) 

Identify and process the frame.

Parameters:
frame the frame to be analysed and processed
Returns:
0

Definition at line 43 of file offset.c.

References HWConfigType::absOffset, currentFile, doOffset, frame2i24, HWConfig, PrintDebug, PrintError, and HWConfigType::relOffset.

unsigned char ProcessTimeFrame ( const unsigned char *  frame  ) 

Identify and process the frame Both GPS and TIME frames are processed here.

The titan2 format sends GPST_FRAME, then TIME_FRAME with b20=1 and finally TIME_FRAME with b20=0.

Parameters:
frame the frame to be analysed and processed
Returns:
0 if the frame was interprered or the frame number if the frame was not identified

Definition at line 1353 of file time.c.

References Titan2SRType::base, beginWindow, CacheCallBack(), CachePrintCST(), ChangeStreamConfig(), CheckDiffConfig(), correctedTime, currentTime, EndSuperFrame(), endWindow, FlushDataFiles(), FlushNonDataFiles(), HWConfigType::formatVersion, frame2i24, frame2i24_64, frame2i32_64, GetApproximatedShift(), globalStationChange, gpsExtTime, gpsIntTime, GPST_FRAME, HWConfig, knownExtGps, knownSecond, knownTime, knownUSecond, MAX_CHANNEL, PrintDebug, PrintError, pulseTime, ResetTimes(), RoundTime(), SeekTime(), skipTime, HWConfigType::srExp, HWConfigType::srObs, TIME_FRAME, TimeFrameCallBack(), and Titan2TimeType::usecond.

Here is the call graph for this function:


Generated on Tue Jul 22 23:11:56 2008 for Titan2Reader by  doxygen 1.5.6