Interface SimulationValueGenerator

  • All Known Implementing Classes:
    SineGenerator

    public interface SimulationValueGenerator
    Simple interface for a class that can be used to generate event streams based on some function.
    Author:
    mshankar
    • Method Summary

      Modifier and Type Method Description
      int getNumberOfSamples​(ArchDBRTypes type)
      Get the number of events in the stream; this can be based on the incoming DBR_type.
      SampleValue getSampleValue​(ArchDBRTypes type, int secondsIntoYear)
      Get the value at a particular point in time.
    • Method Detail

      • getNumberOfSamples

        int getNumberOfSamples​(ArchDBRTypes type)
        Get the number of events in the stream; this can be based on the incoming DBR_type. If you want the simulation stream decide on the number of samples (perhaps based on the year), return -1 here and an appropriate default is chosen.
        Parameters:
        type - ArchDBRTypes
        Returns:
        The number of samples
      • getSampleValue

        SampleValue getSampleValue​(ArchDBRTypes type,
                                   int secondsIntoYear)
        Get the value at a particular point in time. Many unit tests rely on the value being returned being absolutely reproducible given the time.
        Parameters:
        type - ArchDBRTypes
        secondsIntoYear -  
        Returns:
        Sample value