Class Common
-
- All Implemented Interfaces:
public final class Common
Created by Djamil on 03/05/2017.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
Common.RfStatus
An enum to repr the macstate of the pandwarf
public enum
Common.RfPowerAmplifierMode
Possible values for RF power amplifiers
public enum
Common.RfAntennaMode
public enum
Common.RfTask
Possibe RF task sent in GollumDongleActivityEvent, to indicate PandwaRF is busy doing something on RF
-
Field Summary
Fields Modifier and Type Field Description public static String
MODULATION_ASK_OOK
public static String
MODULATION_2_FSK
public static String
MODULATION_4_FSK
public static String
MODULATION_GFSK
public static String
MODULATION_MSK
public static HashMap<String, Integer>
modulationMap
public final static int
RF_POWER_AMPLIFIERS_ACTION_ALL_OFF
public final static int
RF_TX_POWER_AMPLIFIER_ACTION_ON
public final static int
RF_RX_POWER_AMPLIFIER_ACTION_ON
public final static int
RF_TX_RX_POWER_AMPLIFIER_ACTION_ON
public final static int
RF_TX_POWER_AMPLIFIER_ACTION_ON_TX
public final static int
RF_RX_POWER_AMPLIFIER_ACTION_ON_RX
public final static int
RF_TX_RX_POWER_AMPLIFIER_ACTION_ON_TX_RX
public final static int
RF_ANT_POWER_ENABLE
public final static int
RF_ANT_POWER_DISABLE
public final static int
RF_ANT_POWER_AMPLIFIERS_MASK
public final static int
RF_ANT_ANTENNA_POWER_MASK
-
Constructor Summary
Constructors Constructor Description Common()
-
Method Summary
Modifier and Type Method Description static Common.RfPowerAmplifierMode
getRfPowerAmplifierMode(int mode)
static Common.RfAntennaMode
getRfAntennaMode(int mode)
static int
getModulationValue(String modulation)
Convert a string describing a modulation into an integer value that can be used with GollumDongle methods. static boolean
isModulation(int modulation)
Indicates if the given value is recognized as a modulation static String
getModulationName(int modulation)
Convert an integer describing a modulation into a textual String value. -
-
Method Detail
-
getRfPowerAmplifierMode
static Common.RfPowerAmplifierMode getRfPowerAmplifierMode(int mode)
-
getRfAntennaMode
static Common.RfAntennaMode getRfAntennaMode(int mode)
-
getModulationValue
static int getModulationValue(String modulation)
Convert a string describing a modulation into an integer value that can be used with GollumDongle methods. Possible values are: "ASK/OOK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_ASK_OOK}, "2-FSK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_2FSK}, "4-FSK: {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_4FSK}, "GFSK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_GFSK}, "MSK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_MSK}
- Parameters:
modulation
- as a String- Returns:
modulation value from a string, {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_ASK_OOK} if unknown modulation string
-
isModulation
static boolean isModulation(int modulation)
Indicates if the given value is recognized as a modulation
-
getModulationName
static String getModulationName(int modulation)
Convert an integer describing a modulation into a textual String value. Possible values are <String, Integer>: "ASK/OOK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_ASK_OOK}, "2-FSK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_2FSK}, "4-FSK: {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_4FSK}, "GFSK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_GFSK}, "MSK": {@value com.comthings.gollum.api.gollumandroidlib.GollumDongle#MODULATION_MSK}
- Parameters:
modulation
- as an integer.- Returns:
modulation in String format.
-
-
-
-