Class SineGenerator

java.lang.Object
org.epics.archiverappliance.utils.simulation.SineGenerator
All Implemented Interfaces:
SimulationValueGenerator

public class SineGenerator extends Object implements SimulationValueGenerator
Generates a sine wave with a default period of one hour and a specifiable offset. Used for data generation in the unit tests.
Author:
mshankar
  • Constructor Details

    • SineGenerator

      public SineGenerator(int phasediffindegress)
  • Method Details

    • getSampleValue

      public SampleValue getSampleValue(ArchDBRTypes type, int secondsIntoYear)
      Description copied from interface: SimulationValueGenerator
      Get the value at a particular point in time. Many unit tests rely on the value being returned being absolutely reproducible given the time.
      Specified by:
      getSampleValue in interface SimulationValueGenerator
      Parameters:
      type - ArchDBRTypes
      secondsIntoYear -  
      Returns:
      Sample value