Bmag incl gps rettelse
Dependencies: mbed WDT MODSERIAL BME280
Diff: SPS/SPS.cpp
- Revision:
- 20:73fa202c73db
- Parent:
- 19:5d25cffef662
- Child:
- 21:325cb82f1838
--- a/SPS/SPS.cpp Thu Apr 20 13:10:28 2017 +0000 +++ b/SPS/SPS.cpp Wed May 10 14:33:20 2017 +0000 @@ -239,8 +239,8 @@ //! update_crc_16, updates crc tab. /*! - \param crc - \param c + \param crc: the crc currently getting calculated + \param c: next character to be part of crc \return returns crc value */ unsigned short SPS::update_crc_16(unsigned short crc, char c) @@ -259,28 +259,45 @@ }; -//Gets / returns current sps data string + +//! getCurrentString, returns the current sps data string +/*! + \return returns current sps data string +*/ string SPS::getCurrentString(void){ return this->currentString; }; -//Get error status +//! getErrStatus, returns the current error status flag +/*! + \return returns the current error status flag (bool) +*/ bool SPS::getErrStatus(void){ return this->errStatus; }; -//Set err status +//! setErrStatus, sets error status flag +/*! + \param status: boolean value assigned to errorStatus +*/ void SPS::setErrStatus(bool status){ this->errStatus = status; }; -//get headerstring +//! getHeaderString, getter method, returning header string for *.sps file +/*! + \return returns the header string for the *.sps file +*/ string SPS::getHeaderString(void){ return this->headerString; }; //add data to current string +//! addToCurrentString, appends string of data to the sps string currently being manipulated. +/*! + \param data: string containing data +*/ void SPS::addToCurrentString(string data){ int currentStartIndex = strlen(currentString.c_str()); char dataStrLen = 0; @@ -300,12 +317,19 @@ } } +//! addToCurrentString, appends char to the sps string currently being manipulated. +/*! + \param data: data character +*/ void SPS::addToCurrentString(char data){ int currentStartIndex = strlen(currentString.c_str()); currentString[currentStartIndex] = data; }; -//add data to current Errstring +//! addToCurrentErrString, appends string to the sps err_string currently being manipulated. +/*! + \param data: data string +*/ void SPS::addToCurrentErrString(string data){ int currentStartIndex = strlen(currentErrString.c_str()); char dataStrLen = 0; @@ -316,13 +340,21 @@ } }; + +//! addToCurrentErrString, appends a character to the sps err_string currently being manipulated. +/*! + \param data: data char +*/ void SPS::addToCurrentErrString(char data){ int currentStartIndex = strlen(currentErrString.c_str()); currentErrString[currentStartIndex] = data; }; - +//! generateSpsFilename, generates a sps file name, including file postfix, using the current date as input. +/*! + \param formattedDate: Date string using a formatted date witht he format: "YYYY/MM/DD" +*/ void SPS::generateSpsFilename(string formattedDate){ fileNameString.resize(25); @@ -347,14 +379,20 @@ }; - +//! getSpsFileName, getter method, returning a *.sps filename based on the formatted date generated using generateSpsFilename(string formattedDate) method. +/*! + \return fileNameString returns file name including postfix. +*/ string SPS::getSpsFileName(void){ return this->fileNameString; }; -//Gets / returns current sps err string +//! getCurrentErrString, getter method returning current sps error string +/*! + \return currentErrString: returns the current sps error string. +*/ string SPS::getCurrentErrString(void){ return this->currentErrString; }; \ No newline at end of file