Ramper Datatypes

OcaRamperInterpolationLaw

enum OcaRamperInterpolationLaw : uint8_t

Interpolation law for ramper to use.

enumerator Linear = 1

Linear interpolation law

enumerator ReverseLinear = 2

Reverse linear interpolation law

enumerator Sine = 3

Sine interpolation law

enumerator Exponential = 4

Exponential interpolation law

OcaRamperCommand

enum OcaRamperCommand : uint8_t

Command repertoire of OcaRamper’s Control method.

enumerator Enable = 1

Enable the ramper. Enter Enabled state.

enumerator Start = 2

Unconditionally start ramping now. Enter Ramping state.

enumerator Halt = 3

If Ramping, stop ramping. Return to Initialized or Scheduled state, whichever is appropriate.

OcaRamperState

enum OcaRamperState : uint8_t

States of the Ramper . Here are the rules for Ramper state changes:

  • A freshly-constructed Ramper’s state shall be NotInitialized.

  • A Ramper’s state shall become Initialized when: Its state is NotInitialized, AND ** TargetProperty** has been set to a valid value, AND ** Goal** has been set, AND ** Duration** has been set.

  • A Ramper’s state shall become Scheduled when: It is Initialized, AND StartWhen has been set, AND The given start time + Duration is in the future.

  • A Ramper’s state shall become Enabled when: Its state is Scheduled, AND It receives an **Enable **command.

  • A Ramper’s state shall become Ramping when: It is Enabled and the ramp start time is reached, OR It is Initialized, Scheduled, or Enabled and a Start command is received.

  • When a ramp operation completes, or when Halt command is received: - The Ramper’s state shall become Scheduled, when: StartWhen has been set, AND The given start time + Duration is in the future. - Otherwise, the Ramper’s state shall become Initialized.

enumerator NotInitialized = 1

Ramper is not initialized and can not be started or enabled.

enumerator Initialized = 2

Ramper is initialized sufficiently for nonscheduled ramps to work. A nonscheduled ramp is one that has no defined start time and must be started with the Start command.

enumerator Scheduled = 3

Ramper is initialized sufficiently for both nonscheduled and scheduled ramps to work. A scheduled ramp is one that has a defined start time.

enumerator Enabled = 4

Ramper’s timer is running and scheduled ramp will commence at the designated future time.

enumerator Ramping = 5

Ramper is currently executing a ramp.