Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed WDT MODSERIAL BME280
SPS Class Reference
An *.SPS format handler class. More...
#include <SPS.h>
Public Member Functions | |
| SPS () | |
| SPS, class default constructor. | |
| void | UpdateCurrentString (string tag, string identifier_id, string group_id, string date, string time, string ZZZ, string encoding, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version, string barcode, string latitude, string longitude, bool gpsFixFlag, string batteryvoltage, string preassure, string temperature, string humidity, string altitude, string mag_time, string mag_nt, string mag_sq, Serial *dbg) |
| UpdateCurrentString, sps string creation method, taking data and info as parameters. | |
| void | UpdateHeaderString (string barcode, string identifier_id, string group_id, string ZZZ, string encoding, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version) |
| UpdateHeaderString, header / RMRK update method. | |
| void | UpdateCurrentErrString (string tag, string identifier_id, string group_id, string date, string time, string ZZZ, string encoding, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version, string latitude, string longitude, bool gpsFixFlag, string mag_time, string mag_nt, string mag_sq, Serial *dbg) |
| UpdateCurrentErrString, sps ERR string creation method, taking data and info as parameters. | |
| void | init_crc16_tab () |
| init_crc16_tab, creates a crc tab. | |
| unsigned short | update_crc_16 (unsigned short crc, char c) |
| update_crc_16, updates crc tab. | |
| string | getCurrentString (void) |
| getCurrentString, returns the current sps data string | |
| string | getCurrentErrString (void) |
| getCurrentErrString, getter method returning current sps error string | |
| string | getHeaderString (void) |
| getHeaderString, getter method, returning header string for *.sps file | |
| bool | getErrStatus (void) |
| getErrStatus, returns the current error status flag | |
| void | setErrStatus (bool status) |
| setErrStatus, sets error status flag | |
| void | addToCurrentString (string data) |
| addToCurrentString, appends string of data to the sps string currently being manipulated. | |
| void | addToCurrentString (char data) |
| addToCurrentString, appends char to the sps string currently being manipulated. | |
| void | addToCurrentErrString (string data) |
| addToCurrentErrString, appends string to the sps err_string currently being manipulated. | |
| void | addToCurrentErrString (char data) |
| addToCurrentErrString, appends a character to the sps err_string currently being manipulated. | |
| void | addToCurrentHeaderString (string data) |
| addToCurrentHeaderString, appends string to the current header string | |
| void | addToCurrentHeaderString (char data) |
| addToCurrentHeaderString, appends char to the current header string | |
| void | generateSpsFilename (string formattedDate, string barcode, string time) |
| generateSpsFilename, generates a sps file name, including file postfix, using the current date as input. | |
| string | getSpsFileName (void) |
| getSpsFileName, getter method, returning a *.sps filename based on the formatted date generated using generateSpsFilename(string formattedDate) method. | |
Detailed Description
An *.SPS format handler class.
This class is used to create and handle creation of *.sps strings for *.sps files.
Definition at line 19 of file SPS.h.
Constructor & Destructor Documentation
| SPS | ( | ) |
Member Function Documentation
| void addToCurrentErrString | ( | string | data ) |
| void addToCurrentErrString | ( | char | data ) |
| void addToCurrentHeaderString | ( | char | data ) |
| void addToCurrentHeaderString | ( | string | data ) |
| void addToCurrentString | ( | char | data ) |
| void addToCurrentString | ( | string | data ) |
| void generateSpsFilename | ( | string | formattedDate, |
| string | barcode, | ||
| string | time | ||
| ) |
generateSpsFilename, generates a sps file name, including file postfix, using the current date as input.
- Parameters:
-
formattedDate,: Date string using a formatted date with format: "YYYY/MM/DD" barcode,: Char array with barcode serial number in ASCII time,: String containing a timestamp formatted "HH:MM:SS.FFF"
| string getCurrentErrString | ( | void | ) |
| string getCurrentString | ( | void | ) |
| bool getErrStatus | ( | void | ) |
| string getHeaderString | ( | void | ) |
| string getSpsFileName | ( | void | ) |
| void init_crc16_tab | ( | ) |
| void setErrStatus | ( | bool | status ) |
| unsigned short update_crc_16 | ( | unsigned short | crc, |
| char | c | ||
| ) |
| void UpdateCurrentErrString | ( | string | tag, |
| string | identifier_id, | ||
| string | group_id, | ||
| string | date, | ||
| string | time, | ||
| string | ZZZ, | ||
| string | encoding, | ||
| string | source_id, | ||
| string | interpreter_id, | ||
| string | data_line_version, | ||
| string | source_firmware_version, | ||
| string | interpreter_firmware_version, | ||
| string | latitude, | ||
| string | longitude, | ||
| bool | gpsFixFlag, | ||
| string | mag_time, | ||
| string | mag_nt, | ||
| string | mag_sq, | ||
| Serial * | dbg | ||
| ) |
UpdateCurrentErrString, sps ERR string creation method, taking data and info as parameters.
Generates the current sps ERR string containing everything needed in a BMAG sps string including crc, brackets etc.
- Parameters:
-
tag,: string containing the tag for the sps logging unit eg. "BMAG" identifier_id,: string containing the identifier id of the unit. group_id,: string containing the group id of the unit. date,: string containing the date in the format "YYYY/MM/DD" time,: string containing the current time in format "HH:MM:SS.FFF" ZZZ,: string containing "ZZZ" :) encoding,: string containing encoding as described in the *.sps documentation source_id,: string containing the source id of the unit eg. "0000" interpreter_id,: string containing the interpreter id of the unit eg. "00" data_line_version,: string containing data line version as described in the *.sps documentation, eg. "01" source_firmware_version,: string containing the firmware version of the unit eg. "1.2" barcode,: string containing the barcode of the unit, eg. "12345" latitude,: string containing the latitude of the unit in decimal degrees. For further info read the *.sps documentation. longitude,: string containing the longitude of the unit in decimal degrees. For further info read the *.sps documentation. gpsFixFlag,: bool containing the gps fix status, 1 if gps fix is present, else 0. mag_time,: string containing the last timestamp received from GSM-19 device eg. "000048.0" mag_nt,: string containing the last mag measurement in nT eg. "036418.77" mag_sq,: string containing info about the measurement quality of the last mag measurement eg. "99"
| void UpdateCurrentString | ( | string | tag, |
| string | identifier_id, | ||
| string | group_id, | ||
| string | date, | ||
| string | time, | ||
| string | ZZZ, | ||
| string | encoding, | ||
| string | source_id, | ||
| string | interpreter_id, | ||
| string | data_line_version, | ||
| string | source_firmware_version, | ||
| string | interpreter_firmware_version, | ||
| string | barcode, | ||
| string | latitude, | ||
| string | longitude, | ||
| bool | gpsFixFlag, | ||
| string | batteryvoltage, | ||
| string | preassure, | ||
| string | temperature, | ||
| string | humidity, | ||
| string | altitude, | ||
| string | mag_time, | ||
| string | mag_nt, | ||
| string | mag_sq, | ||
| Serial * | dbg | ||
| ) |
UpdateCurrentString, sps string creation method, taking data and info as parameters.
Generates an sps string containing everything needed in a BMAG sps string including crc, brackets etc.
- Parameters:
-
tag,: string containing the tag for the sps logging unit eg. "BMAG" identifier_id,: string containing the identifier id of the unit. group_id,: string containing the group id of the unit. date,: string containing the date in the format "YYYY/MM/DD" time,: string containing the current time in format "HH:MM:SS.FFF" ZZZ,: string containing "ZZZ" :) encoding,: string containing encoding as described in the *.sps documentation source_id,: string containing the source id of the unit eg. "0000" interpreter_id,: string containing the interpreter id of the unit eg. "00" data_line_version,: string containing data line version as described in the *.sps documentation, eg. "01" source_firmware_version,: string containing the firmware version of the unit eg. "1.2" barcode,: string containing the barcode of the unit, eg. "12345" latitude,: string containing the latitude of the unit in decimal degrees. For further info read the *.sps documentation. longitude,: string containing the longitude of the unit in decimal degrees. For further info read the *.sps documentation. gpsFixFlag,: bool containing the gps fix status, 1 if gps fix is present, else 0. batteryvoltage,: string containing the battery voltage of the units battery pack, eg. "14.2" preassure,: string containing preassure measurement in hPa temperature,: string containing temperature measured in deg C humidity,: string containing air humidity percentage mag_time,: string containing the last timestamp received from GSM-19 device eg. "000048.0" mag_nt,: string containing the last mag measurement in nT eg. "036418.77" mag_sq,: string containing info about the measurement quality of the last mag measurement eg. "99"
| void UpdateHeaderString | ( | string | barcode, |
| string | identifier_id, | ||
| string | group_id, | ||
| string | ZZZ, | ||
| string | encoding, | ||
| string | source_id, | ||
| string | interpreter_id, | ||
| string | data_line_version, | ||
| string | source_firmware_version, | ||
| string | interpreter_firmware_version | ||
| ) |
UpdateHeaderString, header / RMRK update method.
Updates header / RMRK string
- Parameters:
-
identifier_id,: string containing the identifier id of the unit. group_id,: string containing the group id of the unit. ZZZ,: string containing "ZZZ" :) encoding,: string containing encoding as described in the *.sps documentation source_id,: string containing the source id of the unit eg. "0000" interpreter_id,: string containing the interpreter id of the unit eg. "00" data_line_version,: string containing data line version as described in the *.sps documentation, eg. "01" source_firmware_version,: string containing the firmware version of the unit eg. "1.2" barcode,: string containing the barcode of the unit, eg. "12345" interpreter_firmware_version,: string containing interpreter firmware version
Generated on Wed Jul 13 2022 08:04:14 by
1.7.2