nidas  v1.2-1520
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ARLIngest Class Reference
Inheritance diagram for ARLIngest:
Inheritance graph
[legend]

Public Member Functions

 ARLIngest ()
 
int parseRunstring (int argc, char **argv) throw ()
 
int run () throw ()
 
int usage (const char *argv0)
 usage emits a generic usage message to std::cout More...
 
void sendHeader (dsm_time_t thead, SampleOutput *out) throw (n_u::IOException)
 sendHeader does something I still dont understand More...
 
void printHeader ()
 printHeader dumps out header information (for debugging) More...
 

Static Public Member Functions

static int main (int argc, char **argv) throw ()
 main is the entry point for the ARLIngest class. More...
 
static void setDefaults (SampleInputHeader &header)
 
static void sendDefaultHeader (SampleOutput *output) throw (nidas::util::IOException)
 

Private Member Functions

bool arl_ingest_one (SampleOutputStream &, string) throw ()
 arl_ingest_one ingests a single file by the passed filename and writes the re-encoded data into the passed SampleOutputStream More...
 
void writeLine (SampleOutputStream &, string &, n_u::UTime)
 writeLine writes a single sample line to the passed output stream applying the needed offset UTime More...
 
void prepareHeaderIds (string xmlfilename, string dsmName, string height) throw (n_u::Exception)
 prepareHeaderIds parses the xml files pointed to by xmlfilename and using the passed dsm name and height, modifies dsmid and spsid to the proper values. More...
 

Private Attributes

list< string > inputFileNames
 
string outputFileName
 
int outputFileLength
 
int dsmid
 
int spsid
 
double leapSeconds
 
SampleInputHeader header
 
NidasApp _app
 

Constructor & Destructor Documentation

ARLIngest::ARLIngest ( )
inline

Member Function Documentation

bool ARLIngest::arl_ingest_one ( SampleOutputStream sout,
string  filename 
)
throw (
)
private

arl_ingest_one ingests a single file by the passed filename and writes the re-encoded data into the passed SampleOutputStream

References nidas::util::UTime::parse(), and nidas::util::UTime::toDoubleSecs().

int ARLIngest::main ( int  argc,
char **  argv 
)
throw (
)
static

main is the entry point for the ARLIngest class.

argc and argv are taken from the normal places.

References parseRunstring(), run(), and nidas::core::NidasApp::setupSignals().

Referenced by main().

int ARLIngest::parseRunstring ( int  argc,
char **  argv 
)
throw (
)
void ARLIngest::prepareHeaderIds ( string  xmlfilename,
string  dsmName,
string  height 
)
throw (n_u::Exception
)
private

prepareHeaderIds parses the xml files pointed to by xmlfilename and using the passed dsm name and height, modifies dsmid and spsid to the proper values.

It throws exceptions on file IO errors, or when no configuration match is found. Additionally, it loads proper values into the stored header which is attached to samples when sendHeader is called

References nidas::util::Process::expandEnvVars(), nidas::core::Version::getArchiveVersion(), nidas::core::DSMSensor::getHeightString(), nidas::core::DSMConfig::getId(), nidas::core::Project::getInstance(), nidas::core::DSMConfig::getName(), nidas::core::DSMSensor::getSensorId(), nidas::core::DSMConfig::getSensorIterator(), nidas::core::Version::getSoftwareVersion(), nidas::core::DSMConfigIterator::hasNext(), nidas::core::SensorIterator::hasNext(), nidas::core::DSMConfigIterator::next(), nidas::core::SensorIterator::next(), and nidas::core::parseXMLConfigFile().

void ARLIngest::printHeader ( )

printHeader dumps out header information (for debugging)

int ARLIngest::run ( )
throw (
)
void HeaderSource::sendDefaultHeader ( SampleOutput output)
throw (nidas::util::IOException
)
staticinherited
void ARLIngest::sendHeader ( dsm_time_t  thead,
SampleOutput out 
)
throw (n_u::IOException
)
virtual

sendHeader does something I still dont understand

Implements nidas::core::HeaderSource.

void HeaderSource::setDefaults ( SampleInputHeader header)
staticinherited
int ARLIngest::usage ( const char *  argv0)

usage emits a generic usage message to std::cout

void ARLIngest::writeLine ( SampleOutputStream sout,
string &  line,
n_u::UTime  time 
)
private

Member Data Documentation

NidasApp ARLIngest::_app
private
int ARLIngest::dsmid
private
SampleInputHeader ARLIngest::header
private
list<string> ARLIngest::inputFileNames
private
double ARLIngest::leapSeconds
private
int ARLIngest::outputFileLength
private
string ARLIngest::outputFileName
private
int ARLIngest::spsid
private

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