Package com.inertia.promove
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 Summary
Fields Modifier and Type Field Description int
frameSize
int
freq
boolean
globalEnable
Config.TimerSource
timerSource
boolean
transmitEnable
Config.TransmitType
transmitType
Config.TriggerType
triggerSource
boolean
zeroPackets
-
Constructor Summary
Constructors Constructor Description GlobalSamplingConfig()
-
Method Summary
Modifier and Type Method Description int
getBytes(byte[] out)
encode current configuration in a byte arrayConfig.Mask
getMask()
get maskint
parse(byte[] in)
pare input byte array to relevant configuration and return length of encoded configvoid
set(boolean _globalEnable, boolean _transmitEnable, Config.TransmitType _transmitType, int _freq)
set non-fastMAC parametersvoid
set(boolean _globalEnable, boolean _transmitEnable, Config.TransmitType _transmitType, int _freq, Config.TimerSource _timerSource, Config.TriggerType _triggerSource, boolean _zeroPackets, int _frameSize)
set all parametersjava.lang.String
toString()
create a string representation of the configuration
-
Field Details
-
globalEnable
public boolean globalEnable -
transmitEnable
public boolean transmitEnable -
zeroPackets
public boolean zeroPackets -
freq
public int freq -
timerSource
-
triggerSource
-
frameSize
public int frameSize -
transmitType
-
-
Constructor Details
-
GlobalSamplingConfig
public GlobalSamplingConfig()
-
-
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
Description copied from interface:Config.AbstractConfig
pare input byte array to relevant configuration and return length of encoded config- Specified by:
parse
in interfaceConfig.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 interfaceConfig.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 interfaceConfig.AbstractConfig
- Overrides:
toString
in classjava.lang.Object
- Returns:
- string representation of configuration
-
getMask
Description copied from interface:Config.AbstractConfig
get mask- Specified by:
getMask
in interfaceConfig.AbstractConfig
- Returns:
- mask for this config
-