public class RoverDropDownReceiver extends DropDownReceiver implements android.view.View.OnClickListener, android.view.View.OnLongClickListener, RoverInterface.RadioListener, DropDown.OnStateListener, android.content.SharedPreferences.OnSharedPreferenceChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
RoverDropDownReceiver.Frequency |
class |
RoverDropDownReceiver.NetworkCheckerRunnable
Very simple thread that polls every 5 seconds to see if the
network is down, and if it is down attempts to bring it back up.
|
static interface |
RoverDropDownReceiver.RadioStatusListener |
static class |
RoverDropDownReceiver.RoverStatusState |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
CONNECTED |
java.lang.String |
DISCONNECTED |
java.lang.String |
INVALID_FREQ |
java.lang.String |
OFF |
java.lang.String |
SEARCHING |
static java.lang.String |
TAG |
DROPDOWN_STATE_FULLSCREEN, DROPDOWN_STATE_NONE, DROPDOWN_STATE_NORMAL, FIVE_EIGTHS_HEIGHT, FIVE_EIGTHS_WIDTH, FIVE_TWELFTHS_HEIGHT, FIVE_TWELFTHS_WIDTH, FULL_HEIGHT, FULL_WIDTH, HALF_HEIGHT, HALF_WIDTH, HANDLE_THICKNESS_LANDSCAPE, HANDLE_THICKNESS_PORTRAIT, NO_HEIGHT, NO_WIDTH, QUARTER_SCREEN, SEVEN_SIXTEENTH_WIDTH, THIRD_HEIGHT, THIRD_WIDTH, THREE_EIGHTHS_HEIGHT, THREE_EIGHTHS_WIDTH, TWO_THIRDS_HEIGHT, TWO_THIRDS_WIDTH
Constructor and Description |
---|
RoverDropDownReceiver(MapView mapView)
initialize with the mapView
|
Modifier and Type | Method and Description |
---|---|
static void |
addRadioStatusListener(RoverDropDownReceiver.RadioStatusListener rsl) |
void |
close() |
void |
disposeImpl()
Any drop down specific disposal implementation that is performed during the
disposal of a drop down.
|
static RoverInterface.Receiver |
getLastStatus()
Last Status received from the rover.
|
void |
log(java.lang.String tag,
java.lang.String message)
Provides log style messages from the library.
|
static void |
notifyRadioStatusListeners(int color,
java.lang.String text,
java.lang.String subtext) |
void |
onClick(android.view.View v) |
void |
onDropDownClose() |
void |
onDropDownSelectionRemoved() |
void |
onDropDownSizeChanged(double width,
double height) |
void |
onDropDownVisible(boolean v) |
boolean |
onLongClick(android.view.View v) |
void |
onMciStatus(int status)
Incoming status for the Radio.
|
void |
onMcoStatus(int status)
Outgoing sending status for the Radio.
|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
void |
onReceivePresets(java.util.List<java.lang.String> presets)
Callback when the preset list is returned after a succesful
command to solicit the presets.
|
void |
onReceiverStatus(RoverInterface.Receiver r)
Provides the heartbeat status for the device based on the solicited
response (automatically done with a static period after monitoring has
been started.
|
void |
onSharedPreferenceChanged(android.content.SharedPreferences sharedPreferences,
java.lang.String key) |
static void |
removeRadioStatusListener(RoverDropDownReceiver.RadioStatusListener rsl) |
static boolean |
setFrequency(int freqMhz)
Frequency change in megahertz (1810 for 1.810GHZ, etc).
|
static boolean |
setModuleChannel(java.lang.String mt,
int channel)
DDL support for Module/Channel (Module can be the string "M1, "M2", "M3", or "M4")
|
static void |
setRoverImpl(RoverInterface _radio) |
void |
startNetworkChecking(java.lang.String name,
java.lang.String address,
java.lang.String subnet,
java.lang.String gateway,
int polling)
For the record, internal management of the first network interface by ATAK is
not a great idea.
|
void |
stopNetworkChecking() |
static boolean |
watch()
Allows for the video to be watched, if the radio is already under the control of ATAK
or the network monitor.
|
void |
watchVideo(boolean external)
Broadcasts the video intent to watch a video.
|
_showDropDown, callResize, closeDropDown, dispose, dropDownAlreadyExists, getAssociationKey, getBackStackCount, getDropDown, getMapView, hideDropDown, isClosed, isPortrait, isRetained, isTablet, isTransient, isVisible, onBackButtonPressed, onStateRequested, resize, setAssociationKey, setRetain, setSelected, setSelected, setSelected, setTransient, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, unhideDropDown
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final java.lang.String TAG
public final java.lang.String CONNECTED
public final java.lang.String SEARCHING
public final java.lang.String DISCONNECTED
public final java.lang.String OFF
public final java.lang.String INVALID_FREQ
public RoverDropDownReceiver(MapView mapView)
public static void setRoverImpl(RoverInterface _radio)
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public void log(java.lang.String tag, java.lang.String message)
RoverInterface.RadioListener
log
in interface RoverInterface.RadioListener
public void onMcoStatus(int status)
RoverInterface.RadioListener
onMcoStatus
in interface RoverInterface.RadioListener
public void onMciStatus(int status)
RoverInterface.RadioListener
onMciStatus
in interface RoverInterface.RadioListener
public void onReceiverStatus(RoverInterface.Receiver r)
RoverInterface.RadioListener
onReceiverStatus
in interface RoverInterface.RadioListener
public void onReceivePresets(java.util.List<java.lang.String> presets)
RoverInterface.RadioListener
onReceivePresets
in interface RoverInterface.RadioListener
public void close()
public void onDropDownSelectionRemoved()
onDropDownSelectionRemoved
in interface DropDown.OnStateListener
public void onDropDownVisible(boolean v)
onDropDownVisible
in interface DropDown.OnStateListener
public void onDropDownSizeChanged(double width, double height)
onDropDownSizeChanged
in interface DropDown.OnStateListener
public void onDropDownClose()
onDropDownClose
in interface DropDown.OnStateListener
public void disposeImpl()
DropDownReceiver
disposeImpl
in class DropDownReceiver
public boolean onLongClick(android.view.View v)
onLongClick
in interface android.view.View.OnLongClickListener
public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener
public void watchVideo(boolean external)
external
- true will launch the external video player.public void startNetworkChecking(java.lang.String name, java.lang.String address, java.lang.String subnet, java.lang.String gateway, int polling)
public void stopNetworkChecking()
public void onSharedPreferenceChanged(android.content.SharedPreferences sharedPreferences, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener
public static void addRadioStatusListener(RoverDropDownReceiver.RadioStatusListener rsl)
public static void removeRadioStatusListener(RoverDropDownReceiver.RadioStatusListener rsl)
public static void notifyRadioStatusListeners(int color, java.lang.String text, java.lang.String subtext)
public static boolean setFrequency(int freqMhz)
public static boolean setModuleChannel(java.lang.String mt, int channel)
public static RoverInterface.Receiver getLastStatus()
public static boolean watch()