Unity  0.8
Parser for unit strings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
unit_struct Struct Reference

A single parsed unit. More...

#include <unity.h>

Collaboration diagram for unit_struct:
Collaboration graph
[legend]

Data Fields

float power
 The power to which the unit is raised.
 
UnitTypes type
 Indicates which type of unit this is.
 
struct unit_structnext
 A pointer to the next unit in the sequence.
 
SimpleUnit u
 A contained simple unit.
 
FunctionApplication f
 A contained function-of unit.
 

Detailed Description

A single parsed unit.

This can be either a simple unit (corresponding to, for example, 'MHz') or a function of a sequence of units (corresponding to, for example, 'log(V^2/mHz)').

Field Documentation

float power

The power to which the unit is raised.

The specification 'mm^(-2)' will result in a power of '-2'.

UnitTypes type

Indicates which type of unit this is.

Depending on the value of this, one or other of the structs 'u' or 'f' will be valid (but not both).


The documentation for this struct was generated from the following file: