|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.wpi.first.wpilibj.communication.FRCControl
public final class FRCControl
Contains the code necessary to communicate between the robot and the driver station.
| Nested Class Summary | |
|---|---|
static class |
FRCControl.CachedNativeBuffer
A simple 1-element cache that keeps a pointer to native memory around. |
static class |
FRCControl.DynamicControlData
|
| Field Summary | |
|---|---|
static int |
IO_CONFIG_DATA_SIZE
The size of the IO configuration data |
static int |
USER_CONTROL_DATA_SIZE
The size of the user control data |
static int |
USER_DS_LCD_DATA_SIZE
The size of the user driver station display data |
static int |
USER_STATUS_DATA_SIZE
The size of the user status data |
| Method Summary | |
|---|---|
static int |
getCommonControlData(FRCCommonControlData data,
int wait_ms)
Get the control data from the driver station. |
static int |
getDynamicControlData(byte type,
FRCControl.DynamicControlData dynamicData,
int maxLength,
int wait_ms)
Get the dynamic control data from the driver station. |
FrcBotSimProperties |
getSimProperties()
|
static void |
observeUserProgramAutonomous()
|
static void |
observeUserProgramDisabled()
|
static void |
observeUserProgramStarting()
Let the DS know that the user is loading a new app. |
static void |
observeUserProgramTeleop()
|
static int |
overrideIOConfig(FRCControl.DynamicControlData ioConfig,
int wait_ms)
Right new io config data. |
static void |
setErrorData(byte[] bytes,
int length,
int timeOut)
Send data to the driver station's error panel |
static void |
setErrorData(Pointer textPtr,
int length,
int timeOut)
Send data to the driver station's error panel |
static void |
setNewDataSem(Semaphore sem)
Set the semaphore for the communications task to use |
static int |
setStatusData(double battery,
int dsDigitalOut,
int updateNumber,
byte[] userDataHigh,
int userDataHighLength,
byte[] userDataLow,
int userDataLowLength,
int wait_ms)
Set the status data to send to the ds |
static void |
setUserDsLcdData(byte[] bytes,
int length,
int timeOut)
Send data to the driver station's user panel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IO_CONFIG_DATA_SIZE
public static final int USER_CONTROL_DATA_SIZE
public static final int USER_STATUS_DATA_SIZE
public static final int USER_DS_LCD_DATA_SIZE
| Method Detail |
|---|
public FrcBotSimProperties getSimProperties()
getSimProperties in interface FrcBotSimComponent
public static int getCommonControlData(FRCCommonControlData data,
int wait_ms)
data - the object to store the results in (out param)wait_ms - the maximum time to wait
public static int getDynamicControlData(byte type,
FRCControl.DynamicControlData dynamicData,
int maxLength,
int wait_ms)
type - The type to get.dynamicData - The array to hold the result in.maxLength - The maximum length of the data.wait_ms - The maximum time to wait.
public static int overrideIOConfig(FRCControl.DynamicControlData ioConfig,
int wait_ms)
ioConfig - The data to write / readwait_ms - The maximum time to wait.
public static int setStatusData(double battery,
int dsDigitalOut,
int updateNumber,
byte[] userDataHigh,
int userDataHighLength,
byte[] userDataLow,
int userDataLowLength,
int wait_ms)
battery - the battery voltagedsDigitalOut - value to set the digital outputs on the ds toupdateNumber - unique ID for this update (incrementing)userDataHigh - additional high-priority user data bytesuserDataHighLength - number of high-priority data bytesuserDataLow - additional low-priority user data bytesuserDataLowLength - number of low-priority data byteswait_ms - the timeout
public static void setErrorData(byte[] bytes,
int length,
int timeOut)
bytes - the byte array containing the properly formatted information for the displaylength - the length of the byte arraytimeOut - the maximum time to wait
public static void setErrorData(Pointer textPtr,
int length,
int timeOut)
textPtr - pointer to C byte array containing the properly formatted information for the displaylength - the length of the byte arraytimeOut - the maximum time to wait
public static void setUserDsLcdData(byte[] bytes,
int length,
int timeOut)
bytes - the byte array containing the properly formatted information for the displaylength - the length of the byte arraytimeOut - the maximum time to waitpublic static void setNewDataSem(Semaphore sem)
sem - the semaphore to usepublic static void observeUserProgramStarting()
public static void observeUserProgramDisabled()
public static void observeUserProgramAutonomous()
public static void observeUserProgramTeleop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||