com.greenthrottle.gcs.api
Class ControllerEvent

java.lang.Object
  extended by com.greenthrottle.gcs.api.ControllerEvent

public class ControllerEvent
extends java.lang.Object


Nested Class Summary
static class ControllerEvent.Action
          Indicates type of action.
static class ControllerEvent.AnalogDataType
          Indicates type of analog event.
static class ControllerEvent.CommonCodes
          Indicates the controller button, stick, or trigger that caused the event
 
Field Summary
static  CREATOR
          Used internally as part of IPC
 
Constructor Summary
ControllerEvent(java.lang.String controller_id, ControllerEvent.Action action, ControllerEvent.CommonCodes commonCode)
           
ControllerEvent(java.lang.String controller_id, ControllerEvent.CommonCodes analogCode, java.util.HashMap<ControllerEvent.AnalogDataType,java.lang.Double> analogValues, boolean fillInRelevantMinMaxDefaults)
           
 
Method Summary
 ControllerEvent.Action action()
          Returns Action that triggered this event, such as a button up or button down
 java.util.HashMap<ControllerEvent.AnalogDataType,java.lang.Double> analogData()
          Returns analog data associated with this event, such as the x & y axis positions of one of the analog sticks
 java.lang.String analogValuesToString()
          Provide string representation of analog values for debugging
 ControllerEvent.CommonCodes cCode()
          Returns the CommonCode corresponding with the controller button, stick, or trigger that generated this event
 void changeCommonCode(ControllerEvent.CommonCodes v)
          Used internally
 int code()
          Used internally
 int describeContents()
          Used internally by IPC
 java.lang.String id()
          Returns the BT address of the controller that generated this event
 boolean isValid()
           
 KeyEvent keyEvent()
          Unused
 void setId(java.lang.String bt_address)
           
 java.lang.String toCodeString()
           
 java.lang.String toString()
           
 void writeToParcel(Parcel out, int arg1)
          Used internally by IPC
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CREATOR

public static final  CREATOR
Used internally as part of IPC

Constructor Detail

ControllerEvent

public ControllerEvent(java.lang.String controller_id,
                       ControllerEvent.Action action,
                       ControllerEvent.CommonCodes commonCode)

ControllerEvent

public ControllerEvent(java.lang.String controller_id,
                       ControllerEvent.CommonCodes analogCode,
                       java.util.HashMap<ControllerEvent.AnalogDataType,java.lang.Double> analogValues,
                       boolean fillInRelevantMinMaxDefaults)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

analogValuesToString

public java.lang.String analogValuesToString()
Provide string representation of analog values for debugging

Returns:

toCodeString

public java.lang.String toCodeString()

isValid

public boolean isValid()

id

public java.lang.String id()
Returns the BT address of the controller that generated this event

Returns:

action

public ControllerEvent.Action action()
Returns Action that triggered this event, such as a button up or button down

Returns:
Action

analogData

public java.util.HashMap<ControllerEvent.AnalogDataType,java.lang.Double> analogData()
Returns analog data associated with this event, such as the x & y axis positions of one of the analog sticks

Returns:

code

public int code()
Used internally

Returns:

cCode

public ControllerEvent.CommonCodes cCode()
Returns the CommonCode corresponding with the controller button, stick, or trigger that generated this event

Returns:

changeCommonCode

public void changeCommonCode(ControllerEvent.CommonCodes v)
Used internally

Parameters:
v -

keyEvent

public KeyEvent keyEvent()
Unused

Returns:

describeContents

public int describeContents()
Used internally by IPC

Returns:

writeToParcel

public void writeToParcel(Parcel out,
                          int arg1)
Used internally by IPC

Parameters:
out -
arg1 -

setId

public void setId(java.lang.String bt_address)