OpenTAP 9.27
API Reference
Public Member Functions | Properties | List of all members
OpenTap.UnitAttribute Class Reference

Identifies that units should be assigned to a property. More...

Inheritance diagram for OpenTap.UnitAttribute:
OpenTap.IAnnotation OpenTap.IParameter OpenTap.IAttributedObject

Public Member Functions

 UnitAttribute (string Unit, bool UseEngineeringPrefix=false, string StringFormat="", bool UseRanges=true, double PreScaling=1.0)
 Constructor for UnitAttribute. More...
 

Properties

string Unit [get]
 The unit e.g "Hz".
 
bool UseEngineeringPrefix [get]
 Whether to use engineering prefix. E.g 1000000 Hz -> 1 MHz
 
double PreScaling [get]
 Pre scaling of values.
 
string StringFormat [get]
 The format argument to string.Format.
 
bool UseRanges [get]
 Whether to use ranges to show arrays of numbers. For example, show 1, 2, 3, 4 as 1 : 4.
 
- Properties inherited from OpenTap.IParameter
string Group [get]
 Optional name of the group of parameters to which this parameter belongs.

 
IConvertible Value [get]
 Value of this parameter.

 
- Properties inherited from OpenTap.IAttributedObject
string Name [get]
 Name of this object.

 
string ObjectType [get]
 String describing this object.

 

Detailed Description

Identifies that units should be assigned to a property.

Constructor & Destructor Documentation

◆ UnitAttribute()

OpenTap.UnitAttribute.UnitAttribute ( string  Unit,
bool  UseEngineeringPrefix = false,
string  StringFormat = "",
bool  UseRanges = true,
double  PreScaling = 1.0 
)
inline

Constructor for UnitAttribute.

Parameters
UnitThe unit e.g "Hz".
UseEngineeringPrefixWhether to use engineering prefix. E.g 1000000 Hz -> 1 MHz.
StringFormatThe format argument to string.Format.
UseRangesWhether to use ranges to show arrays of numbers. For example, show 1, 2, 3, 4 as 1 : 4.
PreScalingPre scaling of values.

OpenTAP 9.27 API built Wed Nov 27 2024 13:14:46