OpenTAP 9.34
API Reference
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.
 

Properties

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

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.34 API built Wed Jul 1 2026 09:21:15