using System.Runtime.InteropServices; namespace NvAPIWrapper.Native.GPU.Structures { /// /// Holds information regarding a piecewise linear function settings /// [StructLayout(LayoutKind.Sequential, Pack = 8)] public struct IlluminationZoneControlDataPiecewiseLinear { internal IlluminationPiecewiseLinearCycleType _CycleType; internal byte _GroupPeriodRepeatCount; internal ushort _RiseDurationInMS; internal ushort _FallDurationInMS; internal ushort _ADurationInMS; internal ushort _BDurationInMS; internal ushort _NextGroupIdleDurationInMS; internal ushort _PhaseOffsetInMS; /// /// Creates a new instance of . /// /// The type of cycle effect to apply. /// The number of times to repeat function within group period. /// The time in millisecond to transition from color A to color B. /// The time in millisecond to transition from color B to color A. /// The time in millisecond to remain at color A before color A to color B transition. /// The time in millisecond to remain at color B before color B to color A transition. /// /// The time in millisecond to remain idle before next group of repeated function /// cycles. /// /// The time in millisecond to offset the cycle relative to other zones. // ReSharper disable once TooManyDependencies public IlluminationZoneControlDataPiecewiseLinear( IlluminationPiecewiseLinearCycleType cycleType, byte groupPeriodRepeatCount, ushort riseDurationInMS, ushort fallDurationInMS, ushort aDurationInMS, ushort bDurationInMS, ushort nextGroupIdleDurationInMS, ushort phaseOffsetInMS) { _CycleType = cycleType; _GroupPeriodRepeatCount = groupPeriodRepeatCount; _RiseDurationInMS = riseDurationInMS; _FallDurationInMS = fallDurationInMS; _ADurationInMS = aDurationInMS; _BDurationInMS = bDurationInMS; _NextGroupIdleDurationInMS = nextGroupIdleDurationInMS; _PhaseOffsetInMS = phaseOffsetInMS; } /// /// Gets the time in millisecond to offset the cycle relative to other zones. /// public ushort PhaseOffsetInMS { get => _PhaseOffsetInMS; } /// /// Gets the time in millisecond to remain idle before next group of repeated function cycles. /// public ushort NextGroupIdleDurationInMS { get => _NextGroupIdleDurationInMS; } /// /// Gets the time in millisecond to remain at color B before color B to color A transition. /// public ushort BDurationInMS { get => _BDurationInMS; } /// /// Gets the time in millisecond to remain at color A before color A to color B transition. /// public ushort ADurationInMS { get => _ADurationInMS; } /// /// Gets the time in millisecond to transition from color B to color A. /// public ushort FallDurationInMS { get => _FallDurationInMS; } /// /// Gets the time in millisecond to transition from color A to color B. /// public ushort RiseDurationInMS { get => _RiseDurationInMS; } /// /// Gets the number of times to repeat function within group period. /// public byte GroupPeriodRepeatCount { get => _GroupPeriodRepeatCount; } /// /// Gets the type of cycle effect to apply. /// public IlluminationPiecewiseLinearCycleType CycleType { get => _CycleType; } } }