Package com.inertia.promove
Class Config.RTCConfig
java.lang.Object
com.inertia.promove.Config.RTCConfig
- All Implemented Interfaces:
Config.AbstractConfig
,Config.LegacyConfig
- Enclosing class:
- Config
public static class Config.RTCConfig
extends java.lang.Object
class for real time clock configuration, note that sampling probably needs to be disabled, better to trigger based on IMA or event
-
Field Summary
Fields Modifier and Type Field Description boolean
adoptMod
boolean
enableLogging
boolean
enableSampling
boolean
enableTransmit
boolean
externalTrigger
long
mod
Config.RTCConfigVersion
rtcVersion
int
samplingChannel
-
Constructor Summary
Constructors Constructor Description RTCConfig()
default constructor, setting the Mask -
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 _externalTrigger)
set RTC related configurationvoid
setMod(long _mod)
set modulus for sampling (i.e.void
setSampling(boolean _enableSampling, boolean _enableTransmit, boolean _enableLogging)
set sampling related booleansjava.lang.String
toString()
create a string representation of the configuration
-
Field Details
-
externalTrigger
public boolean externalTrigger -
rtcVersion
-
samplingChannel
public int samplingChannel -
enableSampling
public boolean enableSampling -
enableTransmit
public boolean enableTransmit -
enableLogging
public boolean enableLogging -
adoptMod
public boolean adoptMod -
mod
public long mod
-
-
Constructor Details
-
RTCConfig
public RTCConfig()default constructor, setting the Mask
-
-
Method Details
-
set
public void set(boolean _externalTrigger)set RTC related configuration- Parameters:
_externalTrigger
- trigger based on other config like IMA or command ServiceSendEvent
-
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
- Returns:
- string representation of configuration
-
setSampling
public void setSampling(boolean _enableSampling, boolean _enableTransmit, boolean _enableLogging)set sampling related booleans- Parameters:
_enableSampling
- enable sampling?_enableTransmit
- enable transmission?_enableLogging
- enable logging?
-
setMod
public void setMod(long _mod)set modulus for sampling (i.e. divider of global sampling frequency)- Parameters:
_mod
- the modulus
-
getMask
Description copied from interface:Config.AbstractConfig
get mask- Specified by:
getMask
in interfaceConfig.AbstractConfig
- Returns:
- mask for this config
-