SkyTEM BMAG / Mbed 2 deprecated BMAGThrRev

Dependencies:   mbed WDT MODSERIAL BME280

Embed: (wiki syntax)

« Back to documentation index

BMAG Class Reference

BMAG Class Reference

A BMAG string handling class. More...

#include <BMAG.h>

Public Member Functions

 BMAG ()
 The default constructor. No arguments are needed for this class ever.
void parseBMAGString (string str)
 Parser method. Parsing the GSM-19T RS232 strings.
void setMagTimeStr (string magT)
 magTimeString string setting method.
void setMagNTStr (string magNT)
 magMeasurement string setting method.
void setMagSqStr (string magSq)
 magMeasurementQuality string setting method.
string getMagTimeStr (void)
 Mag time data field string getter method.
string getMagNTStr (void)
 Mag nanoTesla measurement data field string getter method.
string getMagSq (void)
 Mag measurement quality data field string getter method.
string getColumn (string str, char n)
 mag string column search method.

Detailed Description

A BMAG string handling class.

This class is used to handle / parse the default data logging string sent via rs232 to an external device from a GSM-19T magnetometer unit. Methods of this class parse the received rs232 string and convert them into individual data strings. (magTime, magnTMeasurement, and magMeasurementQuality)

Definition at line 17 of file BMAG.h.


Constructor & Destructor Documentation

BMAG (  )

The default constructor. No arguments are needed for this class ever.

Initializes private members needed when the object is operational.

Definition at line 7 of file BMAG.cpp.


Member Function Documentation

string getColumn ( string  str,
char  n 
)

mag string column search method.

Returns the desired data column of the original GSM-19T measurement string.

Parameters:
strIriginal GSM-19T measurement string
nDesired data column, 0 indexed. Eg. First column(Time): n = 0. Second column(mag measurement in nT): n = 1. Third column(Measurement Quality): n = 2.
Returns:
desired data column as string.

Definition at line 118 of file BMAG.cpp.

string getMagNTStr ( void   )

Mag nanoTesla measurement data field string getter method.

Returns Mag nanoTesla measurement

Returns:
A string with the Mag nanoTesla measurement

Definition at line 95 of file BMAG.cpp.

string getMagSq ( void   )

Mag measurement quality data field string getter method.

Returns Mag measurement quality

Returns:
Mag measurement quality data field string

Definition at line 106 of file BMAG.cpp.

string getMagTimeStr ( void   )

Mag time data field string getter method.

Returns the lastMagTime string

Returns:
A string with the mag time data field

Definition at line 85 of file BMAG.cpp.

void parseBMAGString ( string  str )

Parser method. Parsing the GSM-19T RS232 strings.

Parses the RS232 string received from the GSM-19T and ensures splitting, and storage of the different data elements of the string.

Parameters:
strThe complete rs232 string from GSM-19T.

Definition at line 22 of file BMAG.cpp.

void setMagNTStr ( string  magNT )

magMeasurement string setting method.

sets the lastMagNt string to the received magNT argument string value

Parameters:
magNTMag nanoTesla data field as a string

Definition at line 64 of file BMAG.cpp.

void setMagSqStr ( string  magSq )

magMeasurementQuality string setting method.

sets the lastMagSq string to the received magSq argument string value

Parameters:
magSqMag measurement quality data field as a string

Definition at line 74 of file BMAG.cpp.

void setMagTimeStr ( string  magT )

magTimeString string setting method.

sets the lastMagTime string to the received magT argument string value

Parameters:
magTMag time data field as a string

Definition at line 53 of file BMAG.cpp.