InUnitsOf
ptolemy.actor.lib.conversions.InUnitsOf

An actor that converts input tokens to specified units by dividing the input by the value of the units parameter. This actor is designed to be used with a unit system, which must be included in the model (note that some Ptolemy II applications do not include unit systems).

The units are specified by the units parameter, which contains a DoubleToken with units. The input tokens and the token in the unit parameter must have the same unit category. Otherwise, an exception will be thrown in the fire() method. Unit categories include the ones defined in the MoML file, such as length, time, mass, and the composite ones formed through the base categories, such as length/time (speed), and length * length (area). The output token is a DoubleToken without units.

Author(s): Yuhong Xiong, Xiaojun Liu, Edward Lee
Version:$Id: InUnitsOf.java,v 1.21 2005/10/28 20:15:42 cxh Exp $
Pt.Proposed Rating:Red (yuhong)
Pt.Accepted Rating:Red (cxh)




units
The units to which the input tokens will be converted. The default value of this parameter is the double 1.0.