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.
crosstalkTempCoffC Class Reference
Class that holds crosstalk temperature coefficient related registers and values. More...
#include <OPT3101DesignCoefficients.h>
Public Member Functions | |
crosstalkTempCoffC () | |
initializes the members to 0 | |
void | calculateCoff (crosstalkC *illumXtalk0, crosstalkC *illumXtalk1) |
calculates the crosstalk temp coff | |
void | report () |
reports members of the instance Print the members of the class instance on screen | |
void | storeToFile (char *fileName) |
saves crosstalk temp coff values to file This methods saves the crosstalk temp coff values to a non-volatile memory. Storage/Restoration to/from non-volatile memory is important for factory calibration | |
void | loadFromFile (char *fileName) |
load crosstalk temp coff values from file This methods loads the crosstalk temp coff values to a non-volatile memory. Storage/Restoration to/from non-volatile memory is important for factory calibration | |
Data Fields | |
double | coffI |
Coefficient for I Component with floating point precision.Units for this measurement is crosstalk OPT3101::crosstalkC::I (24 bit level) codes change per unit of temperature sensor codes (OPT3101::registers::tmain) per OPT3101::crosstalkC::magnitude() of crosstalk. | |
double | coffQ |
Coefficient for Q Component with floating point precision.Units for this measurement is crosstalk OPT3101::crosstalkC::Q (24 bit level) codes change per unit of temperature sensor codes (OPT3101::registers::tmain) per OPT3101::crosstalkC::magnitude() of crosstalk. | |
uint8_t | coffIReg |
Value of OPT3101::crosstalkTempCoffC::coffI represented as a 8 bit number to be written to illum crosstalk temp compensation registers. | |
uint8_t | coffQReg |
Value of OPT3101::crosstalkTempCoffC::coffQ represented as a 8 bit number to be written to illum crosstalk temp compensation registers. | |
uint8_t | commonScale |
Value of common scale for register coefficients achieved using different instances of OPT3101::crosstalkTempCoffC. Calculated by OPT3101::calibration::findCrosstalkTempRegisterValues during production calibration. Used while loading a set of TX and current configurations to the OPT3101 device during production calibration. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const crosstalkTempCoffC *data) |
Operator overload to store class contents to a file Casts all the class members for file storage. | |
std::istream & | operator>> (std::istream &is, crosstalkTempCoffC *data) |
Operator overload to load class contents to from a file Retrieves all the class members from a stored file. |
Detailed Description
Class that holds crosstalk temperature coefficient related registers and values.
This is a class container that can hold crosstalk temperature coefficients and related register values. OPT3101 device has different crosstalk phenomenon which needs to be calibrated and compensated
Refer to documentation for OPT3101::crosstalkC class documentation
Crosstalk varies with temperature which needs to be calibration and compensated to improve the system performance. Illum crosstalk temperature variation needs to be evaluated and a compensation coefficients have to be calculated. OPT3101 device has internal registers to correct and compensate for illum crosstalk temperature variation. This class acts as a temporary storage of crosstalk temp coefficients and related registers. Calculations have to be made on the crosstalk values, coefficients to transform them to register settings. Instances of OPT3101::crosstalkC taken at different temperate will be used to calculate these coefficients and registers.
Definition at line 59 of file OPT3101DesignCoefficients.h.
Constructor & Destructor Documentation
initializes the members to 0
- Returns:
- Nothing;
Algorithm of the method is as follows
* Initilizes all the members to 0
Definition at line 30 of file OPT3101DesignCoefficients.cpp.
Member Function Documentation
void calculateCoff | ( | OPT3101::crosstalkC * | illumXtalk0, |
OPT3101::crosstalkC * | illumXtalk1 | ||
) |
calculates the crosstalk temp coff
- Parameters:
-
[in] illumXtalk0; Pointer to illum crosstalk OPT3101::crosstalkC instance measured at a lower temperature [in] illumXtalk1; Pointer to illum crosstalk OPT3101::crosstalkC instance measured at a higher temperature
- Returns:
- Nothing;
Algorithm of the method is as follows
* Scales the 16bit crosstalk registers OPT3101::crosstalkC::I and OPT3101::crosstalkC::Q to 24 bit level using OPT3101::crosstalkC::xtalkScale
* Makes the data base circular to avoid errorneous high slope measurements
* Calculates the double precision OPT3101::crosstalkTempCoffC::coffI and OPT3101::crosstalkTempCoffC::coffQ by finding difference between 24 bit registers divided by delta OPT3101::crosstalkC::tmain divided by OPT3101::crosstalkC::magnitude()
* Warning: Makes the OPT3101::crosstalkTempCoffC::I and OPT3101::crosstalkTempCoffC::Q 0 if the OPT3101::crosstalkC::tmain are same for both the input arguments
Definition at line 40 of file OPT3101DesignCoefficients.cpp.
void loadFromFile | ( | char * | fileName ) |
load crosstalk temp coff values from file This methods loads the crosstalk temp coff values to a non-volatile memory. Storage/Restoration to/from non-volatile memory is important for factory calibration
- Parameters:
-
[in] fileName; Path and name of the file from where to load
- Returns:
- Nothing;
Algorithm of the method is as follows
* User needs to implement file load/restore based on host.
Definition at line 99 of file OPT3101DesignCoefficients.cpp.
void report | ( | ) |
reports members of the instance Print the members of the class instance on screen
- Returns:
- Nothing;
Algorithm of the method is as follows
* Prints all the members and values of members on screen.
* Prints all the members and values of members on screen.
Definition at line 70 of file OPT3101DesignCoefficients.cpp.
void storeToFile | ( | char * | fileName ) |
saves crosstalk temp coff values to file This methods saves the crosstalk temp coff values to a non-volatile memory. Storage/Restoration to/from non-volatile memory is important for factory calibration
- Parameters:
-
[in] fileName; Path and name of the file to store
- Returns:
- Nothing;
Algorithm of the method is as follows
* User needs to implement file storage based on host.
Definition at line 87 of file OPT3101DesignCoefficients.cpp.
Friends And Related Function Documentation
std::ostream& operator<< | ( | std::ostream & | os, |
const crosstalkTempCoffC * | data | ||
) | [friend] |
Operator overload to store class contents to a file Casts all the class members for file storage.
- Parameters:
-
[out] os; os is data stream to serialize data [in] data; data is pointer to the class to be serialized and stored
- Returns:
- std::ostream; Serialized std::ostream to be written to a file
std::istream& operator>> | ( | std::istream & | is, |
crosstalkTempCoffC * | data | ||
) | [friend] |
Operator overload to load class contents to from a file Retrieves all the class members from a stored file.
- Parameters:
-
[in] is; is input stream from where the data is loaded [out] data; data is pointer to the class to be restored
- Returns:
- std::istream; Serialized Input stream loaded from file
Field Documentation
double coffI |
Coefficient for I Component with floating point precision.Units for this measurement is crosstalk OPT3101::crosstalkC::I (24 bit level) codes change per unit of temperature sensor codes (OPT3101::registers::tmain) per OPT3101::crosstalkC::magnitude() of crosstalk.
Definition at line 61 of file OPT3101DesignCoefficients.h.
uint8_t coffIReg |
Value of OPT3101::crosstalkTempCoffC::coffI represented as a 8 bit number to be written to illum crosstalk temp compensation registers.
Definition at line 63 of file OPT3101DesignCoefficients.h.
double coffQ |
Coefficient for Q Component with floating point precision.Units for this measurement is crosstalk OPT3101::crosstalkC::Q (24 bit level) codes change per unit of temperature sensor codes (OPT3101::registers::tmain) per OPT3101::crosstalkC::magnitude() of crosstalk.
Definition at line 62 of file OPT3101DesignCoefficients.h.
uint8_t coffQReg |
Value of OPT3101::crosstalkTempCoffC::coffQ represented as a 8 bit number to be written to illum crosstalk temp compensation registers.
Definition at line 64 of file OPT3101DesignCoefficients.h.
uint8_t commonScale |
Value of common scale for register coefficients achieved using different instances of OPT3101::crosstalkTempCoffC. Calculated by OPT3101::calibration::findCrosstalkTempRegisterValues during production calibration. Used while loading a set of TX and current configurations to the OPT3101 device during production calibration.
Definition at line 65 of file OPT3101DesignCoefficients.h.
Generated on Sun Jul 17 2022 05:22:03 by
