1.2.3 OcaRamper
Class Hierarchy:
OcaRoot : OcaAgent : OcaRamper
-
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
1.1
.
-
static const OcaClassVersionNumber ClassVersion = 2
This property is an override of the OcaRoot property.
This property has id
1.2
.
-
OcaTimeInterval Duration
Duration of ramp period.
This property has id
3.5
.
-
OcaFloat64 Goal
Final value of ramp. Datatype is target property’s datatype.
This property has id
3.7
.
-
OcaRamperInterpolationLaw InterpolationLaw
Ramper interpolation law
This property has id
3.6
.
-
OcaProperty RampedProperty
Identification of the property being ramped.
This property has id
3.2
.
-
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. In version 3 of this class, this property is deprecated and replaced by property StartWhen.
This property has id
3.4
.
-
OcaWhen StartWhen
An OcaWhen item that specifies when to start ramp. Absolute or relative time, according to what the OcaWhen item specifies. Relative time values are based on the absolute time that StartWhen was most recently set.
This property has id
3.8
.
-
OcaRamperState State
{Ready, Ramping, Paused, Completed, Disabled} Readonly.
This property has id
3.1
.
-
OcaTimeMode TimeMode
Absolute or Relative time. In version 3 of this class, this property is deprecated and replaced by property StartWhen.
This property has id
3.3
.
Properties inherited from 1.2 OcaAgent:
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
.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
.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
.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
.property: Input parameter.
-
OcaStatus GetTimeMode(OcaTimeMode &TimeMode)
Gets ramper time mode (absolute or relative). Deprecated in v3 of this class.
This method has id
3.5
.TimeMode: Output parameter.
-
OcaStatus SetTimeMode(OcaTimeMode TimeMode)
Sets ramper time mode (absolute or relative). Deprecated in v3 of this class.
This method has id
3.6
.TimeMode: Input parameter.
-
OcaStatus GetStartTime(OcaTimeNTP &StartTime)
Output parameter that holds the start time of the ramp if the method succeeds. Deprecated in version 3 of this class.
This method has id
3.7
.StartTime: Output parameter.
-
OcaStatus SetStartTime(OcaTimeNTP TimeMode)
Sets ramper start time. Deprecated in v3 of this class.
This method has id
3.8
.TimeMode: Input parameter.
-
OcaStatus GetDuration(OcaTimeInterval &Duration, OcaTimeInterval &minDuration, OcaTimeInterval &maxDuration)
Gets ramp duration. The return value indicates whether the duration was successfully retrieved.
This method has id
3.9
.Duration: Output parameter.
minDuration: Output parameter.
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
.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
.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
.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
.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
.goal: Input parameter.
-
OcaStatus GetStartWhen(OcaWhen &When)
Gets the value of the StartWhen property.
This method has id
3.15
.When: Output parameter.
-
OcaStatus SetStartWhen(OcaWhen When)
Sets the value of the StartWhen property. Shall fail if called when State is Ramping.
This method has id
3.16
.When: Input parameter.
Methods inherited from 1.2 OcaAgent: