1.2.3 OcaRamper

Class Hierarchy:

OcaRootOcaAgentOcaRamper

class OcaRamper : OcaAgent

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.

Properties:

static const OcaClassID ClassID = "1.2.3"

This property is an override of the OcaRoot property.

This property has id 3.1.

static const OcaClassVersionNumber ClassVersion = 2

This property is an override of the OcaRoot property.

This property has id 3.2.

OcaRamperState State

{Ready, Ramping, Paused, Completed, Disabled} Readonly.

This property has id 3.1.

OcaProperty RampedProperty

Identification of the property being ramped.

This property has id 3.2.

OcaTimeMode TimeMode = Relative

Absolute or Relative time.

This property has id 3.3.

OcaTimeNTP StartTime

Time at which to start ramp. If TimeMode=Relative , the actual event start time equals the value of StartTime plus the absolute time that StartTime was most recently set. If TimeMode=Absolute , the actual event start time equals the value of StartTime

This property has id 3.4.

OcaTimeInterval Duration

Duration of ramp period.

This property has id 3.5.

OcaRamperInterpolationLaw InterpolationLaw

Ramper interpolation law

This property has id 3.6.

OcaFloat64 Goal

Final value of ramp. Datatype is target property’s datatype.

This property has id 3.7.

Properties inherited from OcaAgent:

Properties inherited from OcaRoot:

Methods:

OcaStatus Control(OcaRamperCommand Command)

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

This method has id 3.1.

Parameters

OcaRamperCommand Command – Input parameter.

OcaStatus GetState(OcaRamperState &State)

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

This method has id 3.2.

Parameters

OcaRamperState State – Output parameter.

OcaStatus GetRampedProperty(OcaProperty &property)

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

This method has id 3.3.

Parameters

OcaProperty property – Output parameter.

OcaStatus SetRampedProperty(OcaProperty property)

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

This method has id 3.4.

Parameters

OcaProperty property – Input parameter.

OcaStatus GetTimeMode(OcaTimeMode &TimeMode)

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

This method has id 3.5.

Parameters

OcaTimeMode TimeMode – Output parameter.

OcaStatus SetTimeMode(OcaTimeMode TimeMode)

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

This method has id 3.6.

Parameters

OcaTimeMode TimeMode – Input parameter.

OcaStatus GetStartTime(OcaTimeNTP &StartTime)

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

This method has id 3.7.

Parameters

OcaTimeNTP StartTime – Output parameter.

OcaStatus SetStartTime(OcaTimeNTP TimeMode)

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

This method has id 3.8.

Parameters

OcaTimeNTP TimeMode – Input parameter.

OcaStatus GetDuration(OcaTimeInterval &Duration, OcaTimeInterval &miinDuration, OcaTimeInterval &maxDuration)

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

This method has id 3.9.

Parameters
  • OcaTimeInterval Duration – Output parameter.

  • OcaTimeInterval miinDuration – Output parameter.

  • OcaTimeInterval maxDuration – Output parameter.

OcaStatus SetDuration(OcaTimeInterval Duration)

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

This method has id 3.10.

Parameters

OcaTimeInterval Duration – Input parameter.

OcaStatus GetInterpolationLaw(OcaRamperInterpolationLaw &law)

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

This method has id 3.11.

Parameters

OcaRamperInterpolationLaw law – Output parameter.

OcaStatus SetInterpolationLaw(OcaRamperInterpolationLaw law)

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

This method has id 3.12.

Parameters

OcaRamperInterpolationLaw law – Input parameter.

OcaStatus GetGoal(OcaFloat64 &goal)

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

This method has id 3.13.

Parameters

OcaFloat64 goal – Output parameter.

OcaStatus SetGoal(OcaFloat64 goal)

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

This method has id 3.14.

Parameters

OcaFloat64 goal – Input parameter.

Methods inherited from OcaAgent:

Methods inherited from OcaRoot: