OcaRamper

A online version of the AES70 specification of this class can be found at http://docs.deuso.de.

The class is a subclass of OcaAgent().

This class defines the properties

Name

JavaScript Type

AES70 Type

State

OcaRamperState

OcaRamperState

RampedProperty

OcaProperty

OcaProperty

TimeMode

OcaTimeMode

OcaTimeMode

StartTime

number|BigInt

OcaTimeNTP

Duration

number

OcaTimeInterval

InterpolationLaw

OcaRamperInterpolationLaw

OcaRamperInterpolationLaw

Goal

number

OcaFloat64

Furthermore, it inherits the properties ClassID, ClassVersion, ObjectNumber, Lockable, Role, Label, Owner, State, RampedProperty, TimeMode, StartTime, Duration, InterpolationLaw and Goal.

class OcaRamper(objectNumber, device)

Agent that gradually changes a property setting from one value to another. Works on a scalar numeric or boolean property of a specified object. Does not work for array, list, map, struct, or string properties. Contains timer features to allow ramps to start immediately or at any time in the future. This is a weakly typed class. All ramping parameters are specified as a OcaFloat64 numbers.

  • For unsigned integer targets, the ramping parameters are coerced to OcaUint64 before comparing.

  • For signed integer targets, the ramping parameters are coerced to OcaInt64 before comparing.

  • For boolean values, the the ramping parameters are coerced to OcaUint8. True is assigned the value One, False is assigned the value Zero.

OcaRamper.OnDurationChanged

type: PropertyEvent.<number>

This event is emitted when the property Duration changes in the remote object. The property Duration is described in the AES70 standard as follows. Duration of ramp period.

OcaRamper.OnGoalChanged

type: PropertyEvent.<number>

This event is emitted when the property Goal changes in the remote object. The property Goal is described in the AES70 standard as follows. Final value of ramp. Datatype is target property’s datatype.

OcaRamper.OnInterpolationLawChanged

type: PropertyEvent.<OcaRamperInterpolationLaw>

This event is emitted when the property InterpolationLaw changes in the remote object. The property InterpolationLaw is described in the AES70 standard as follows. Ramper interpolation law

OcaRamper.OnRampedPropertyChanged

type: PropertyEvent.<OcaProperty>

This event is emitted when the property RampedProperty changes in the remote object. The property RampedProperty is described in the AES70 standard as follows. Identification of the property being ramped.

OcaRamper.OnStartTimeChanged

type: PropertyEvent.<(number|BigInt)>

This event is emitted when the property StartTime changes in the remote object. The property StartTime is described in the AES70 standard as follows. Time at which to start ramp. If <b>TimeMode=Relative</b>, the actual event start time equals the value of <b>StartTime</b> plus the absolute time that <b>StartTime</b> was most recently set. If <b>TimeMode=Absolute</b>, the actual event start time equals the value of <b>StartTime</b>

OcaRamper.OnStateChanged

type: PropertyEvent.<OcaRamperState>

This event is emitted when the property State changes in the remote object. The property State is described in the AES70 standard as follows. {Ready, Ramping, Paused, Completed, Disabled} Readonly.

OcaRamper.OnTimeModeChanged

type: PropertyEvent.<OcaTimeMode>

This event is emitted when the property TimeMode changes in the remote object. The property TimeMode is described in the AES70 standard as follows. Absolute or Relative time.

OcaRamper.Control(Command)

Executes the given ramper command. The return value indicates whether the command was successfully executed.

Arguments
Returns

Promise.<void>

OcaRamper.GetDuration()

Gets ramp duration. The return value indicates whether the duration was successfully retrieved. The return values of this method are

  • Duration of type number

  • miinDuration of type number

  • maxDuration of type number

Returns

Promise.<Arguments.<number, number, number>>

OcaRamper.GetGoal()

Retrieves ramp goal value. The return value indicates whether the duration was successfully retrieved.

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaRamper.GetInterpolationLaw()

Retrieves interpolation law setting. The return value indicates whether the setting was successfully retrieved.

Returns

Promise.<OcaRamperInterpolationLaw> – A promise which resolves to a single value of type OcaRamperInterpolationLaw().

OcaRamper.GetRampedProperty()

Gets definition of ramped property. The return value indicates whether the object number was successfully retrieved.

Returns

Promise.<OcaProperty> – A promise which resolves to a single value of type OcaProperty().

OcaRamper.GetStartTime()

Gets ramp start time. The return value indicates whether the start time was successfully retrieved.

Returns

Promise.<(number|BigInt)> – A promise which resolves to a single value of type number|BigInt.

OcaRamper.GetState()

Gets current state of ramper. The return value indicates whether the state was successfully retrieved.

Returns

Promise.<OcaRamperState> – A promise which resolves to a single value of type OcaRamperState().

OcaRamper.GetTimeMode()

Gets ramper time mode (absolute or relative). The return value indicates whether the time mode was successfully retrieved.

Returns

Promise.<OcaTimeMode> – A promise which resolves to a single value of type OcaTimeMode().

OcaRamper.SetDuration(Duration)

Sets ramp duration. The return value indicates whether the duration was successfully set.

Arguments
  • Duration (number) –

Returns

Promise.<void>

OcaRamper.SetGoal(goal)

Sets ramp goal value. The return value indicates whether the duration was successfully set.

Arguments
  • goal (number) –

Returns

Promise.<void>

OcaRamper.SetInterpolationLaw(law)

Sets ramp interpolation law. The return value indicates whether the law was successfully set.

Arguments
Returns

Promise.<void>

OcaRamper.SetRampedProperty(property)

Defines property to be ramped. The return value indicates whether the definition was successful.

Arguments
Returns

Promise.<void>

OcaRamper.SetStartTime(TimeMode)

Sets ramper start time. The return value indicates whether the start time was successfully set.

Arguments
  • TimeMode (number|BigInt) –

Returns

Promise.<void>

OcaRamper.SetTimeMode(TimeMode)

Sets ramper time mode (absolute or relative). The return value indicates whether the time mode was successfully set.

Arguments
Returns

Promise.<void>