Class Config.GlobalSamplingConfig

java.lang.Object
com.inertia.promove.Config.GlobalSamplingConfig
All Implemented Interfaces:
Config.AbstractConfig, Config.LegacyConfig
Enclosing class:
Config

public static class Config.GlobalSamplingConfig
extends java.lang.Object
implements Config.LegacyConfig
global sampling configuration
  • Field Details

  • Constructor Details

  • Method Details

    • set

      public void set​(boolean _globalEnable, boolean _transmitEnable, Config.TransmitType _transmitType, int _freq)
      set non-fastMAC parameters
      Parameters:
      _globalEnable - enable sampling
      _transmitEnable - enable transmission
      _transmitType - transmit type(s)
      _freq - sampling frequency
    • set

      public void set​(boolean _globalEnable, boolean _transmitEnable, Config.TransmitType _transmitType, int _freq, Config.TimerSource _timerSource, Config.TriggerType _triggerSource, boolean _zeroPackets, int _frameSize)
      set all parameters
      Parameters:
      _globalEnable - enable sampling
      _transmitEnable - enable transmission
      _transmitType - transmit type(s)
      _freq - sampling frequency
      _zeroPackets - sent 0 packets (for synchronized sampling with fastMAC
      _timerSource - low (0) or high (1) frequency timer
      _triggerSource - trigger type
      _frameSize - number of samples per message (mainly for fastMAC)
    • parse

      public int parse​(byte[] in) throws InertiaException
      Description copied from interface: Config.AbstractConfig
      pare input byte array to relevant configuration and return length of encoded config
      Specified by:
      parse in interface Config.AbstractConfig
      Parameters:
      in - input byte array
      Returns:
      length of encoded config
      Throws:
      InertiaException - upon error such as when length is insufficient
    • getBytes

      public int getBytes​(byte[] out)
      Description copied from interface: Config.AbstractConfig
      encode current configuration in a byte array
      Specified by:
      getBytes in interface Config.AbstractConfig
      Parameters:
      out - byte array for encoded configuration
      Returns:
      length of encoded configuration
    • toString

      public java.lang.String toString()
      Description copied from interface: Config.AbstractConfig
      create a string representation of the configuration
      Specified by:
      toString in interface Config.AbstractConfig
      Overrides:
      toString in class java.lang.Object
      Returns:
      string representation of configuration
    • getMask

      public Config.Mask getMask()
      Description copied from interface: Config.AbstractConfig
      get mask
      Specified by:
      getMask in interface Config.AbstractConfig
      Returns:
      mask for this config