Package com.dsi.ant.message
Class LibConfig
java.lang.Object
com.dsi.ant.message.LibConfig
- All Implemented Interfaces:
android.os.Parcelable
Specifies which
ExtendedData
to be included in received messages.- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class
The flags which indicate which features to enable in a raw Lib Config byte.Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final android.os.Parcelable.Creator<LibConfig>
For ParcelableFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
Gets the flag for enabling channel ID inExtendedData
.boolean
Gets the flag for enabling RSSI data inExtendedData
.boolean
Gets the flag for enabling timestamp inExtendedData
.byte
Gets the byte representing the LibConfig settings.int
hashCode()
void
setEnableChannelIdOutput
(boolean on) Enable or disable channel ID inExtendedData
.void
setEnableRssiOutput
(boolean on) Enable or disable RSSI data inExtendedData
.void
setEnableRxTimestampOutput
(boolean on) Enable or disable timestamp inExtendedData
.toString()
void
writeToParcel
(android.os.Parcel dest, int flags)
-
Field Details
-
CREATOR
For Parcelable- Since:
- 4.0
-
-
Constructor Details
-
LibConfig
public LibConfig()Constructs the LibConfig with all flags set to false by default.- Since:
- 4.0
-
LibConfig
public LibConfig(boolean enableChannelIdOutput, boolean enableRssiOutput, boolean enableRxTimestampOutput) Constructs the LibConfig with the given values for the flags- Parameters:
enableChannelIdOutput
- Indicates if channel ID is to be included inExtendedData
enableRssiOutput
- Indicates if RSSI data is to be included inExtendedData
enableRxTimestampOutput
- Indicates if timestamp is to be included inExtendedData
- Since:
- 4.0
-
-
Method Details
-
getEnableChannelIdOutput
public boolean getEnableChannelIdOutput()Gets the flag for enabling channel ID inExtendedData
.- Returns:
- True, if channel ID is enabled. False, otherwise.
- Since:
- 4.0
-
getEnableRssiOutput
public boolean getEnableRssiOutput()Gets the flag for enabling RSSI data inExtendedData
.- Returns:
- True, if RSSI data is enabled. False, otherwise.
- Since:
- 4.0
-
getEnableRxTimestampOutput
public boolean getEnableRxTimestampOutput()Gets the flag for enabling timestamp inExtendedData
.- Returns:
- True, if timestamp is enabled. False, otherwise.
- Since:
- 4.0
-
setEnableChannelIdOutput
public void setEnableChannelIdOutput(boolean on) Enable or disable channel ID inExtendedData
.- Parameters:
on
- True to include channel ID. False, otherwise.- Since:
- 4.0
-
setEnableRssiOutput
public void setEnableRssiOutput(boolean on) Enable or disable RSSI data inExtendedData
.- Parameters:
on
- True to include RSSI data. False, otherwise.- Since:
- 4.0
-
setEnableRxTimestampOutput
public void setEnableRxTimestampOutput(boolean on) Enable or disable timestamp inExtendedData
.- Parameters:
on
- True to include timestamp. False, otherwise.- Since:
- 4.0
-
getFlagsByte
public byte getFlagsByte()Gets the byte representing the LibConfig settings. Applications should use the methods provided in LibConfig to set/get extended data flags contained in LibConfig.- Returns:
- The flags byte.
- Since:
- 4.0
-
hashCode
public int hashCode() -
equals
-
toString
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-