Prototypes | |
static int | readNumber (char temp[], const char **charPtrPtr) |
static int | readString (char temp[UNITDEFSC_TEMPSIZE], const char **charPtrPtr) |
char * | XLALUnitAsString (char *string, UINT4 length, const LALUnit *input) |
Returns the pointer to the input string , which is populated with the unit string if successful. More... | |
char * | XLALUnitToString (const LALUnit *input) |
Allocates and returns a new string, which is populated with the unit string. More... | |
LALUnit * | XLALParseUnitString (LALUnit *output, const char *string) |
Returns the pointer output upon return or a pointer to newly allocated memory if output was NULL ; on failure, XLALParseUnitString() returns NULL and sets xlalErrno to one of the following values: XLAL_ENOMEM if the routine was unable to allocate memory for the output or XLAL_EFAILED if the routine was unable to parse the unit string. More... | |
Go to the source code of this file.
Macros | |
#define | UNITDEFSC_TEMPSIZE 20 |
Variables | |
const CHAR | lalUnitName [LALNumUnits][LALUnitNameSize] |
To convert a units structure to a string repesentation, we need to define the names of the basic units. More... | |
const LALUnit | lalDimensionlessUnit = { 0, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
dimensionless units More... | |
Basic Units | |
const LALUnit | lalMeterUnit = { 0, { 1, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
meter [m] More... | |
const LALUnit | lalKiloGramUnit = { 0, { 0, 1, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
kilogram [kg] More... | |
const LALUnit | lalSecondUnit = { 0, { 0, 0, 1, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
second [s] More... | |
const LALUnit | lalAmpereUnit = { 0, { 0, 0, 0, 1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Ampere [A]. More... | |
const LALUnit | lalKelvinUnit = { 0, { 0, 0, 0, 0, 1, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Kelvin [K]. More... | |
const LALUnit | lalStrainUnit = { 0, { 0, 0, 0, 0, 0, 1, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Strain [1]. More... | |
const LALUnit | lalADCCountUnit = { 0, { 0, 0, 0, 0, 0, 0, 1}, { 0, 0, 0, 0, 0, 0, 0} } |
ADC count [count]. More... | |
Derived Mechanical Units | |
const LALUnit | lalHertzUnit = { 0, { 0, 0,-1, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Hertz [Hz]. More... | |
const LALUnit | lalNewtonUnit = { 0, { 1, 1,-2, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Newton [N]. More... | |
const LALUnit | lalPascalUnit = { 0, {-1, 1,-2, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Pascal [Pa]. More... | |
const LALUnit | lalJouleUnit = { 0, { 2, 1,-2, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Joule [J]. More... | |
const LALUnit | lalWattUnit = { 0, { 2, 1,-3, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Watt [W ]. More... | |
Derived Electromagnetic Units | |
const LALUnit | lalCoulombUnit = { 0, { 0, 0, 1, 1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Coulomb [C]. More... | |
const LALUnit | lalVoltUnit = { 0, { 2, 1,-3,-1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Volt [V]. More... | |
const LALUnit | lalOhmUnit = { 0, { 2, 1,-3,-2, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Ohm [ \(\Omega\)]. More... | |
const LALUnit | lalFaradUnit = { 0, {-2,-1, 4, 2, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Farad [F]. More... | |
const LALUnit | lalWeberUnit = { 0, { 2, 1,-2,-1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Weber [Wb]. More... | |
const LALUnit | lalHenryUnit = { 0, { 2, 1,-2,-2, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Henry [H]. More... | |
const LALUnit | lalTeslaUnit = { 0, { 0, 1,-2,-1, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Tesla [T]. More... | |
Powers of Ten | |
const LALUnit | lalYottaUnit = { 24, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Yotta [1e24]. More... | |
const LALUnit | lalZettaUnit = { 21, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Zetta [1e21]. More... | |
const LALUnit | lalExaUnit = { 18, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Exa [1e18]. More... | |
const LALUnit | lalPetaUnit = { 15, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Peta [1e15]. More... | |
const LALUnit | lalTeraUnit = { 12, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Tera [1e12]. More... | |
const LALUnit | lalGigaUnit = { 9, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Giga [1e9]. More... | |
const LALUnit | lalMegaUnit = { 6, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Mega [1e6]. More... | |
const LALUnit | lalKiloUnit = { 3, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Kilo [1e3]. More... | |
const LALUnit | lalHectoUnit = { 2, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Hecto [1e2]. More... | |
const LALUnit | lalDekaUnit = { 1, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Deka [1e1]. More... | |
const LALUnit | lalDeciUnit = { -1, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Deci [1e-1]. More... | |
const LALUnit | lalCentiUnit = { -2, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Centi [1e-2]. More... | |
const LALUnit | lalMilliUnit = { -3, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Milli [1e-3]. More... | |
const LALUnit | lalMicroUnit = { -6, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Micro [1e-6]. More... | |
const LALUnit | lalNanoUnit = { -9, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Nano [1e-9]. More... | |
const LALUnit | lalPicoUnit = {-12, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Pico [1e-12]. More... | |
const LALUnit | lalFemtoUnit = {-15, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Femto [1e-15]. More... | |
const LALUnit | lalAttoUnit = {-18, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Atto [1e-18]. More... | |
const LALUnit | lalZeptoUnit = {-21, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Zepto [1e-21]. More... | |
const LALUnit | lalYoctoUnit = {-24, { 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Yocto [1e-24]. More... | |
Convenient Scaled Units | |
const LALUnit | lalGramUnit = { -3, { 0, 1, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
Gram [1e-3]. More... | |
const LALUnit | lalAttoStrainUnit = {-18, { 0, 0, 0, 0, 0, 1, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
AttoStrain [1e-18]. More... | |
const LALUnit | lalPicoFaradUnit = {-12, {-2,-1, 2, 2, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0} } |
PicoFarad [1e-12 F]. More... | |
#define UNITDEFSC_TEMPSIZE 20 |
Definition at line 25 of file UnitDefs.c.