();
+ private Context context;
+ private Utility utility;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_load);
+
+ context = this;
+ utility = new Utility(this);
+ utility.createConfigFolder();
+ buildInfoButtons();
}
- };
-
- private void warnIfNoFiles() {
- if (fileList.size() == 0) {
- String msg0 = "No files found!";
- String msg1 = "In order to proceed, you must create a new file";
- utility.setOrangeText(msg0, msg1, R.id.empty_filelist, R.layout.orange_warning, R.id.orangetext0, R.id.orangetext1);
- } else {
- ViewGroup empty_filelist = (ViewGroup) findViewById(R.id.empty_filelist);
- empty_filelist.removeAllViews();
- empty_filelist.setVisibility(View.GONE);
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+
+ fileList = utility.getXMLFiles();
+ warnIfNoFiles();
+ utility.updateHeader(Utility.NO_FILE, R.string.pref_hardware_config_filename, R.id.active_filename, R.id.included_header);
+ populate();
+ }
+
+ private void buildInfoButtons() {
+ Button saveConfigButton = (Button) findViewById(R.id.files_holder).findViewById(R.id.info_btn);
+ saveConfigButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ AlertDialog.Builder builder = utility.buildBuilder("Available files", "These are the" +
+ " files the Hardware Wizard was able to find. You can edit each file by clicking" +
+ " the edit button. The 'Activate' button will set that file as the current" +
+ " configuration file, which will be used to start the robot.");
+ builder.setPositiveButton("Ok", close_ok_listener);
+ AlertDialog alert = builder.create();
+ alert.show();
+ TextView textView = (TextView) alert.findViewById(android.R.id.message);
+ textView.setTextSize(14);
+ }
+ });
+
+ Button autoConfigButton = (Button) findViewById(R.id.autoconfigure_holder).findViewById(R.id.info_btn);
+ autoConfigButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ AlertDialog.Builder builder = utility.buildBuilder("AutoConfigure", "This is the fastest" +
+ " way to get a new machine up and running. The AutoConfigure" +
+ " tool will automatically enter some default names for devices. AutoConfigure" +
+ " expects at least one Servo Controller, with a servo in port 1 and 2, and at least" +
+ " one Motor Controller, with a motor in port 1 and 2. If there are other devices " +
+ "attached, the AutoConfigure tool will not name them.");
+ builder.setPositiveButton("Ok", close_ok_listener);
+ AlertDialog alert = builder.create();
+ alert.show();
+ TextView textView = (TextView) alert.findViewById(android.R.id.message);
+ textView.setTextSize(14);
+ }
+ });
+ }
+
+ private void warnIfNoFiles() {
+ if (fileList.size() == 0) {
+ String msg0 = "No files found!";
+ String msg1 = "In order to proceed, you must create a new file";
+ utility.setOrangeText(msg0, msg1, R.id.empty_filelist, R.layout.orange_warning, R.id.orangetext0, R.id.orangetext1);
+ } else {
+ ViewGroup empty_filelist = (ViewGroup) findViewById(R.id.empty_filelist);
+ empty_filelist.removeAllViews();
+ empty_filelist.setVisibility(View.GONE);
+ }
+ }
+
+ private void populate() {
+ ViewGroup inclusionViewGroup = (ViewGroup) findViewById(R.id.inclusionlayout);
+ inclusionViewGroup.removeAllViews();
+ for (String filename : fileList) {
+ View child = LayoutInflater.from(this).inflate(R.layout.file_info, null);
+ inclusionViewGroup.addView(child);
+ TextView name = (TextView) child.findViewById(R.id.filename_editText);
+ name.setText(filename);
+ }
}
- }
-
- private void populate(){
- ViewGroup inclusionViewGroup = (ViewGroup)findViewById(R.id.inclusionlayout);
- inclusionViewGroup.removeAllViews();
- for (String filename: fileList){
- View child = LayoutInflater.from(this).inflate(R.layout.file_info, null);
- inclusionViewGroup.addView(child);
- TextView name = (TextView) child.findViewById(R.id.filename_editText);
- name.setText(filename);
+
+ public void new_button(View v) {
+ utility.saveToPreferences(Utility.NO_FILE, R.string.pref_hardware_config_filename);
+ Intent intent = new Intent(context, FtcConfigurationActivity.class);
+ startActivity(intent);
+ }
+
+ public void file_edit_button(View v) {
+ String filename = getFileName(v, true);
+ utility.saveToPreferences(filename, R.string.pref_hardware_config_filename);
+
+ Intent intent = new Intent(context, FtcConfigurationActivity.class);
+ startActivity(intent);
}
- }
-
- public void new_button(View v){
- utility.saveToPreferences(Utility.NO_FILE, R.string.pref_hardware_config_filename);
- Intent intent = new Intent(context, FtcConfigurationActivity.class);
- startActivity(intent);
- }
-
- public void file_edit_button(View v){
- String filename = getFileName(v, true);
- utility.saveToPreferences(filename, R.string.pref_hardware_config_filename);
-
- Intent intent = new Intent(context, FtcConfigurationActivity.class);
- startActivity(intent);
- }
-
- public void file_activate_button(View v){
- String filename = getFileName(v, false);
- utility.saveToPreferences(filename, R.string.pref_hardware_config_filename);
- utility.updateHeader(Utility.NO_FILE, R.string.pref_hardware_config_filename, R.id.active_filename, R.id.included_header);
- }
-
- public void file_delete_button(View v){
- String filenameWExt = getFileName(v, true);
- File file = new File(Utility.CONFIG_FILES_DIR + filenameWExt);
-
- if (file.exists()){
- file.delete();
- } else {
- utility.complainToast("That file does not exist: " + filenameWExt, context);
- DbgLog.error("Tried to delete a file that does not exist: " + filenameWExt);
+
+ public void file_activate_button(View v) {
+ String filename = getFileName(v, false);
+ utility.saveToPreferences(filename, R.string.pref_hardware_config_filename);
+ utility.updateHeader(Utility.NO_FILE, R.string.pref_hardware_config_filename, R.id.active_filename, R.id.included_header);
+ }
+
+ public void file_delete_button(View v) {
+ String filenameWExt = getFileName(v, true);
+ File file = new File(Utility.CONFIG_FILES_DIR + filenameWExt);
+
+ if (file.exists()) {
+ file.delete();
+ } else {
+ utility.complainToast("That file does not exist: " + filenameWExt, context);
+ DbgLog.error("Tried to delete a file that does not exist: " + filenameWExt);
+ }
+
+ fileList = utility.getXMLFiles();
+ utility.saveToPreferences(Utility.NO_FILE, R.string.pref_hardware_config_filename);
+ utility.updateHeader(Utility.NO_FILE, R.string.pref_hardware_config_filename, R.id.active_filename, R.id.included_header);
+ populate();
}
- fileList = utility.getXMLFiles();
- utility.saveToPreferences(Utility.NO_FILE, R.string.pref_hardware_config_filename);
- utility.updateHeader(Utility.NO_FILE, R.string.pref_hardware_config_filename, R.id.active_filename, R.id.included_header);
- populate();
- }
-
- private String getFileName(View v, boolean plusExtension){
- LinearLayout horizontalButtons = (LinearLayout) v.getParent();
- LinearLayout linearLayout = (LinearLayout) horizontalButtons.getParent();
- TextView name = (TextView) linearLayout.findViewById(R.id.filename_editText);
- String filename = name.getText().toString();
- if (plusExtension) {
- filename += Utility.FILE_EXT;
+ private String getFileName(View v, boolean plusExtension) {
+ LinearLayout horizontalButtons = (LinearLayout) v.getParent();
+ LinearLayout linearLayout = (LinearLayout) horizontalButtons.getParent();
+ TextView name = (TextView) linearLayout.findViewById(R.id.filename_editText);
+ String filename = name.getText().toString();
+ if (plusExtension) {
+ filename += Utility.FILE_EXT;
+ }
+ return filename;
}
- return filename;
- }
- public void launch_autoConfigure(View v){
- startActivity(new Intent(getBaseContext(), AutoConfigureActivity.class));
- }
+ public void launch_autoConfigure(View v) {
+ startActivity(new Intent(getBaseContext(), AutoConfigureActivity.class));
+ }
}
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerActivity.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerActivity.java
index 1793a8a..6ea6418 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerActivity.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerActivity.java
@@ -82,19 +82,14 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
public class FtcRobotControllerActivity extends Activity {
+ protected static final String VIEW_LOGS_ACTION = "com.qualcomm.ftcrobotcontroller.VIEW_LOGS";
private static final int REQUEST_CONFIG_WIFI_CHANNEL = 1;
private static final boolean USE_MOCK_HARDWARE_FACTORY = false;
private static final int NUM_GAMEPADS = 2;
-
- protected static final String VIEW_LOGS_ACTION = "com.qualcomm.ftcrobotcontroller.VIEW_LOGS";
-
protected SharedPreferences preferences;
protected UpdateUI.Callback callback;
protected Context context;
- private Utility utility;
- private boolean launched;
-
protected TextView textDeviceName;
protected TextView textWifiDirectStatus;
protected TextView textRobotStatus;
@@ -102,24 +97,14 @@ public class FtcRobotControllerActivity extends Activity {
protected TextView textOpMode;
protected TextView textErrorMessage;
protected ImmersiveMode immersion;
-
protected UpdateUI updateUI;
protected BatteryChecker batteryChecker;
protected Dimmer dimmer;
protected LinearLayout entireScreenLayout;
-
protected FtcRobotControllerService controllerService;
-
protected FtcEventLoop eventLoop;
-
- protected class RobotRestarter implements Restarter {
-
- public void requestRestart() {
- requestRobotRestart();
- }
-
- }
-
+ private Utility utility;
+ private boolean launched;
protected ServiceConnection connection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
@@ -237,7 +222,6 @@ public void onWindowFocusChanged(boolean hasFocus){
}
}
-
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.ftc_robot_controller, menu);
@@ -276,6 +260,7 @@ public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// don't destroy assets on screen rotation
}
+
@Override
protected void onActivityResult(int request, int result, Intent intent) {
if (request == REQUEST_CONFIG_WIFI_CHANNEL) {
@@ -421,4 +406,12 @@ public void run() {
}
});
}
+
+ protected class RobotRestarter implements Restarter {
+
+ public void requestRestart() {
+ requestRobotRestart();
+ }
+
+ }
}
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerSettingsActivity.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerSettingsActivity.java
index 6d6d581..c624e9c 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerSettingsActivity.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/FtcRobotControllerSettingsActivity.java
@@ -44,6 +44,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
public class FtcRobotControllerSettingsActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Display the fragment as the main content.
+ getFragmentManager().beginTransaction()
+ .replace(android.R.id.content, new SettingsFragment())
+ .commit();
+ }
+
public static class SettingsFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -83,14 +93,4 @@ public boolean onPreferenceClick(Preference preference) {
}
}
}
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Display the fragment as the main content.
- getFragmentManager().beginTransaction()
- .replace(android.R.id.content, new SettingsFragment())
- .commit();
- }
}
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/ViewLogsActivity.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/ViewLogsActivity.java
index a322fa4..69a80ea 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/ViewLogsActivity.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/ViewLogsActivity.java
@@ -39,15 +39,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
import android.widget.ScrollView;
import android.widget.TextView;
import com.qualcomm.ftccommon.DbgLog;
import com.qualcomm.robotcore.util.RobotLog;
-import com.qualcomm.robotcore.util.RunShellCommand;
import java.io.BufferedReader;
import java.io.File;
@@ -58,106 +54,105 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
public class ViewLogsActivity extends Activity {
- TextView textAdbLogs;
- int DEFAULT_NUMBER_OF_LINES = 300;
- public static final String FILENAME = "Filename";
+ public static final String FILENAME = "Filename";
+ TextView textAdbLogs;
+ int DEFAULT_NUMBER_OF_LINES = 300;
+ String filepath = " ";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_view_logs);
+
+ textAdbLogs = (TextView) findViewById(R.id.textAdbLogs);
+
+ final ScrollView scrollView = ((ScrollView) findViewById(R.id.scrollView));
+ scrollView.post(new Runnable() {
+ @Override
+ public void run() {
+ scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+ }
+ });
+ }
- String filepath = " ";
+ @Override
+ protected void onStart() {
+ super.onStart();
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_view_logs);
+ Intent intent = getIntent();
+ Serializable extra = intent.getSerializableExtra(FILENAME);
+ if (extra != null) {
+ filepath = (String) extra;
+ }
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ String output = readNLines(DEFAULT_NUMBER_OF_LINES);
+ Spannable colorized = colorize(output);
+ textAdbLogs.setText(colorized);
+ } catch (IOException e) {
+ RobotLog.e(e.toString());
+ textAdbLogs.setText("File not found: " + filepath);
+ }
+ }
+ });
+ }
- textAdbLogs = (TextView) findViewById(R.id.textAdbLogs);
+ public String readNLines(int n) throws IOException {
+ File sdcard = Environment.getExternalStorageDirectory();
+ File file = new File(filepath);
+ BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
+ String[] ringBuffer = new String[n];
+ int totalLines = 0;
+ String line = null;
+ // read into the circular buffer, storing only 'n' lines at a time.
+ while ((line = bufferedReader.readLine()) != null) {
+ ringBuffer[totalLines % ringBuffer.length] = line;
+ totalLines++;
+ }
- final ScrollView scrollView = ((ScrollView) findViewById(R.id.scrollView));
- scrollView.post(new Runnable() {
- @Override
- public void run() {
- scrollView.fullScroll(ScrollView.FOCUS_DOWN);
- }
- });
- }
+ // this may be in the middle of the ringbuffer,
+ // so if we mod by the length of the ringBuffer, we'll get the
+ // "start" of the lines. i.e., the "oldest" line.
+ int start = totalLines - n;
+ if (start < 0) {
+ start = 0;
+ }
- @Override
- protected void onStart() {
- super.onStart();
+ String output = "";
+ for (int i = start; i < totalLines; i++) {
+ // this will get you to the "oldest" line in the ringBuffer
+ int index = i % ringBuffer.length;
+ String currentLine = ringBuffer[index];
+ output += currentLine + "\n";
+ }
- Intent intent = getIntent();
- Serializable extra = intent.getSerializableExtra(FILENAME);
- if(extra != null) {
- filepath = (String) extra;
- }
- runOnUiThread(new Runnable() {
- @Override
- public void run() {
- try {
- String output = readNLines(DEFAULT_NUMBER_OF_LINES);
- Spannable colorized = colorize(output);
- textAdbLogs.setText(colorized);
- } catch (IOException e) {
- RobotLog.e(e.toString());
- textAdbLogs.setText("File not found: " + filepath);
+ // Logcat sometimes duplicates logs, so we can also just read from
+ // the last "--------- beginning" print out.
+ int mostRecentIndex = output.lastIndexOf("--------- beginning");
+ if (mostRecentIndex < 0) {
+ // that string wasn't found, so just return everything
+ return output;
}
- }
- });
- }
-
- public String readNLines(int n) throws IOException {
- File sdcard = Environment.getExternalStorageDirectory();
- File file = new File(filepath);
- BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
- String[] ringBuffer = new String[n];
- int totalLines = 0;
- String line = null;
- // read into the circular buffer, storing only 'n' lines at a time.
- while ((line = bufferedReader.readLine()) != null) {
- ringBuffer[totalLines % ringBuffer.length] = line;
- totalLines++;
- }
+ return output.substring(mostRecentIndex);
- // this may be in the middle of the ringbuffer,
- // so if we mod by the length of the ringBuffer, we'll get the
- // "start" of the lines. i.e., the "oldest" line.
- int start = totalLines - n;
- if (start < 0) {
- start = 0;
}
- String output = "";
- for (int i = start; i < totalLines; i++) {
- // this will get you to the "oldest" line in the ringBuffer
- int index = i % ringBuffer.length;
- String currentLine = ringBuffer[index];
- output += currentLine + "\n";
- }
+ private Spannable colorize(String output) {
+ Spannable span = new SpannableString(output);
+ String[] lines = output.split("\\n");
+ int currentStringIndex = 0;
+ for (String line : lines) {
+ if (line.contains("E/RobotCore") || line.contains(DbgLog.ERROR_PREPEND)) {
+ span.setSpan(new ForegroundColorSpan(Color.RED),
+ currentStringIndex, currentStringIndex + line.length(),
+ Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ }
+ currentStringIndex += line.length();
+ currentStringIndex++; // add for each new line character that we "split" by.
+ }
- // Logcat sometimes duplicates logs, so we can also just read from
- // the last "--------- beginning" print out.
- int mostRecentIndex = output.lastIndexOf("--------- beginning");
- if (mostRecentIndex < 0) {
- // that string wasn't found, so just return everything
- return output;
- }
- return output.substring(mostRecentIndex);
-
- }
-
- private Spannable colorize(String output) {
- Spannable span = new SpannableString(output);
- String[] lines = output.split("\\n");
- int currentStringIndex = 0;
- for (String line : lines) {
- if (line.contains("E/RobotCore") || line.contains(DbgLog.ERROR_PREPEND)) {
- span.setSpan(new ForegroundColorSpan(Color.RED),
- currentStringIndex, currentStringIndex + line.length(),
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- }
- currentStringIndex += line.length();
- currentStringIndex++; // add for each new line character that we "split" by.
+ return span;
}
-
- return span;
- }
}
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/AutoRotateOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/AutoRotateOp.java
index 06c3987..3ad0ed2 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/AutoRotateOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/AutoRotateOp.java
@@ -31,12 +31,14 @@
package com.qualcomm.ftcrobotcontroller.opmodes;
import com.qualcomm.ftccommon.DbgLog;
+import com.qualcomm.ftcrobotcontroller.opmodes.annt.RunnableOpMode;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.hardware.CompassSensor;
import com.qualcomm.robotcore.hardware.DcMotor;
+@RunnableOpMode(AutoRotateOp.NAME)
public class AutoRotateOp extends OpMode {
-
+ public static final String NAME = "";
// we will consider our goal reached if we are +/- ERROR_MARGIN degrees
final static double ERROR_MARGIN = 5.0; // in degrees
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/EmptyOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/EmptyOp.java
index 88f22b9..931a277 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/EmptyOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/EmptyOp.java
@@ -1,6 +1,10 @@
package com.qualcomm.ftcrobotcontroller.opmodes;
+import android.util.Log;
+
+import com.qualcomm.ftccommon.DbgLog;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
+import com.qualcomm.robotcore.util.RobotLog;
/**
* An empty op mode serving as a template for custom OpModes
@@ -16,17 +20,16 @@ public EmptyOp() {
/*
* Code to run when the op mode is first enabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
-
}
/*
* This method will be called repeatedly in a loop
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#loop()
*/
@Override
public void loop() {
@@ -35,7 +38,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9AutoTime.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9AutoTime.java
index d3eef97..de2eae9 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9AutoTime.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9AutoTime.java
@@ -40,7 +40,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* Example autonomous program.
*
* This example program uses elapsed time to determine how to move the robot.
- * The OpMode.java class has some class members that provide time information
+ * The RunnableOpMode.java class has some class members that provide time information
* for the current op mode.
* The public member variable 'time' is updated before each call to the run() event.
* The method getRunTime() returns the time that has elapsed since the op mode
@@ -71,7 +71,7 @@ public K9AutoTime() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -116,7 +116,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -182,7 +182,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9IrSeeker.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9IrSeeker.java
index f9b0623..b388994 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9IrSeeker.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9IrSeeker.java
@@ -65,7 +65,7 @@ public K9IrSeeker() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -107,7 +107,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -203,7 +203,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9Line.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9Line.java
index 125c8c3..ae182eb 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9Line.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9Line.java
@@ -66,7 +66,7 @@ public K9Line() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -111,7 +111,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -174,7 +174,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TankDrive.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TankDrive.java
index f61bfd4..8693b2f 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TankDrive.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TankDrive.java
@@ -81,7 +81,7 @@ public K9TankDrive() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -116,7 +116,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -206,7 +206,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TeleOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TeleOp.java
index f212705..ba0e88b 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TeleOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/K9TeleOp.java
@@ -81,7 +81,7 @@ public K9TeleOp() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -118,7 +118,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -201,7 +201,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NullOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NullOp.java
index 40d362b..c88fc7e 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NullOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NullOp.java
@@ -57,7 +57,7 @@ public NullOp() {
/*
* Code to run when the op mode is first enabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -67,7 +67,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#loop()
*/
@Override
public void loop() {
@@ -77,7 +77,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtEncoderOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtEncoderOp.java
index b1e15db..1400bc0 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtEncoderOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtEncoderOp.java
@@ -80,7 +80,7 @@ public NxtEncoderOp() {
/*
* Code to run when the op mode is first enabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -106,7 +106,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#loop()
*/
@Override
public void loop() {
@@ -218,7 +218,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtTeleOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtTeleOp.java
index 2411f5a..1c7a59a 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtTeleOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NxtTeleOp.java
@@ -75,7 +75,7 @@ public NxtTeleOp() {
/*
* Code to run when the op mode is first enabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -102,7 +102,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#loop()
*/
@Override
public void loop() {
@@ -249,7 +249,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestLineOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestLineOp.java
index e71a907..3cd0773 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestLineOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestLineOp.java
@@ -66,7 +66,7 @@ public TestLineOp() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -93,7 +93,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -152,7 +152,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestOp.java
index b74b767..6662771 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestOp.java
@@ -67,7 +67,7 @@ public TestOp() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -93,7 +93,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -126,7 +126,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestTankOp.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestTankOp.java
index 74de49c..4e16470 100644
--- a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestTankOp.java
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/TestTankOp.java
@@ -58,7 +58,7 @@ public TestTankOp() {
/*
* Code to run when the op mode is first enabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#start()
*/
@Override
public void start() {
@@ -83,7 +83,7 @@ public void start() {
/*
* This method will be called repeatedly in a loop
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#run()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#run()
*/
@Override
public void loop() {
@@ -124,7 +124,7 @@ public void loop() {
/*
* Code to run when the op mode is first disabled goes here
*
- * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#stop()
+ * @see com.qualcomm.robotcore.eventloop.opmode.RunnableOpMode#stop()
*/
@Override
public void stop() {
diff --git a/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/annt/RunnableOpMode.java b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/annt/RunnableOpMode.java
new file mode 100644
index 0000000..c91a9a4
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/annt/RunnableOpMode.java
@@ -0,0 +1,19 @@
+package com.qualcomm.ftcrobotcontroller.opmodes.annt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * The ActiveOpMode annotation is used to specify that an op mode should be registered
+ * for display on the driver station.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RunnableOpMode {
+ /**
+ * The name of the op mode.
+ * This is displayed on the driver station.
+ */
+ String value();
+}
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/Server.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/Server.java
new file mode 100644
index 0000000..3128e12
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/Server.java
@@ -0,0 +1,121 @@
+package org.ftccommunity.simulator;
+
+import com.qualcomm.robotcore.util.RobotLog;
+
+import org.ftccommunity.simulator.net.decoders.Decoder;
+import org.ftccommunity.simulator.net.encoder.MessageEncoder;
+import org.ftccommunity.simulator.net.handler.ServerHandler;
+
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import java.util.Enumeration;
+
+import io.netty.bootstrap.ServerBootstrap;
+import io.netty.buffer.PooledByteBufAllocator;
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelFuture;
+import io.netty.channel.ChannelInitializer;
+import io.netty.channel.ChannelOption;
+import io.netty.channel.EventLoopGroup;
+import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.channel.socket.SocketChannel;
+import io.netty.channel.socket.nio.NioServerSocketChannel;
+import io.netty.handler.timeout.IdleStateHandler;
+
+/**
+ * Discards any incoming data.
+ */
+public class Server implements Runnable {
+ private int port;
+ private Channel channel;
+ private EventLoopGroup bossGroup = new NioEventLoopGroup(1); // (1)
+ private EventLoopGroup workerGroup = new NioEventLoopGroup(2);
+
+ public Server(int port) {
+ this.port = port;
+ }
+
+ public void run() {
+
+ try {
+ ServerBootstrap b = new ServerBootstrap(); // (2)
+ b.group(bossGroup, workerGroup)
+ .channel(NioServerSocketChannel.class) // (3)
+ .childHandler(new ChannelInitializer() { // (4)
+ @Override
+ public void initChannel(SocketChannel ch) throws Exception {
+ ch.pipeline().addLast(new IdleStateHandler(1, 1, 2), new MessageEncoder(), new Decoder(),
+ new ServerHandler());
+ }
+ })
+ // .option(ChannelOption.SO_BACKLOG, 64) // (5)
+ .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)
+ .childOption(ChannelOption.WRITE_BUFFER_HIGH_WATER_MARK, 32 * 1024)
+ .childOption(ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, 8 * 1024)
+ .childOption(ChannelOption.SO_KEEPALIVE, true); // (6)
+
+
+
+ // Log all IP addresses
+ try {
+ Enumeration interfaces = NetworkInterface.getNetworkInterfaces();
+ while (interfaces.hasMoreElements()){
+ NetworkInterface current = interfaces.nextElement();
+ RobotLog.i(current.toString());
+ if (!current.isUp() || current.isLoopback() || current.isVirtual()) continue;
+ Enumeration addresses = current.getInetAddresses();
+ while (addresses.hasMoreElements()){
+ InetAddress current_addr = addresses.nextElement();
+ if (current_addr.isLoopbackAddress()) continue;
+ RobotLog.i(current_addr.getHostAddress());
+ }
+ }
+ } catch (SocketException e) {
+ RobotLog.e(e.toString());
+ }
+
+ ChannelFuture f = null;
+ try {
+ RobotLog.w("Starting Server on " + port + "@" + InetAddress.getLocalHost().getHostAddress());
+ // Bind and start to accept incoming connections.
+ f = b.bind(port).sync();
+ channel = f.channel();
+ channel.closeFuture().sync();
+
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ } catch (UnknownHostException e) {
+ RobotLog.e("Something Bad happened " + e.toString());
+ }
+ // Wait until the server socket is closed.
+ // You can do this to gracefully
+ // shut down your server.
+
+ } finally {
+ workerGroup.shutdownGracefully();
+ bossGroup.shutdownGracefully();
+ RobotLog.i("Shutdown Server");
+ }
+ }
+
+ public void stop() {
+ workerGroup.shutdownGracefully();
+ bossGroup.shutdownGracefully();
+ RobotLog.i("Shutdown Server");
+ }
+
+
+ public void fireEvent(Events event) {
+ if (channel != null) {
+ channel.pipeline().fireUserEventTriggered(event);
+ }
+ }
+
+ public enum Events {
+ CMD_READ,
+ CMD_WRITE,
+ CMD_HEARTBEAT
+ }
+}
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/NetworkManager.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/NetworkManager.java
new file mode 100644
index 0000000..612bdb1
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/NetworkManager.java
@@ -0,0 +1,320 @@
+package org.ftccommunity.simulator.net;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothServerSocket;
+import android.bluetooth.BluetoothSocket;
+import android.support.annotation.Nullable;
+import android.util.Log;
+
+import com.google.common.base.Charsets;
+import com.google.common.collect.LinkedListMultimap;
+import com.qualcomm.robotcore.util.RobotLog;
+
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+import org.ftccommunity.simulator.net.tasks.HeartbeatTask;
+import org.jetbrains.annotations.NotNull;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+public class NetworkManager {
+ private static final ConcurrentLinkedQueue receivedQueue = new ConcurrentLinkedQueue<>();
+ private static final LinkedListMultimap main = LinkedListMultimap.create();
+ private static final ConcurrentLinkedQueue sendingQueue = new ConcurrentLinkedQueue<>();
+ private static boolean serverWorking;
+
+ public NetworkManager(NetworkTypes type) {
+ if (type == NetworkTypes.BLUETOOTH) {
+ BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+ adapter.startDiscovery();
+ while (BluetoothAdapter.getDefaultAdapter().isDiscovering()) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ LinkedList devices = new LinkedList<>(BluetoothAdapter.getDefaultAdapter().getBondedDevices());
+ BluetoothDevice main;
+ for (BluetoothDevice device : devices) {
+ RobotLog.i(device.toString());
+ }
+ if (devices.size() > 0) {
+ main = devices.getLast();
+ } else {
+ throw new IllegalStateException("No bonded devices found, but bluetooth mode is enabled");
+ }
+ UUID bluetoothUuid = UUID.randomUUID();
+ BluetoothServerSocket socket = null;
+ RobotLog.w("Use the following UUID to connect " + bluetoothUuid.toString());
+ try {
+ socket = adapter.listenUsingRfcommWithServiceRecord("FTC_Sim", bluetoothUuid);
+ } catch (IOException e) {
+ RobotLog.e(e.toString());
+ }
+ if (socket == null) {
+ throw new NullPointerException("Socket never got initialized");
+ }
+ BluetoothSocket mainSocket;
+ try {
+ socket.accept();
+ } catch (IOException e) {
+ RobotLog.e(e.toString());
+ }
+ }
+
+ Thread processThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (!Thread.currentThread().isInterrupted()) {
+ processQueue();
+ }
+ }
+ }, "Process Queue");
+ processThread.start();
+ }
+
+ public static void add(@NotNull SimulatorData.Data data) {
+ synchronized (receivedQueue) {
+ receivedQueue.add(data);
+ }
+ }
+
+ public synchronized static void processQueue() {
+ while (receivedQueue.size() < 1) {
+ try {
+ Thread.sleep(10);
+ Thread.yield();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ ConcurrentLinkedQueue temp = new ConcurrentLinkedQueue<>();
+ // Move the contents over to an new queue
+ synchronized (receivedQueue) {
+ temp.addAll(receivedQueue);
+ receivedQueue.clear();
+ }
+
+ // Flip the old moved data into a new container
+ LinkedList tempB = new LinkedList<>();
+ while (!temp.isEmpty()) {
+ tempB.add(temp.poll());
+ }
+ temp.clear();
+
+ // Then, add the flipped data so the oldest gets processed first
+ while (!tempB.isEmpty()) {
+ SimulatorData.Data data = tempB.poll();
+ main.put(data.getType().getType(), data);
+ }
+ tempB.clear();
+ }
+
+ public static boolean isServerWorking() {
+ return serverWorking;
+ }
+
+ public static void setServerWorking(boolean serverWorking) {
+ NetworkManager.serverWorking = serverWorking;
+ }
+
+ public static SimulatorData.Data[] getWriteData() {
+ SimulatorData.Data[] datas;
+ synchronized (sendingQueue) {
+ if (sendingQueue.size() > 0) {
+ datas = sendingQueue.toArray(new SimulatorData.Data[sendingQueue.size()]);
+ sendingQueue.clear();
+ } else {
+ datas = new SimulatorData.Data[1];
+ datas[0] = HeartbeatTask.buildMessage();
+ }
+ }
+
+ return datas;
+ }
+
+ /**
+ * Returns the latest message recieved by the software
+ * @param type type of message that is returned
+ * @param block do we need to want for data, or just get whatever there is (including nothing)
+ * @param cache do we want to cache the data (in case we need it again)
+ * @return the last message recieved by the software of specific type
+ * @throws InterruptedException
+ */
+ public static SimulatorData.Data getLatestMessage(@NotNull SimulatorData.Type.Types type,
+ boolean block, boolean cache) throws InterruptedException {
+ if (block) {
+ while (!Thread.currentThread().isInterrupted()) {
+ if (main.get(type).size() > 0) { // Check if we can something
+ break;
+ } else {
+ try {
+ Thread.sleep(10); // Good time to take a nap
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new InterruptedException();
+ }
+ }
+ } // End while
+ }
+ synchronized (main) {
+ if (cache) {
+ SimulatorData.Data data = main.get(type).get(main.get(type).size() - 1);
+ if (data == null) {
+ return null;
+ }
+
+ // Cleanout the rest, since they should never be used, and put the cached message back in.
+ clear(type);
+ main.put(type, data);
+ return data;
+ } else {
+ SimulatorData.Data data = main.get(type).remove(main.get(type).size() - 1);
+ if (data == null) {
+ return null;
+ }
+ return data;
+ }
+ }
+ }
+
+ public static byte[] getLatestData(@NotNull SimulatorData.Type.Types type, boolean block) throws InterruptedException {
+ SimulatorData.Data data = getLatestMessage(type, block, false);
+ if (data == null) {
+ return null;
+ }
+ return data.getInfo(0).getBytes(Charsets.US_ASCII);
+ }
+
+ public static byte[] getLatestData(@NotNull SimulatorData.Type.Types type, boolean block, boolean cache) throws InterruptedException {
+ SimulatorData.Data data = getLatestMessage(type, block, cache);
+ if (data == null) {
+ return null;
+ }
+ return data.getInfo(0).getBytes(Charsets.US_ASCII);
+ }
+
+ public static void clear(SimulatorData.Type.Types type) {
+ main.get(type).clear();
+ }
+
+ public static void requestSend(SimulatorData.Type.Types type, SimulatorData.Data.Modules module, byte[] data) {
+ SimulatorData.Data.Builder sendDataBuilder = SimulatorData.Data.newBuilder();
+ sendDataBuilder.setType(SimulatorData.Type.newBuilder().setType(type).build())
+ .setModule(module)
+ .addInfo(new String(data, Charsets.US_ASCII));
+ sendingQueue.add(sendDataBuilder.build());
+ Log.d("SIM_NETWORK_MANAGER::", "Adding a data of type: " +
+ type.getValueDescriptor().getName());
+ }
+
+ /**
+ * Gets the next data to send
+ *
+ * @return the next data to send
+ */
+ @Nullable
+ public static SimulatorData.Data getNextSend() {
+ if (sendingQueue.size() > 100) {
+ ConcurrentLinkedQueue temp = new ConcurrentLinkedQueue<>();
+ synchronized (sendingQueue) {
+ for (int i = sendingQueue.size() - 1; i > sendingQueue.size() / 2; i--) {
+ temp.add(sendingQueue.poll());
+ }
+ sendingQueue.clear();
+ sendingQueue.addAll(temp);
+ }
+ }
+
+ if (sendingQueue.size() > 0) {
+ synchronized (sendingQueue) {
+ return sendingQueue.poll();
+ }
+ } else {
+ return null;
+ //return HeartbeatTask.buildMessage();
+ }
+ }
+
+ /**
+ * Rertrieve the next datas to send
+ *
+ * @return an array of the entire sending queue
+ */
+ public static SimulatorData.Data[] getNextSends() {
+ return getNextSends(sendingQueue.size());
+ }
+
+ /**
+ * Rertieve an the next datas to send based on a specificed amount
+ *
+ * @param size the maximum, inclusive size of the data array
+ * @return a data array of the next datas to send up to a limit
+ */
+ public static SimulatorData.Data[] getNextSends(int size) {
+ return getNextSends(size, true);
+ }
+
+ /**
+ * Retrieve an array of the next datas to send up to a specific size
+ *
+ * @param size the maximum size of the returned array
+ * @param autoShrink if true this automatically adjusts the size returned
+ * @return a data array of the next datas to send
+ */
+ public synchronized static SimulatorData.Data[] getNextSends(final int size,
+ final boolean autoShrink) {
+ int currentSize = size;
+ if (currentSize <= sendingQueue.size() / 2) {
+ cleanup();
+ }
+
+ if (size > sendingQueue.size() && !autoShrink) {
+ throw new IndexOutOfBoundsException("Size is bigger then sending queue");
+ }
+
+ if (autoShrink) {
+ if (size > sendingQueue.size()) {
+ currentSize = sendingQueue.size();
+ }
+ }
+
+
+ SimulatorData.Data[] datas = new SimulatorData.Data[currentSize];
+ synchronized (sendingQueue) {
+ for (int i = 0; i < datas.length; i++) {
+ datas[i] = sendingQueue.poll();
+ }
+ }
+
+ return datas;
+ }
+
+ /**
+ * Cleanup the sending queue
+ */
+ private synchronized static void cleanup() {
+ if (sendingQueue.size() > 100) {
+ ConcurrentLinkedQueue temp = new ConcurrentLinkedQueue<>();
+ synchronized (sendingQueue) {
+ for (int i = sendingQueue.size() - 1; i > sendingQueue.size() / 2; i--) {
+ temp.add(sendingQueue.poll());
+ sendingQueue.clear();
+ }
+ sendingQueue.addAll(temp);
+ }
+ }
+ }
+
+ public enum NetworkTypes {
+ BLUETOOTH,
+ USB,
+ WIFI
+ }
+}
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/decoders/Decoder.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/decoders/Decoder.java
new file mode 100644
index 0000000..c70cd3b
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/decoders/Decoder.java
@@ -0,0 +1,43 @@
+package org.ftccommunity.simulator.net.decoders;
+
+import android.util.Log;
+
+import com.google.protobuf.InvalidProtocolBufferException;
+
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import java.util.List;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.handler.codec.ByteToMessageDecoder;
+
+
+public class Decoder extends ByteToMessageDecoder { // (1)
+ @Override
+ protected void decode(io.netty.channel.ChannelHandlerContext ctx, ByteBuf in, List out) { // (2)
+ final String TAG = "SERVER_H::";
+ long size;
+ if (in.readableBytes() < 4) {
+ return;
+ } else {
+ size = in.readUnsignedInt();
+ }
+
+ if (in.readableBytes() < size) {
+ return;
+ }
+
+ SimulatorData.Data test;
+ try {
+ test = SimulatorData.Data.parseFrom(in.readBytes((int) size).array());
+ out.add(test);
+ if (test.getType().getType() != SimulatorData.Type.Types.HEARTBEAT) {
+ Log.d("SIM_NETWORKING::", "Decoded data type " +
+ test.getType().getType().toString());
+ }
+ } catch (InvalidProtocolBufferException e) {
+ Log.w(TAG, "An attempt to decode an otherwise valid packet failed", e);
+ }
+ }
+}
+
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/encoder/MessageEncoder.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/encoder/MessageEncoder.java
new file mode 100644
index 0000000..1e2f55d
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/encoder/MessageEncoder.java
@@ -0,0 +1,35 @@
+package org.ftccommunity.simulator.net.encoder;
+
+import android.util.Log;
+
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.handler.codec.MessageToByteEncoder;
+
+public class MessageEncoder extends MessageToByteEncoder {
+ public MessageEncoder() {
+ super(false);
+ }
+
+ @Override
+ protected void encode(ChannelHandlerContext channelHandlerContext,
+ SimulatorData.Data msg, ByteBuf out) throws Exception {
+ int length = msg.getSerializedSize();
+ out.writeInt(length);
+ out.ensureWritable(length);
+ final int offset = out.arrayOffset() + out.writerIndex();
+ final byte[] array = out.array();
+ out.writerIndex(out.writerIndex() + encode(msg, array, offset, length));
+ if (msg.getType().getType() != SimulatorData.Type.Types.HEARTBEAT) {
+ Log.d("SIM_NETWORKING::", "Encoded data type " +
+ msg.getType().getType().toString());
+ }
+ }
+
+ private int encode(final SimulatorData.Data msg, byte[] array, final int offset, final int length) {
+ System.arraycopy(msg.toByteArray(), 0, array, offset, length);
+ return length;
+ }
+}
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/handler/HeartbeatHandler.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/handler/HeartbeatHandler.java
new file mode 100644
index 0000000..a3d29e4
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/handler/HeartbeatHandler.java
@@ -0,0 +1,29 @@
+package org.ftccommunity.simulator.net.handler;
+
+import android.util.Log;
+
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelInboundHandlerAdapter;
+
+public class HeartbeatHandler extends ChannelInboundHandlerAdapter {
+ @Override
+ public void channelRead(ChannelHandlerContext ctx, Object msg) {
+ SimulatorData.Data data = (SimulatorData.Data) msg;
+ if (data.getType().getType() == SimulatorData.Type.Types.HEARTBEAT) {
+ Log.i("HeartbeatHandler:: ", "Got HEARTBEAT!");
+ }
+ }
+
+ @Override
+ public void channelReadComplete(ChannelHandlerContext ctx) {
+ ctx.flush();
+ }
+
+ @Override
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
+ cause.printStackTrace();
+ ctx.close();
+ }
+}
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/handler/ServerHandler.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/handler/ServerHandler.java
new file mode 100644
index 0000000..17b0f4c
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/handler/ServerHandler.java
@@ -0,0 +1,104 @@
+package org.ftccommunity.simulator.net.handler;
+
+import org.ftccommunity.simulator.net.NetworkManager;
+import com.google.common.base.Charsets;
+import com.qualcomm.robotcore.util.RobotLog;
+
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+import org.ftccommunity.simulator.net.tasks.HeartbeatTask;
+
+import java.io.IOException;
+import java.net.SocketException;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelInboundHandlerAdapter;
+import io.netty.handler.timeout.IdleState;
+import io.netty.handler.timeout.IdleStateEvent;
+
+public class ServerHandler extends ChannelInboundHandlerAdapter {
+ @Override
+ public void channelRead(ChannelHandlerContext ctx, Object msg) { // (2)
+ SimulatorData.Data receiveData = (SimulatorData.Data) msg;
+ // We don't need to queue heartbearts (HEARTBEAT), just reply back
+ if (receiveData.getType().getType() != SimulatorData.Type.Types.HEARTBEAT) {
+ NetworkManager.add(receiveData);
+ }
+
+ while (ctx.channel().isWritable()) {
+ SimulatorData.Data data = NetworkManager.getNextSend();
+ if (data != null) {
+ ctx.write(data);
+ } else {
+ break;
+ }
+ }/*// Write and send the data according to protocol (send size of data then the data itself)
+ final SimulatorData.Data[] writeData = NetworkManager.getWriteData();
+ for (SimulatorData.Data data : writeData) {
+ writeMessage(ctx.channel(), data);
+ }*/
+ }
+
+ @Override
+ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
+ if (evt instanceof IdleStateEvent) {
+ IdleStateEvent e = (IdleStateEvent) evt;
+ if (e.state() == IdleState.WRITER_IDLE ||
+ e.state() == IdleState.READER_IDLE ||
+ e.state() == IdleState.ALL_IDLE) {
+ ctx.writeAndFlush(HeartbeatTask.buildMessage());
+ }
+ }
+ }
+
+ @Override
+ public void channelReadComplete(ChannelHandlerContext ctx) {
+ ctx.flush();
+ }
+
+ @Override
+ public void channelActive(final ChannelHandlerContext ctx) {
+ SimulatorData.Data.Builder dataBuilder = SimulatorData.Data.newBuilder()
+ .setType(SimulatorData.Type.newBuilder().setType(SimulatorData.Type.Types.HEARTBEAT))
+ .setModule(SimulatorData.Data.Modules.LEGACY_CONTROLLER)
+ .setDataName("info")
+ // Completely arbitrary
+ .addInfo(new String(new byte[]{
+ 34, 43, 90, 127, 76, 97
+ }, Charsets.US_ASCII));
+ SimulatorData.Data data = dataBuilder.build();
+ ctx.writeAndFlush(data);
+// final ByteBuf time = ctx.alloc().buffer(4 + data.getSerializedSize());
+// time.writeInt(data.getSerializedSize());
+// time.writeBytes(data.toByteArray());
+
+// ctx.writeAndFlush(time);
+ NetworkManager.setServerWorking(true);
+ }
+
+ @Override
+ public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception {
+ // Write and send the data according to protocol (send size of data then the data itself)
+ while (ctx.channel().isWritable()) {
+ SimulatorData.Data data = NetworkManager.getNextSend();
+ if (data != null) {
+ ctx.write(data);
+ } else {
+ break;
+ }
+ }
+ ctx.flush();
+ }
+
+ @Override
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
+ if (cause instanceof SocketException) {
+ RobotLog.e(cause.toString());
+ } else if (cause instanceof IOException) {
+ RobotLog.e(cause.toString());
+ } else {
+ ctx.close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/protocol/SimulatorData.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/protocol/SimulatorData.java
new file mode 100644
index 0000000..2a13b22
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/protocol/SimulatorData.java
@@ -0,0 +1,4517 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Data.proto
+
+package org.ftccommunity.simulator.net.protocol;
+
+public final class SimulatorData {
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+
+ static {
+ String[] descriptorData = {
+ "\n\nData.proto\022\'org.ftccommunity.simulator" +
+ ".net.protocol\"\204\002\n\004Data\022;\n\004type\030\001 \002(\0132-.o" +
+ "rg.ftccommunity.simulator.net.protocol.T" +
+ "ype\022E\n\006module\030\002 \002(\01625.org.ftccommunity.s" +
+ "imulator.net.protocol.Data.Modules\022\014\n\004in" +
+ "fo\030\003 \003(\t\022\017\n\004port\030\004 \001(\005:\0011\022\022\n\010dataName\030\005 " +
+ "\001(\t:\000\"E\n\007Modules\022\025\n\021LEGACY_CONTROLLER\020\001\022" +
+ "\020\n\014LEGACY_MOTOR\020\002\022\021\n\rLEGACY_SENSOR\020\003\"`\n\r" +
+ "DeviceListOld\022;\n\004type\030\001 \002(\0132-.org.ftccom" +
+ "munity.simulator.net.protocol.Type\022\022\n\nse",
+ "rialized\030\002 \002(\t\"\215\001\n\nDeviceList\022;\n\004type\030\001 " +
+ "\002(\0132-.org.ftccommunity.simulator.net.pro" +
+ "tocol.Type\022B\n\006bricks\030\002 \003(\01322.org.ftccomm" +
+ "unity.simulator.net.protocol.BrickInfo\"g" +
+ "\n\tBrickInfo\022;\n\004type\030\001 \002(\0132-.org.ftccommu" +
+ "nity.simulator.net.protocol.Type\022\r\n\005alia" +
+ "s\030\002 \001(\t\022\016\n\006serial\030\003 \001(\t\"\336\003\n\004Type\022A\n\004type" +
+ "\030\001 \002(\01623.org.ftccommunity.simulator.net." +
+ "protocol.Type.Types\"\222\003\n\005Types\022\010\n\004NONE\020\001\022" +
+ "\020\n\014LEGACY_MOTOR\020\002\022\020\n\014LEGACY_SERVO\020\003\022\020\n\014L",
+ "EGACY_LIGHT\020\004\022\020\n\014LEGACY_TOUCH\020\005\022\r\n\tLEGAC" +
+ "Y_IR\020\006\022\r\n\tUSB_MOTOR\020\007\022\r\n\tUSB_SERVO\020\010\022\r\n\t" +
+ "SENSOR_IR\020\t\022\023\n\017SENSOR_OPT_DIST\020\n\022\020\n\014SENS" +
+ "OR_TOUCH\020\013\022\017\n\013DEVICE_LIST\020\014\022\016\n\nBRICK_INF" +
+ "O\020\r\022\r\n\tHEARTBEAT\020\016\022\024\n\020LEGACY_TILT_ACCL\020\017" +
+ "\022\020\n\014LEGACY_COLOR\020\020\022\017\n\013LEGACY_EOPD\020\021\022\020\n\014L" +
+ "EGACY_FORCE\020\022\022\017\n\013LEGACY_GYRO\020\023\022\014\n\010SIM_DA" +
+ "TA\020\024\022\r\n\tOPT_DATA1\020\025\022\r\n\tOPT_DATA2\020\026\022\r\n\tOP" +
+ "T_DATA3\020\027\022\r\n\tOPT_DATA4\020\030B8\n\'org.ftccommu" +
+ "nity.simulator.net.protocolB\rSimulatorDa",
+ "ta"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor,
+ new String[] { "Type", "Module", "Info", "Port", "DataName", });
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor,
+ new String[] { "Type", "Serialized", });
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor,
+ new String[] { "Type", "Bricks", });
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor,
+ new String[] { "Type", "Alias", "Serial", });
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor,
+ new String[] { "Type", });
+ }
+
+ private SimulatorData() {}
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ public interface DataOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.Data)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ boolean hasModule();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ Data.Modules getModule();
+
+ /**
+ * repeated string info = 3;
+ */
+ com.google.protobuf.ProtocolStringList
+ getInfoList();
+ /**
+ * repeated string info = 3;
+ */
+ int getInfoCount();
+ /**
+ * repeated string info = 3;
+ */
+ String getInfo(int index);
+ /**
+ * repeated string info = 3;
+ */
+ com.google.protobuf.ByteString
+ getInfoBytes(int index);
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ boolean hasPort();
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ int getPort();
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ boolean hasDataName();
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ String getDataName();
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ com.google.protobuf.ByteString
+ getDataNameBytes();
+ }
+ public interface DeviceListOldOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * required string serialized = 2;
+ */
+ boolean hasSerialized();
+ /**
+ * required string serialized = 2;
+ */
+ String getSerialized();
+ /**
+ * required string serialized = 2;
+ */
+ com.google.protobuf.ByteString
+ getSerializedBytes();
+ }
+ public interface DeviceListOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.DeviceList)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ java.util.List
+ getBricksList();
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ BrickInfo getBricks(int index);
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ int getBricksCount();
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ java.util.List extends BrickInfoOrBuilder>
+ getBricksOrBuilderList();
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ BrickInfoOrBuilder getBricksOrBuilder(
+ int index);
+ }
+ public interface BrickInfoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * optional string alias = 2;
+ */
+ boolean hasAlias();
+ /**
+ * optional string alias = 2;
+ */
+ String getAlias();
+ /**
+ * optional string alias = 2;
+ */
+ com.google.protobuf.ByteString
+ getAliasBytes();
+
+ /**
+ * optional string serial = 3;
+ */
+ boolean hasSerial();
+ /**
+ * optional string serial = 3;
+ */
+ String getSerial();
+ /**
+ * optional string serial = 3;
+ */
+ com.google.protobuf.ByteString
+ getSerialBytes();
+ }
+ public interface TypeOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.Type)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ Type.Types getType();
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Data}
+ */
+ public static final class Data extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.Data)
+ DataOrBuilder {
+ public static final int TYPE_FIELD_NUMBER = 1;
+ public static final int MODULE_FIELD_NUMBER = 2;
+ public static final int INFO_FIELD_NUMBER = 3;
+ public static final int PORT_FIELD_NUMBER = 4;
+ public static final int DATANAME_FIELD_NUMBER = 5;
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public Data parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Data(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+ private static final long serialVersionUID = 0L;
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.Data)
+ private static final Data DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Data();
+ }
+
+ private int bitField0_;
+ private Type type_;
+ private int module_;
+ private com.google.protobuf.LazyStringList info_;
+ private int port_;
+ private volatile Object dataName_;
+ private byte memoizedIsInitialized = -1;
+ private int memoizedSerializedSize = -1;
+
+ // Use Data.newBuilder() to construct.
+ private Data(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private Data() {
+ module_ = 1;
+ info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ port_ = 1;
+ dataName_ = "";
+ }
+ private Data(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 16: {
+ int rawValue = input.readEnum();
+ Modules value = Modules.valueOf(rawValue);
+ if (value == null) {
+ unknownFields.mergeVarintField(2, rawValue);
+ } else {
+ bitField0_ |= 0x00000002;
+ module_ = rawValue;
+ }
+ break;
+ }
+ case 26: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ info_.add(bs);
+ break;
+ }
+ case 32: {
+ bitField0_ |= 0x00000004;
+ port_ = input.readInt32();
+ break;
+ }
+ case 42: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000008;
+ dataName_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = info_.getUnmodifiableView();
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ }
+
+ public static Data parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Data parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Data parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Data parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Data parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static Data parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Data parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+
+ public static Data parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+
+ public static Data parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static Data parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Data prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public static Data getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Data.class, Builder.class);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public boolean hasModule() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public Modules getModule() {
+ Modules result = Modules.valueOf(module_);
+ return result == null ? Modules.LEGACY_CONTROLLER : result;
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getInfoList() {
+ return info_;
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public int getInfoCount() {
+ return info_.size();
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public String getInfo(int index) {
+ return info_.get(index);
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ByteString
+ getInfoBytes(int index) {
+ return info_.getByteString(index);
+ }
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public boolean hasPort() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public int getPort() {
+ return port_;
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public boolean hasDataName() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public String getDataName() {
+ Object ref = dataName_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ dataName_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public com.google.protobuf.ByteString
+ getDataNameBytes() {
+ Object ref = dataName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ dataName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasModule()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeEnum(2, module_);
+ }
+ for (int i = 0; i < info_.size(); i++) {
+ output.writeBytes(3, info_.getByteString(i));
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeInt32(4, port_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(5, getDataNameBytes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, module_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < info_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(info_.getByteString(i));
+ }
+ size += dataSize;
+ size += 1 * getInfoList().size();
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(4, port_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5, getDataNameBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ @Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public Data getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ /**
+ * Protobuf enum {@code org.ftccommunity.simulator.net.protocol.Data.Modules}
+ */
+ public enum Modules
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * LEGACY_CONTROLLER = 1;
+ */
+ LEGACY_CONTROLLER(0, 1),
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ LEGACY_MOTOR(1, 2),
+ /**
+ * LEGACY_SENSOR = 3;
+ */
+ LEGACY_SENSOR(2, 3),
+ ;
+
+ /**
+ * LEGACY_CONTROLLER = 1;
+ */
+ public static final int LEGACY_CONTROLLER_VALUE = 1;
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ public static final int LEGACY_MOTOR_VALUE = 2;
+ /**
+ * LEGACY_SENSOR = 3;
+ */
+ public static final int LEGACY_SENSOR_VALUE = 3;
+ private static final Modules[] VALUES = values();
+ private static com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public Modules findValueByNumber(int number) {
+ return Modules.valueOf(number);
+ }
+ };
+ private final int index;
+ private final int value;
+
+ Modules(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ public static Modules valueOf(int value) {
+ switch (value) {
+ case 1: return LEGACY_CONTROLLER;
+ case 2: return LEGACY_MOTOR;
+ case 3: return LEGACY_SENSOR;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return Data.getDescriptor().getEnumTypes().get(0);
+ }
+
+ public static Modules valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ public final int getNumber() {
+ return value;
+ }
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ // @@protoc_insertion_point(enum_scope:org.ftccommunity.simulator.net.protocol.Data.Modules)
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Data}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.Data)
+ DataOrBuilder {
+ private int bitField0_;
+ private Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder> typeBuilder_;
+ private int module_ = 1;
+ private com.google.protobuf.LazyStringList info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private int port_ = 1;
+ private Object dataName_ = "";
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.Data.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Data.class, Builder.class);
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ module_ = 1;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ port_ = 1;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ dataName_ = "";
+ bitField0_ = (bitField0_ & ~0x00000010);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ }
+
+ public Data getDefaultInstanceForType() {
+ return Data.getDefaultInstance();
+ }
+
+ public Data build() {
+ Data result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Data buildPartial() {
+ Data result = new Data(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.module_ = module_;
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = info_.getUnmodifiableView();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.info_ = info_;
+ if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.port_ = port_;
+ if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+ to_bitField0_ |= 0x00000008;
+ }
+ result.dataName_ = dataName_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof Data) {
+ return mergeFrom((Data)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Data other) {
+ if (other == Data.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasModule()) {
+ setModule(other.getModule());
+ }
+ if (!other.info_.isEmpty()) {
+ if (info_.isEmpty()) {
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureInfoIsMutable();
+ info_.addAll(other.info_);
+ }
+ onChanged();
+ }
+ if (other.hasPort()) {
+ setPort(other.getPort());
+ }
+ if (other.hasDataName()) {
+ bitField0_ |= 0x00000010;
+ dataName_ = other.dataName_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!hasModule()) {
+ return false;
+ }
+ return getType().isInitialized();
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ Data parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Data) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != Type.getDefaultInstance()) {
+ type_ =
+ Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ Type.getDefaultInstance() : type_;
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public boolean hasModule() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public Modules getModule() {
+ Modules result = Modules.valueOf(module_);
+ return result == null ? Modules.LEGACY_CONTROLLER : result;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public Builder setModule(Modules value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ module_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public Builder clearModule() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ module_ = 1;
+ onChanged();
+ return this;
+ }
+
+ private void ensureInfoIsMutable() {
+ if (!((bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = new com.google.protobuf.LazyStringArrayList(info_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getInfoList() {
+ return info_.getUnmodifiableView();
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public int getInfoCount() {
+ return info_.size();
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public String getInfo(int index) {
+ return info_.get(index);
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ByteString
+ getInfoBytes(int index) {
+ return info_.getByteString(index);
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public Builder setInfo(
+ int index, String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.set(index, value);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public Builder addInfo(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public Builder addAllInfo(
+ Iterable values) {
+ ensureInfoIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, info_);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public Builder clearInfo() {
+ info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * repeated string info = 3;
+ */
+ public Builder addInfoBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public boolean hasPort() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public int getPort() {
+ return port_;
+ }
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public Builder setPort(int value) {
+ bitField0_ |= 0x00000008;
+ port_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public Builder clearPort() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ port_ = 1;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public boolean hasDataName() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public String getDataName() {
+ Object ref = dataName_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ dataName_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public Builder setDataName(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ dataName_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public com.google.protobuf.ByteString
+ getDataNameBytes() {
+ Object ref = dataName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ dataName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public Builder setDataNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ dataName_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public Builder clearDataName() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ dataName_ = getDefaultInstance().getDataName();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.Data)
+ }
+
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceListOld}
+ */
+ public static final class DeviceListOld extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ DeviceListOldOrBuilder {
+ public static final int TYPE_FIELD_NUMBER = 1;
+ public static final int SERIALIZED_FIELD_NUMBER = 2;
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public DeviceListOld parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new DeviceListOld(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+ private static final long serialVersionUID = 0L;
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ private static final DeviceListOld DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new DeviceListOld();
+ }
+
+ private int bitField0_;
+ private Type type_;
+ private volatile Object serialized_;
+ private byte memoizedIsInitialized = -1;
+ private int memoizedSerializedSize = -1;
+ // Use DeviceListOld.newBuilder() to construct.
+ private DeviceListOld(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+
+ private DeviceListOld() {
+ serialized_ = "";
+ }
+ private DeviceListOld(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ serialized_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ }
+
+ public static DeviceListOld parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static DeviceListOld parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static DeviceListOld parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static DeviceListOld parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static DeviceListOld parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static DeviceListOld parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static DeviceListOld parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+
+ public static DeviceListOld parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+
+ public static DeviceListOld parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static DeviceListOld parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(DeviceListOld prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public static DeviceListOld getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ DeviceListOld.class, Builder.class);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public boolean hasSerialized() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public String getSerialized() {
+ Object ref = serialized_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serialized_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public com.google.protobuf.ByteString
+ getSerializedBytes() {
+ Object ref = serialized_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ serialized_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasSerialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getSerializedBytes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getSerializedBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ @Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public DeviceListOld getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceListOld}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ DeviceListOldOrBuilder {
+ private int bitField0_;
+ private Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder> typeBuilder_;
+ private Object serialized_ = "";
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ DeviceListOld.class, Builder.class);
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ serialized_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ }
+
+ public DeviceListOld getDefaultInstanceForType() {
+ return DeviceListOld.getDefaultInstance();
+ }
+
+ public DeviceListOld build() {
+ DeviceListOld result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public DeviceListOld buildPartial() {
+ DeviceListOld result = new DeviceListOld(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.serialized_ = serialized_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof DeviceListOld) {
+ return mergeFrom((DeviceListOld)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(DeviceListOld other) {
+ if (other == DeviceListOld.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasSerialized()) {
+ bitField0_ |= 0x00000002;
+ serialized_ = other.serialized_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!hasSerialized()) {
+ return false;
+ }
+ return getType().isInitialized();
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ DeviceListOld parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (DeviceListOld) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != Type.getDefaultInstance()) {
+ type_ =
+ Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ Type.getDefaultInstance() : type_;
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public boolean hasSerialized() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public String getSerialized() {
+ Object ref = serialized_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serialized_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public Builder setSerialized(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ serialized_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public com.google.protobuf.ByteString
+ getSerializedBytes() {
+ Object ref = serialized_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ serialized_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public Builder setSerializedBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ serialized_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * required string serialized = 2;
+ */
+ public Builder clearSerialized() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ serialized_ = getDefaultInstance().getSerialized();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ }
+
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceList}
+ */
+ public static final class DeviceList extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.DeviceList)
+ DeviceListOrBuilder {
+ public static final int TYPE_FIELD_NUMBER = 1;
+ public static final int BRICKS_FIELD_NUMBER = 2;
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public DeviceList parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new DeviceList(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+ private static final long serialVersionUID = 0L;
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.DeviceList)
+ private static final DeviceList DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new DeviceList();
+ }
+
+ private int bitField0_;
+ private Type type_;
+ private java.util.List bricks_;
+ private byte memoizedIsInitialized = -1;
+ private int memoizedSerializedSize = -1;
+ // Use DeviceList.newBuilder() to construct.
+ private DeviceList(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+
+ private DeviceList() {
+ bricks_ = java.util.Collections.emptyList();
+ }
+ private DeviceList(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ bricks_.add(input.readMessage(BrickInfo.PARSER, extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = java.util.Collections.unmodifiableList(bricks_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ }
+
+ public static DeviceList parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static DeviceList parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static DeviceList parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static DeviceList parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static DeviceList parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static DeviceList parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static DeviceList parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+
+ public static DeviceList parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+
+ public static DeviceList parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static DeviceList parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(DeviceList prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public static DeviceList getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ DeviceList.class, Builder.class);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List getBricksList() {
+ return bricks_;
+ }
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List extends BrickInfoOrBuilder>
+ getBricksOrBuilderList() {
+ return bricks_;
+ }
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public int getBricksCount() {
+ return bricks_.size();
+ }
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfo getBricks(int index) {
+ return bricks_.get(index);
+ }
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfoOrBuilder getBricksOrBuilder(
+ int index) {
+ return bricks_.get(index);
+ }
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ for (int i = 0; i < getBricksCount(); i++) {
+ if (!getBricks(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ for (int i = 0; i < bricks_.size(); i++) {
+ output.writeMessage(2, bricks_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ for (int i = 0; i < bricks_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, bricks_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ @Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public DeviceList getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceList}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.DeviceList)
+ DeviceListOrBuilder {
+ private int bitField0_;
+ private Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder> typeBuilder_;
+ private java.util.List bricks_ =
+ java.util.Collections.emptyList();
+ private com.google.protobuf.RepeatedFieldBuilder<
+ BrickInfo, BrickInfo.Builder, BrickInfoOrBuilder> bricksBuilder_;
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ DeviceList.class, Builder.class);
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ getBricksFieldBuilder();
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (bricksBuilder_ == null) {
+ bricks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ bricksBuilder_.clear();
+ }
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ }
+
+ public DeviceList getDefaultInstanceForType() {
+ return DeviceList.getDefaultInstance();
+ }
+
+ public DeviceList build() {
+ DeviceList result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public DeviceList buildPartial() {
+ DeviceList result = new DeviceList(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (bricksBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = java.util.Collections.unmodifiableList(bricks_);
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.bricks_ = bricks_;
+ } else {
+ result.bricks_ = bricksBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof DeviceList) {
+ return mergeFrom((DeviceList)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(DeviceList other) {
+ if (other == DeviceList.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (bricksBuilder_ == null) {
+ if (!other.bricks_.isEmpty()) {
+ if (bricks_.isEmpty()) {
+ bricks_ = other.bricks_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureBricksIsMutable();
+ bricks_.addAll(other.bricks_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.bricks_.isEmpty()) {
+ if (bricksBuilder_.isEmpty()) {
+ bricksBuilder_.dispose();
+ bricksBuilder_ = null;
+ bricks_ = other.bricks_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ bricksBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getBricksFieldBuilder() : null;
+ } else {
+ bricksBuilder_.addAllMessages(other.bricks_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ return false;
+ }
+ for (int i = 0; i < getBricksCount(); i++) {
+ if (!getBricks(i).isInitialized()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ DeviceList parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (DeviceList) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != Type.getDefaultInstance()) {
+ type_ =
+ Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ Type.getDefaultInstance() : type_;
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private void ensureBricksIsMutable() {
+ if (!((bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = new java.util.ArrayList(bricks_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List getBricksList() {
+ if (bricksBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(bricks_);
+ } else {
+ return bricksBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public int getBricksCount() {
+ if (bricksBuilder_ == null) {
+ return bricks_.size();
+ } else {
+ return bricksBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfo getBricks(int index) {
+ if (bricksBuilder_ == null) {
+ return bricks_.get(index);
+ } else {
+ return bricksBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder setBricks(
+ int index, BrickInfo value) {
+ if (bricksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBricksIsMutable();
+ bricks_.set(index, value);
+ onChanged();
+ } else {
+ bricksBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder setBricks(
+ int index, BrickInfo.Builder builderForValue) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ bricksBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(BrickInfo value) {
+ if (bricksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBricksIsMutable();
+ bricks_.add(value);
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(
+ int index, BrickInfo value) {
+ if (bricksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBricksIsMutable();
+ bricks_.add(index, value);
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(
+ BrickInfo.Builder builderForValue) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.add(builderForValue.build());
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(
+ int index, BrickInfo.Builder builderForValue) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addAllBricks(
+ Iterable extends BrickInfo> values) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, bricks_);
+ onChanged();
+ } else {
+ bricksBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder clearBricks() {
+ if (bricksBuilder_ == null) {
+ bricks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ bricksBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder removeBricks(int index) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.remove(index);
+ onChanged();
+ } else {
+ bricksBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfo.Builder getBricksBuilder(
+ int index) {
+ return getBricksFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfoOrBuilder getBricksOrBuilder(
+ int index) {
+ if (bricksBuilder_ == null) {
+ return bricks_.get(index); } else {
+ return bricksBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List extends BrickInfoOrBuilder>
+ getBricksOrBuilderList() {
+ if (bricksBuilder_ != null) {
+ return bricksBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(bricks_);
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfo.Builder addBricksBuilder() {
+ return getBricksFieldBuilder().addBuilder(
+ BrickInfo.getDefaultInstance());
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public BrickInfo.Builder addBricksBuilder(
+ int index) {
+ return getBricksFieldBuilder().addBuilder(
+ index, BrickInfo.getDefaultInstance());
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List
+ getBricksBuilderList() {
+ return getBricksFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ BrickInfo, BrickInfo.Builder, BrickInfoOrBuilder>
+ getBricksFieldBuilder() {
+ if (bricksBuilder_ == null) {
+ bricksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ BrickInfo, BrickInfo.Builder, BrickInfoOrBuilder>(
+ bricks_,
+ ((bitField0_ & 0x00000002) == 0x00000002),
+ getParentForChildren(),
+ isClean());
+ bricks_ = null;
+ }
+ return bricksBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.DeviceList)
+ }
+
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.BrickInfo}
+ */
+ public static final class BrickInfo extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ BrickInfoOrBuilder {
+ public static final int TYPE_FIELD_NUMBER = 1;
+ public static final int ALIAS_FIELD_NUMBER = 2;
+ public static final int SERIAL_FIELD_NUMBER = 3;
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public BrickInfo parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new BrickInfo(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+ private static final long serialVersionUID = 0L;
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ private static final BrickInfo DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new BrickInfo();
+ }
+
+ private int bitField0_;
+ private Type type_;
+ private volatile Object alias_;
+ private volatile Object serial_;
+ private byte memoizedIsInitialized = -1;
+ private int memoizedSerializedSize = -1;
+ // Use BrickInfo.newBuilder() to construct.
+ private BrickInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private BrickInfo() {
+ alias_ = "";
+ serial_ = "";
+ }
+ private BrickInfo(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ alias_ = bs;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000004;
+ serial_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ }
+
+ public static BrickInfo parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static BrickInfo parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static BrickInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static BrickInfo parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static BrickInfo parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static BrickInfo parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static BrickInfo parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+
+ public static BrickInfo parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+
+ public static BrickInfo parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static BrickInfo parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(BrickInfo prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public static BrickInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ BrickInfo.class, Builder.class);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public boolean hasAlias() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public String getAlias() {
+ Object ref = alias_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ alias_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public com.google.protobuf.ByteString
+ getAliasBytes() {
+ Object ref = alias_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ alias_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public boolean hasSerial() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public String getSerial() {
+ Object ref = serial_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serial_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSerialBytes() {
+ Object ref = serial_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ serial_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getAliasBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, getSerialBytes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getAliasBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, getSerialBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ @Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public BrickInfo getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.BrickInfo}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ BrickInfoOrBuilder {
+ private int bitField0_;
+ private Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder> typeBuilder_;
+ private Object alias_ = "";
+ private Object serial_ = "";
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ BrickInfo.class, Builder.class);
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ alias_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ serial_ = "";
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ }
+
+ public BrickInfo getDefaultInstanceForType() {
+ return BrickInfo.getDefaultInstance();
+ }
+
+ public BrickInfo build() {
+ BrickInfo result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public BrickInfo buildPartial() {
+ BrickInfo result = new BrickInfo(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.alias_ = alias_;
+ if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.serial_ = serial_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof BrickInfo) {
+ return mergeFrom((BrickInfo)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(BrickInfo other) {
+ if (other == BrickInfo.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasAlias()) {
+ bitField0_ |= 0x00000002;
+ alias_ = other.alias_;
+ onChanged();
+ }
+ if (other.hasSerial()) {
+ bitField0_ |= 0x00000004;
+ serial_ = other.serial_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ return getType().isInitialized();
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ BrickInfo parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (BrickInfo) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != Type.getDefaultInstance()) {
+ type_ =
+ Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ Type.getDefaultInstance() : type_;
+ }
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ Type, Type.Builder, TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public boolean hasAlias() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public String getAlias() {
+ Object ref = alias_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ alias_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public Builder setAlias(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ alias_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public com.google.protobuf.ByteString
+ getAliasBytes() {
+ Object ref = alias_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ alias_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public Builder setAliasBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ alias_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string alias = 2;
+ */
+ public Builder clearAlias() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ alias_ = getDefaultInstance().getAlias();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public boolean hasSerial() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public String getSerial() {
+ Object ref = serial_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serial_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public Builder setSerial(
+ String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ serial_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSerialBytes() {
+ Object ref = serial_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ serial_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public Builder setSerialBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ serial_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * optional string serial = 3;
+ */
+ public Builder clearSerial() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ serial_ = getDefaultInstance().getSerial();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ }
+
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Type}
+ */
+ public static final class Type extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.Type)
+ TypeOrBuilder {
+ public static final int TYPE_FIELD_NUMBER = 1;
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public Type parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Type(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+ private static final long serialVersionUID = 0L;
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.Type)
+ private static final Type DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Type();
+ }
+
+ private int bitField0_;
+ private int type_;
+ private byte memoizedIsInitialized = -1;
+ private int memoizedSerializedSize = -1;
+ // Use Type.newBuilder() to construct.
+ private Type(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private Type() {
+ type_ = 1;
+ }
+ private Type(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+ Types value = Types.valueOf(rawValue);
+ if (value == null) {
+ unknownFields.mergeVarintField(1, rawValue);
+ } else {
+ bitField0_ |= 0x00000001;
+ type_ = rawValue;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ }
+
+ public static Type parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Type parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Type parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Type parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Type parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static Type parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Type parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+
+ public static Type parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+
+ public static Type parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+
+ public static Type parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Type prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ public static Type getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Type.class, Builder.class);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public Types getType() {
+ Types result = Types.valueOf(type_);
+ return result == null ? Types.NONE : result;
+ }
+
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeEnum(1, type_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, type_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ @Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public Type getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ /**
+ * Protobuf enum {@code org.ftccommunity.simulator.net.protocol.Type.Types}
+ */
+ public enum Types
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * NONE = 1;
+ *
+ *
+ * Pritory values take the range 1-16
+ *
+ */
+ NONE(0, 1),
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ LEGACY_MOTOR(1, 2),
+ /**
+ * LEGACY_SERVO = 3;
+ */
+ LEGACY_SERVO(2, 3),
+ /**
+ * LEGACY_LIGHT = 4;
+ */
+ LEGACY_LIGHT(3, 4),
+ /**
+ * LEGACY_TOUCH = 5;
+ */
+ LEGACY_TOUCH(4, 5),
+ /**
+ * LEGACY_IR = 6;
+ */
+ LEGACY_IR(5, 6),
+ /**
+ * USB_MOTOR = 7;
+ */
+ USB_MOTOR(6, 7),
+ /**
+ * USB_SERVO = 8;
+ */
+ USB_SERVO(7, 8),
+ /**
+ * SENSOR_IR = 9;
+ */
+ SENSOR_IR(8, 9),
+ /**
+ * SENSOR_OPT_DIST = 10;
+ */
+ SENSOR_OPT_DIST(9, 10),
+ /**
+ * SENSOR_TOUCH = 11;
+ */
+ SENSOR_TOUCH(10, 11),
+ /**
+ * DEVICE_LIST = 12;
+ */
+ DEVICE_LIST(11, 12),
+ /**
+ * BRICK_INFO = 13;
+ */
+ BRICK_INFO(12, 13),
+ /**
+ * HEARTBEAT = 14;
+ */
+ HEARTBEAT(13, 14),
+ /**
+ * LEGACY_TILT_ACCL = 15;
+ */
+ LEGACY_TILT_ACCL(14, 15),
+ /**
+ * LEGACY_COLOR = 16;
+ */
+ LEGACY_COLOR(15, 16),
+ /**
+ * LEGACY_EOPD = 17;
+ */
+ LEGACY_EOPD(16, 17),
+ /**
+ * LEGACY_FORCE = 18;
+ */
+ LEGACY_FORCE(17, 18),
+ /**
+ * LEGACY_GYRO = 19;
+ */
+ LEGACY_GYRO(18, 19),
+ /**
+ * SIM_DATA = 20;
+ */
+ SIM_DATA(19, 20),
+ /**
+ * OPT_DATA1 = 21;
+ */
+ OPT_DATA1(20, 21),
+ /**
+ * OPT_DATA2 = 22;
+ */
+ OPT_DATA2(21, 22),
+ /**
+ * OPT_DATA3 = 23;
+ */
+ OPT_DATA3(22, 23),
+ /**
+ * OPT_DATA4 = 24;
+ */
+ OPT_DATA4(23, 24),
+ ;
+
+ /**
+ * NONE = 1;
+ *
+ *
+ * Pritory values take the range 1-16
+ *
+ */
+ public static final int NONE_VALUE = 1;
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ public static final int LEGACY_MOTOR_VALUE = 2;
+ /**
+ * LEGACY_SERVO = 3;
+ */
+ public static final int LEGACY_SERVO_VALUE = 3;
+ /**
+ * LEGACY_LIGHT = 4;
+ */
+ public static final int LEGACY_LIGHT_VALUE = 4;
+ /**
+ * LEGACY_TOUCH = 5;
+ */
+ public static final int LEGACY_TOUCH_VALUE = 5;
+ /**
+ * LEGACY_IR = 6;
+ */
+ public static final int LEGACY_IR_VALUE = 6;
+ /**
+ * USB_MOTOR = 7;
+ */
+ public static final int USB_MOTOR_VALUE = 7;
+ /**
+ * USB_SERVO = 8;
+ */
+ public static final int USB_SERVO_VALUE = 8;
+ /**
+ * SENSOR_IR = 9;
+ */
+ public static final int SENSOR_IR_VALUE = 9;
+ /**
+ * SENSOR_OPT_DIST = 10;
+ */
+ public static final int SENSOR_OPT_DIST_VALUE = 10;
+ /**
+ * SENSOR_TOUCH = 11;
+ */
+ public static final int SENSOR_TOUCH_VALUE = 11;
+ /**
+ * DEVICE_LIST = 12;
+ */
+ public static final int DEVICE_LIST_VALUE = 12;
+ /**
+ * BRICK_INFO = 13;
+ */
+ public static final int BRICK_INFO_VALUE = 13;
+ /**
+ * HEARTBEAT = 14;
+ */
+ public static final int HEARTBEAT_VALUE = 14;
+ /**
+ * LEGACY_TILT_ACCL = 15;
+ */
+ public static final int LEGACY_TILT_ACCL_VALUE = 15;
+ /**
+ * LEGACY_COLOR = 16;
+ */
+ public static final int LEGACY_COLOR_VALUE = 16;
+ /**
+ * LEGACY_EOPD = 17;
+ */
+ public static final int LEGACY_EOPD_VALUE = 17;
+ /**
+ * LEGACY_FORCE = 18;
+ */
+ public static final int LEGACY_FORCE_VALUE = 18;
+ /**
+ * LEGACY_GYRO = 19;
+ */
+ public static final int LEGACY_GYRO_VALUE = 19;
+ /**
+ * SIM_DATA = 20;
+ */
+ public static final int SIM_DATA_VALUE = 20;
+ /**
+ * OPT_DATA1 = 21;
+ */
+ public static final int OPT_DATA1_VALUE = 21;
+ /**
+ * OPT_DATA2 = 22;
+ */
+ public static final int OPT_DATA2_VALUE = 22;
+ /**
+ * OPT_DATA3 = 23;
+ */
+ public static final int OPT_DATA3_VALUE = 23;
+ /**
+ * OPT_DATA4 = 24;
+ */
+ public static final int OPT_DATA4_VALUE = 24;
+ private static final Types[] VALUES = values();
+ private static com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public Types findValueByNumber(int number) {
+ return Types.valueOf(number);
+ }
+ };
+ private final int index;
+ private final int value;
+
+ Types(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ public static Types valueOf(int value) {
+ switch (value) {
+ case 1: return NONE;
+ case 2: return LEGACY_MOTOR;
+ case 3: return LEGACY_SERVO;
+ case 4: return LEGACY_LIGHT;
+ case 5: return LEGACY_TOUCH;
+ case 6: return LEGACY_IR;
+ case 7: return USB_MOTOR;
+ case 8: return USB_SERVO;
+ case 9: return SENSOR_IR;
+ case 10: return SENSOR_OPT_DIST;
+ case 11: return SENSOR_TOUCH;
+ case 12: return DEVICE_LIST;
+ case 13: return BRICK_INFO;
+ case 14: return HEARTBEAT;
+ case 15: return LEGACY_TILT_ACCL;
+ case 16: return LEGACY_COLOR;
+ case 17: return LEGACY_EOPD;
+ case 18: return LEGACY_FORCE;
+ case 19: return LEGACY_GYRO;
+ case 20: return SIM_DATA;
+ case 21: return OPT_DATA1;
+ case 22: return OPT_DATA2;
+ case 23: return OPT_DATA3;
+ case 24: return OPT_DATA4;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return Type.getDescriptor().getEnumTypes().get(0);
+ }
+
+ public static Types valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ public final int getNumber() {
+ return value;
+ }
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ // @@protoc_insertion_point(enum_scope:org.ftccommunity.simulator.net.protocol.Type.Types)
+ }
+
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Type}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.Type)
+ TypeOrBuilder {
+ private int bitField0_;
+ private int type_ = 1;
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.Type.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Type.class, Builder.class);
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+
+ public Builder clear() {
+ super.clear();
+ type_ = 1;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ }
+
+ public Type getDefaultInstanceForType() {
+ return Type.getDefaultInstance();
+ }
+
+ public Type build() {
+ Type result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Type buildPartial() {
+ Type result = new Type(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.type_ = type_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof Type) {
+ return mergeFrom((Type)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Type other) {
+ if (other == Type.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ setType(other.getType());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return hasType();
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ Type parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Type) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public Types getType() {
+ Types result = Types.valueOf(type_);
+ return result == null ? Types.NONE : result;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public Builder setType(Types value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = 1;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.Type)
+ }
+
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/tasks/HeartbeatTask.java b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/tasks/HeartbeatTask.java
new file mode 100644
index 0000000..3a5be70
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/net/tasks/HeartbeatTask.java
@@ -0,0 +1,78 @@
+package org.ftccommunity.simulator.net.tasks;
+
+import com.google.common.base.Charsets;
+
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.EmptyByteBuf;
+import io.netty.buffer.PooledByteBufAllocator;
+import io.netty.channel.Channel;
+import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
+
+public class HeartbeatTask implements Runnable {
+ private static int port = 0;
+ private Channel chl;
+
+ public HeartbeatTask(Channel channel, int bondedPort) {
+ this.chl = channel;
+ }
+
+ public static synchronized void setPort(int bondedPort) {
+ port = bondedPort;
+ }
+
+ public static SimulatorData.Data buildMessage() {
+ // ByteBuf info = new EmptyByteBuf(new PooledByteBufAllocator(false));
+ String infoString = "";
+ try {
+
+ infoString = InetAddress.getLocalHost().getHostAddress() + "%20" + "null" + "%20" + port +
+ "%20";
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ }
+ byte[] dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+ infoString += dataEncoded.length;
+ dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+
+ // info.writeBytes(dataEncoded);
+ SimulatorData.Data.Builder dataBuilded = SimulatorData.Data.newBuilder()
+ .setType(SimulatorData.Type.newBuilder()
+ .setType(SimulatorData.Type.Types.HEARTBEAT))
+ .setModule(SimulatorData.Data.Modules.LEGACY_CONTROLLER)
+ .addInfo((new PingWebSocketFrame()).toString());
+ return dataBuilded.build();
+ }
+
+ /**
+ * This generates and sends a Ping request to the server; the data layout in the ping request is: the IP
+ * address of the client (encoded in byte form via US_ASCII), the seen IP address (or hostname) of the server,
+ * the port we are listening on, and a size of the previous data
+ */
+ @Override
+ public void run() {
+ ByteBuf info = new EmptyByteBuf(new PooledByteBufAllocator(false));
+ String infoString = "";
+ try {
+ infoString = InetAddress.getLocalHost().getHostAddress() + "%20" + "null" + "%20" + port +
+ "%20";
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ }
+ byte[] dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+ infoString += dataEncoded.length;
+ dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+
+ info.writeBytes(dataEncoded);
+ SimulatorData.Data.Builder dataBuilder = SimulatorData.Data.newBuilder()
+ .setType(SimulatorData.Type.newBuilder()
+ .setType(SimulatorData.Type.Types.HEARTBEAT))
+ .setModule(SimulatorData.Data.Modules.LEGACY_CONTROLLER)
+ .addInfo((new PingWebSocketFrame(info)).toString());
+ chl.writeAndFlush(dataBuilder.build());
+ }
+}
diff --git a/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/protobuf/Data.proto b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/protobuf/Data.proto
new file mode 100644
index 0000000..95be3c8
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/java/org/ftccommunity/simulator/protobuf/Data.proto
@@ -0,0 +1,77 @@
+package org.ftccommunity.simulator.net.protocol;
+
+option java_package = "org.ftccommunity.simulator.protcol";
+option java_outer_classname = "SimulatorData";
+
+
+message Data {
+ required Type type = 1;
+ required Modules module = 2;
+ repeated string info = 3;
+ optional int32 port = 4 [default = 1];
+ optional string dataName = 5 [default = ""];
+
+ enum Modules {
+ LEGACY_CONTROLLER = 1;
+ LEGACY_MOTOR = 2;
+ LEGACY_SENSOR = 3;
+ }
+}
+
+message DeviceListOld {
+ required Type type = 1;
+ required string serialized = 2;
+}
+
+message DeviceList {
+ required Type type = 1;
+ repeated BrickInfo bricks = 2;
+}
+
+message BrickInfo {
+ required Type type = 1;
+ optional string alias = 2;
+ optional string serial = 3;
+}
+
+message Type {
+ required Types type = 1;
+
+ enum Types {
+ // Pritory values take the range 1-16
+ NONE = 1;
+
+ LEGACY_MOTOR = 2;
+ LEGACY_SERVO = 3;
+
+ LEGACY_LIGHT = 4;
+ LEGACY_TOUCH = 5;
+ LEGACY_IR = 6;
+
+ USB_MOTOR= 7;
+ USB_SERVO = 8;
+
+ SENSOR_IR = 9;
+ SENSOR_OPT_DIST = 10;
+ SENSOR_TOUCH = 11;
+
+ DEVICE_LIST = 12;
+ BRICK_INFO = 13;
+
+ HEARTBEAT = 14;
+
+ LEGACY_TILT_ACCL = 15;
+ LEGACY_COLOR = 16;
+ LEGACY_EOPD = 17;
+ LEGACY_FORCE = 18;
+ LEGACY_GYRO = 19;
+
+ SIM_DATA = 20;
+
+ OPT_DATA1 = 21;
+ OPT_DATA2 = 22;
+ OPT_DATA3 = 23;
+ OPT_DATA4 = 24;
+ }
+}
+
diff --git a/Android/App/FtcRobotController/src/main/res/drawable-hdpi/button_shape.xml b/Android/App/FtcRobotController/src/main/res/drawable-hdpi/button_shape.xml
index 023045a..0e2568b 100644
--- a/Android/App/FtcRobotController/src/main/res/drawable-hdpi/button_shape.xml
+++ b/Android/App/FtcRobotController/src/main/res/drawable-hdpi/button_shape.xml
@@ -1,27 +1,19 @@
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/about.xml b/Android/App/FtcRobotController/src/main/res/layout/about.xml
index 1a3c528..1b4fbf8 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/about.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/about.xml
@@ -1,13 +1,13 @@
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_autoconfigure.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_autoconfigure.xml
index c61f03d..2b2bd66 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_autoconfigure.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_autoconfigure.xml
@@ -1,52 +1,53 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context="com.qualcomm.ftcrobotcontroller.AutoConfigureActivity">
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_config_simulator_wifi.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_config_simulator_wifi.xml
new file mode 100644
index 0000000..7fb7610
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_config_simulator_wifi.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_config_wifi_direct.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_config_wifi_direct.xml
index d3dcfcc..3896e51 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_config_wifi_direct.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_config_wifi_direct.xml
@@ -1,21 +1,21 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/activity_fix_misconfig_wifi_direct"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin"
+ tools:context="com.qualcomm.ftcrobotcontroller.ConfigWifiDirectActivity">
-
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_configuration.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_configuration.xml
index 242a65e..9591d9e 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_configuration.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_configuration.xml
@@ -2,143 +2,148 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".NewFtcConfigurationActivity"
- android:orientation="vertical">
+ android:orientation="vertical"
+ tools:context=".NewFtcConfigurationActivity">
-
+
-
-
-
-
+ android:layout_height="match_parent"
+ android:layout_above="@+id/scan_bottom"
+ android:layout_below="@id/included_header"
+ android:orientation="vertical"
+ android:paddingBottom="8dp"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="5dp">
+
+
-
+
-
-
+
-
+
+
-
+
-
+
-
+
-
-
-
+
+
-
+ android:fillViewport="true">
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml
index 3e55de7..072e3b9 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml
@@ -1,73 +1,75 @@
+ android:orientation="vertical"
+ tools:context=".FtcRobotControllerActivity">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_wifi_channel_selector.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_wifi_channel_selector.xml
index 4e7c223..bffb951 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_wifi_channel_selector.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_ftc_wifi_channel_selector.xml
@@ -1,41 +1,41 @@
-
-
+ android:layout_height="match_parent"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin"
+ tools:context=".FtcWifiChannelSelectorActivity">
-
+
-
+
-
+
-
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_load.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_load.xml
index c4c5d7f..9e197d9 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_load.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_load.xml
@@ -1,129 +1,132 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ tools:context=".FtcFileLoadActivity">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="match_parent"
+ android:layout_above="@+id/load_bottom"
+ android:layout_below="@id/included_header"
+ android:orientation="vertical"
+ android:paddingBottom="8dp"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="5dp">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_alignParentBottom="true"
+ android:orientation="vertical"
+ android:paddingBottom="8dp"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="5dp">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/activity_view_logs.xml b/Android/App/FtcRobotController/src/main/res/layout/activity_view_logs.xml
index 97d0cc4..e862cb3 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/activity_view_logs.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/activity_view_logs.xml
@@ -1,23 +1,23 @@
-
-
-
-
+ android:layout_height="match_parent"
+ android:keepScreenOn="true"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin"
+ tools:context="com.qualcomm.ftccommon.ViewLogsActivity">
+
+
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/device_name.xml b/Android/App/FtcRobotController/src/main/res/layout/device_name.xml
index 8d38cce..7216ceb 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/device_name.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/device_name.xml
@@ -1,29 +1,28 @@
-
-
-
+ android:layout_alignParentTop="true"
+ android:background="@color/light_qcom_blue"
+ android:orientation="horizontal"
+ android:paddingBottom="2dp"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingTop="2dp">
-
+
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/file_info.xml b/Android/App/FtcRobotController/src/main/res/layout/file_info.xml
index 8069c9f..43e9c0c 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/file_info.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/file_info.xml
@@ -1,81 +1,84 @@
-
+ android:layout_height="match_parent"
+ android:animateLayoutChanges="true"
+ android:orientation="vertical"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin">
-
-
-
-
-
-
+ android:shrinkColumns="0"
+ android:stretchColumns="1">
-
+ android:padding="5dip">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/header.xml b/Android/App/FtcRobotController/src/main/res/layout/header.xml
index c47a918..4884c8b 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/header.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/header.xml
@@ -1,23 +1,22 @@
-
+ android:paddingTop="2dp">
+ android:shadowRadius="5"
+ android:text="i"
+ android:textColor="#FFFFFF"
+ android:textSize="12sp"
+ android:textStyle="bold" />
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/legacy.xml b/Android/App/FtcRobotController/src/main/res/layout/legacy.xml
index 0db7cbe..d2704a3 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/legacy.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/legacy.xml
@@ -2,338 +2,341 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".EditLegacyModuleControllerActivity"
- android:orientation="vertical">
+ android:orientation="vertical"
+ tools:context=".EditLegacyModuleControllerActivity">
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+ android:paddingTop="@dimen/activity_vertical_margin">
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+ android:background="@android:color/darker_gray" />
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+ android:layout_marginBottom="30dp"
+ android:text="@string/legacy_controller_name">
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/legacy_module.xml b/Android/App/FtcRobotController/src/main/res/layout/legacy_module.xml
index fabda22..2f87b6a 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/legacy_module.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/legacy_module.xml
@@ -1,81 +1,79 @@
-
+
+
+
+
+
+
+ android:layout_height="wrap_content">
-
-
+ android:layout_height="wrap_content"
+ android:background="@android:drawable/btn_dropdown"
+ android:entries="@array/choice_array"
+ android:prompt="@string/choice_prompt"
+ android:spinnerMode="dropdown" />
-
-
-
-
-
-
+ android:layout_below="@id/choiceSpinner"
+ android:layout_marginBottom="30dp"
+ android:text="@string/titleText_view">
+
-
+
-
-
+
-
-
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/motors.xml b/Android/App/FtcRobotController/src/main/res/layout/motors.xml
index 49feca6..974b3a0 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/motors.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/motors.xml
@@ -2,211 +2,206 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".EditMotorControllerActivity"
- android:orientation="vertical">
+ android:orientation="vertical"
+ tools:context=".EditMotorControllerActivity">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+ android:paddingTop="@dimen/activity_vertical_margin">
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+ android:background="@android:color/darker_gray" />
-
+
-
-
+ android:keepScreenOn="true"
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin">
+
+
+ android:id="@+id/controller_name_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="30dp"
+ android:text="@string/motor_controller_name_text">
-
+
+
+
-
+
+
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+ android:padding="2dip">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/layout/orange_warning.xml b/Android/App/FtcRobotController/src/main/res/layout/orange_warning.xml
index 40b2fbd..1e5042a 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/orange_warning.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/orange_warning.xml
@@ -1,39 +1,42 @@
-
-
+ android:layout_height="wrap_content"
+ android:layout_margin="5dip"
+ android:background="@layout/shape">
+
-
-
+ android:layout_margin="1dip"
+ android:orientation="horizontal">
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/servos.xml b/Android/App/FtcRobotController/src/main/res/layout/servos.xml
index 5d268a9..d7e3d5c 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/servos.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/servos.xml
@@ -2,416 +2,404 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".EditServoControllerActivity"
- android:orientation="vertical">
+ android:orientation="vertical"
+ tools:context=".EditServoControllerActivity">
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+ android:background="@android:color/darker_gray" />
-
+
-
+
-
+
+
+
-
-
-
-
-
-
+
+
+
+ android:padding="5dip">
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+ android:id="@+id/attached_title"
+ android:text="@string/attached"
+ android:textSize="18sp"
+ android:textStyle="bold" />
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+ android:padding="5dip">
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+ android:padding="5dip">
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+ android:padding="5dip">
-
+
+
-
+ android:layout_marginLeft="30dp"
+ android:layout_marginStart="30dp" />
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+ android:padding="5dip">
-
+
+
-
+ android:layout_marginLeft="30dp"
+ android:layout_marginStart="30dp" />
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+ android:layout_marginLeft="30dp"
+ android:layout_marginStart="30dp" />
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/shape.xml b/Android/App/FtcRobotController/src/main/res/layout/shape.xml
index 3fa131e..46126c7 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/shape.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/shape.xml
@@ -1,18 +1,19 @@
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/layout/spinner_textview.xml b/Android/App/FtcRobotController/src/main/res/layout/spinner_textview.xml
index 6f0b8b8..664a5ff 100644
--- a/Android/App/FtcRobotController/src/main/res/layout/spinner_textview.xml
+++ b/Android/App/FtcRobotController/src/main/res/layout/spinner_textview.xml
@@ -1,7 +1,7 @@
\ No newline at end of file
+ android:id="@+id/spinner_item"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="10dp"
+ android:textSize="30sp" />
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml b/Android/App/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml
index 73c0052..a188e56 100644
--- a/Android/App/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml
+++ b/Android/App/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml
@@ -1,32 +1,32 @@
-
+
-
-
+
+
-
+
-
+
-
+
diff --git a/Android/App/FtcRobotController/src/main/res/menu/menu_autoconfigure.xml b/Android/App/FtcRobotController/src/main/res/menu/menu_autoconfigure.xml
index a30d33d..6e57ab5 100644
--- a/Android/App/FtcRobotController/src/main/res/menu/menu_autoconfigure.xml
+++ b/Android/App/FtcRobotController/src/main/res/menu/menu_autoconfigure.xml
@@ -1,8 +1,9 @@
- -
+
+ android:showAsAction="never"
+ android:title="@string/action_settings" />
diff --git a/Android/App/FtcRobotController/src/main/res/menu/menu_load.xml b/Android/App/FtcRobotController/src/main/res/menu/menu_load.xml
index 025ae31..fcb1910 100644
--- a/Android/App/FtcRobotController/src/main/res/menu/menu_load.xml
+++ b/Android/App/FtcRobotController/src/main/res/menu/menu_load.xml
@@ -1,6 +1,9 @@
-
+
diff --git a/Android/App/FtcRobotController/src/main/res/values/colors.xml b/Android/App/FtcRobotController/src/main/res/values/colors.xml
index ef89edf..1ce80a3 100644
--- a/Android/App/FtcRobotController/src/main/res/values/colors.xml
+++ b/Android/App/FtcRobotController/src/main/res/values/colors.xml
@@ -1,5 +1,5 @@
- #C1E2E4
- #309EA4
+ #C1E2E4
+ #309EA4
diff --git a/Android/App/FtcRobotController/src/main/res/values/dimens.xml b/Android/App/FtcRobotController/src/main/res/values/dimens.xml
index c23aed8..4a88fd3 100644
--- a/Android/App/FtcRobotController/src/main/res/values/dimens.xml
+++ b/Android/App/FtcRobotController/src/main/res/values/dimens.xml
@@ -1,7 +1,7 @@
-
- 16dp
- 5dp
+
+ 16dp
+ 5dp
\ No newline at end of file
diff --git a/Android/App/FtcRobotController/src/main/res/values/strings.xml b/Android/App/FtcRobotController/src/main/res/values/strings.xml
index d1020cd..e051b82 100644
--- a/Android/App/FtcRobotController/src/main/res/values/strings.xml
+++ b/Android/App/FtcRobotController/src/main/res/values/strings.xml
@@ -1,136 +1,136 @@
- FTC Robot Controller
- OK
+ FTC Robot Controller
+ OK
-
-
- - Auto - device selects channel
- - 2.4GHz, Channel 1
- - 2.4GHz, Channel 6
- - 2.4GHz, Channel 11
-
- - 5GHz, Channel 149
- - 5GHz, Channel 153
- - 5GHz, Channel 157
- - 5GHz, Channel 161
-
+
+
+ - Auto - device selects channel
+ - 2.4GHz, Channel 1
+ - 2.4GHz, Channel 6
+ - 2.4GHz, Channel 11
+
+ - 5GHz, Channel 149
+ - 5GHz, Channel 153
+ - 5GHz, Channel 157
+ - 5GHz, Channel 161
+
- ActionWifiChannelSelection
- Wifi Channel Selection
- Configure
- Launch WiFi Settings
- Restore Saved WiFi Settings
- Wifi Channel Selection
+ ActionWifiChannelSelection
+ Wifi Channel Selection
+ Configure
+ Launch WiFi Settings
+ Restore Saved WiFi Settings
+ Wifi Channel Selection
-
- Robot Configuration Settings
- Add Motor Controller
- Add Servo Controller
- Edit Motor Controller
- Edit Motor Controller
- Edit Servo Controller
- Edit Legacy Module Controller
- Configure Robot
- Configure Robot
- Exit
- Configure Robot
- Load Configuration File
- Device Types
- Scan
- Press this button to scan for attached devices
- Save
- Cancel
- Done
- Enter name
- Enter the name for this device here
- Choose Configuration File
- Save Configuration
- Press this button to write the current configuration to an XML file
- Select an XML file to instantiate a Robot from that file
- Select an XML file to instantiate a Robot from that file
+
+ Robot Configuration Settings
+ Add Motor Controller
+ Add Servo Controller
+ Edit Motor Controller
+ Edit Motor Controller
+ Edit Servo Controller
+ Edit Legacy Module Controller
+ Configure Robot
+ Configure Robot
+ Exit
+ Configure Robot
+ Load Configuration File
+ Device Types
+ Scan
+ Press this button to scan for attached devices
+ Save
+ Cancel
+ Done
+ Enter name
+ Enter the name for this device here
+ Choose Configuration File
+ Save Configuration
+ Press this button to write the current configuration to an XML file
+ Select an XML file to instantiate a Robot from that file
+ Select an XML file to instantiate a Robot from that file
-
- Filename
- Edit
- Activate
- Delete
- AutoConfigure
- AutoConfigure
- Press this button to use the AutoConfigure tool
- Press this button to attempt to AutoConfigure your robot
+
+ Filename
+ Edit
+ Activate
+ Delete
+ AutoConfigure
+ AutoConfigure
+ Press this button to use the AutoConfigure tool
+ Press this button to attempt to AutoConfigure your robot
-
- Which sensor is attached?
+
+ Which sensor is attached?
-
- - GYRO
- - COMPASS
- - IR_SEEKER
- - LIGHT_SENSOR
- - ACCELEROMETER
- - MOTOR_CONTROLLER
- - SERVO_CONTROLLER
- - NOTHING
-
+
+ - GYRO
+ - COMPASS
+ - IR_SEEKER
+ - LIGHT_SENSOR
+ - ACCELEROMETER
+ - MOTOR_CONTROLLER
+ - SERVO_CONTROLLER
+ - NOTHING
+
- 0
- Select the type of connected device here
- Edit Controller
- Enter the name for this legacy module here
- Device Info
+ 0
+ Select the type of connected device here
+ Edit Controller
+ Enter the name for this legacy module here
+ Device Info
-
- Motor Controller
- Enter the name for this motor controller here
- Port
- Attached
- 1
- 2
- Enter motor name
- Enter the name for this motor here
+
+ Motor Controller
+ Enter the name for this motor controller here
+ Port
+ Attached
+ 1
+ 2
+ Enter motor name
+ Enter the name for this motor here
-
- Servo Controller
- Enter the name for this servo controller here
- Enter the name for this servo here
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- Restart Robot
- About
- About
- Settings
- Settings
- pref_hardware_config_filename
- Load Configuration File
- Hello world!
- Settings
- Autoconfigure Robot
+
+ Servo Controller
+ Enter the name for this servo controller here
+ Enter the name for this servo here
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ Restart Robot
+ About
+ About
+ Settings
+ Settings
+ pref_hardware_config_filename
+ Load Configuration File
+ Hello world!
+ Settings
+ Autoconfigure Robot
-
- Configure Wifi Direct
+
+ Configure Wifi Direct
Please wait while we update the Wifi Direct settings on this device.
-
- View logs
- View logs
- View Logs
- Clear Logs
+
+ View logs
+ View logs
+ View Logs
+ Clear Logs
-
- pref_launch_settings
+
+ pref_launch_settings
diff --git a/Android/App/FtcRobotController/src/main/res/values/strings_activity_configure_simualor_bluetooth.xml b/Android/App/FtcRobotController/src/main/res/values/strings_activity_configure_simualor_bluetooth.xml
new file mode 100644
index 0000000..35ed70e
--- /dev/null
+++ b/Android/App/FtcRobotController/src/main/res/values/strings_activity_configure_simualor_bluetooth.xml
@@ -0,0 +1,61 @@
+
+ Bluetooth Settings
+
+
+
+
+ General
+
+ Enable social recommendations
+ Recommendations for people to contact
+ based on your message history
+
+
+ Display name
+ John Smith
+
+ Add friends to messages
+
+ - Always
+ - When possible
+ - Never
+
+
+ - 1
+ - 0
+ - -1
+
+
+
+ Data & sync
+
+ Sync frequency
+
+ - 15 minutes
+ - 30 minutes
+ - 1 hour
+ - 3 hours
+ - 6 hours
+ - Never
+
+
+ - 15
+ - 30
+ - 60
+ - 180
+ - 360
+ - -1
+
+
+ System sync settings
+
+
+ Notifications
+
+ New message notifications
+
+ Ringtone
+ Silent
+
+ Vibrate
+
diff --git a/Android/App/FtcRobotController/src/main/res/xml/device_filter.xml b/Android/App/FtcRobotController/src/main/res/xml/device_filter.xml
index 161e800..c947aaf 100644
--- a/Android/App/FtcRobotController/src/main/res/xml/device_filter.xml
+++ b/Android/App/FtcRobotController/src/main/res/xml/device_filter.xml
@@ -1,4 +1,6 @@
-
-
+
+
diff --git a/Android/App/FtcRobotController/src/main/res/xml/preferences.xml b/Android/App/FtcRobotController/src/main/res/xml/preferences.xml
index 110fe50..ed67c67 100644
--- a/Android/App/FtcRobotController/src/main/res/xml/preferences.xml
+++ b/Android/App/FtcRobotController/src/main/res/xml/preferences.xml
@@ -1,47 +1,59 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android/App/RobotSimulatorLibrary b/Android/App/RobotSimulatorLibrary
new file mode 100644
index 0000000..7a027bc
--- /dev/null
+++ b/Android/App/RobotSimulatorLibrary
@@ -0,0 +1,16 @@
+group 'RobotSimulatorLibrary'
+version '.1-DEV'
+
+apply plugin: 'groovy'
+apply plugin: 'java'
+
+sourceCompatibility = 1.7
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ compile 'org.codehaus.groovy:groovy-all:2.3.11'
+ testCompile group: 'junit', name: 'junit', version: '4.11'
+}
diff --git a/Android/App/build.gradle b/Android/App/build.gradle
index d8ba071..3af368c 100644
--- a/Android/App/build.gradle
+++ b/Android/App/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.0.0'
+ classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -19,4 +19,4 @@ allprojects {
dirs 'out'
}
}
-}
+}
\ No newline at end of file
diff --git a/Android/App/doc/javadoc/allclasses-frame.html b/Android/App/doc/javadoc/allclasses-frame.html
index 15170de..5162984 100644
--- a/Android/App/doc/javadoc/allclasses-frame.html
+++ b/Android/App/doc/javadoc/allclasses-frame.html
@@ -1,72 +1,173 @@
-
+
-
-All Classes
-
-
-
+
+ All Classes
+
+
+
All Classes
+
diff --git a/Android/App/doc/javadoc/allclasses-noframe.html b/Android/App/doc/javadoc/allclasses-noframe.html
index 7f1191b..64340e5 100644
--- a/Android/App/doc/javadoc/allclasses-noframe.html
+++ b/Android/App/doc/javadoc/allclasses-noframe.html
@@ -1,72 +1,145 @@
-
+
-
-All Classes
-
-
-
+
+ All Classes
+
+
+
All Classes
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/CommandList.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/CommandList.html
index 5d3e718..ebb5ad0 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/CommandList.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/CommandList.html
@@ -1,12 +1,13 @@
-
+
-
-CommandList
-
-
-
+
+ CommandList
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.ftccommon.CommandList
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.ftccommon.CommandList
+
+
+
+
-
-
-
-
-
-
-
-
-Field Summary
-
-Fields
-
-Modifier and Type
-Field and Description
-
-
-static java.lang.String
-CMD_CANCEL_RESUME
-Command to cancel "restart" of op mode.
-
-
-
-static java.lang.String
-CMD_REQUEST_OP_MODE_LIST
-Command to request the list of op modes
-
-
-
-static java.lang.String
-CMD_REQUEST_OP_MODE_LIST_RESP
-Response to a command to request the list of op modes
+
List of RobotCore Robocol commands used by the FIRST apps
+
+
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+ Fields
+
+ Modifier and Type
+ Field and Description
+
+
+ static java.lang.String
+ CMD_CANCEL_RESUME
- Op modes will be in extra data
-
-
-
-static java.lang.String
-CMD_RESTART_ROBOT
-Command to restart the robot
-
-
-
-static java.lang.String
-CMD_RESUME_OP_MODE
-Response to a command to restart after dropping connection
+
Command to cancel "restart" of op mode.
+
+
+
+ static java.lang.String
+ CMD_REQUEST_OP_MODE_LIST
- Op mode to restart will be in extra data
-
-
-
-static java.lang.String
-CMD_RESUME_OP_MODE_RESP
-Response send after resuming an op mode
+
Command to request the list of op modes
+
+
+
+ static java.lang.String
+ CMD_REQUEST_OP_MODE_LIST_RESP
- Op mode to restart will be in extra data
-
-
-
-static java.lang.String
-CMD_SWITCH_OP_MODE
-Command to switch op modes
+
Response to a command to request the list of
+ op modes
- New op mode will be in extra data
-
-
-
-static java.lang.String
-CMD_SWITCH_OP_MODE_RESP
-Response to a command to switch op modes.
-
-
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-CommandList ()
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
+
+
+ static java.lang.String
+ CMD_RESTART_ROBOT
- Op modes will be in extra data
-
-See Also:
-Constant Field Values
-
-
-
-
-
-
-
+
+
+ static java.lang.String
+ CMD_RESUME_OP_MODE
- New op mode will be in extra data
-
-See Also:
-Constant Field Values
-
-
-
-
-
-
-
+
+
+ static java.lang.String
+ CMD_RESUME_OP_MODE_RESP
- Op mode to restart will be in extra data
-
-See Also:
-Constant Field Values
-
-
-
-
-
-
-
+
+
+ static java.lang.String
+ CMD_SWITCH_OP_MODE
+
+ Command to switch op modes
+
+ New op mode will be in extra data
+
+
+
+
+ static java.lang.String
+ CMD_SWITCH_OP_MODE_RESP
+
+ Response to a command to switch op modes.
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ CommandList ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ CommandList
+ public CommandList()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/DbgLog.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/DbgLog.html
index 5eb87ab..f7ca9b9 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/DbgLog.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/DbgLog.html
@@ -1,12 +1,13 @@
-
+
-
-DbgLog
-
-
-
+
+ DbgLog
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.ftccommon.DbgLog
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+ Fields
+
+ Modifier and Type
+ Field and Description
+
+
+ static java.lang.String
+ ERROR_PREPEND
+
+
+
+ static java.lang.String
+ TAG
+
+ Tag used by logcat
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+ All Methods Static Methods Concrete Methods
+
+ Modifier and Type
+ Method and Description
+
+
+ static void
+ error (java.lang.String message)
+
+ Log an error message
+
+
+
+ static void
+ logStacktrace (java.lang.Exception e)
+
+
+
+ static void
+ msg (java.lang.String message)
+
+ Log a debug message
+
+
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/Device.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/Device.html
index f36f9ce..ef714d3 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/Device.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/Device.html
@@ -1,12 +1,13 @@
-
+
-
-Device
-
-
-
+
+ Device
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.ftccommon.Device
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ Device ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ Device
+ public Device()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html
index 055c0ee..8681db1 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html
@@ -1,12 +1,13 @@
-
+
-
-FtcEventLoopHandler
-
-
-
+
+ FtcEventLoopHandler
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.ftccommon.FtcEventLoopHandler
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.ftccommon.FtcEventLoopHandler
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html
index 9c82e7b..e3db13a 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html
@@ -1,12 +1,13 @@
-
+
-
-FtcRobotControllerService.FtcRobotControllerBinder
-
-
-
+
+ FtcRobotControllerService.FtcRobotControllerBinder
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-Binder
-
-
-com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html
index bbd2698..410d0ab 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html
@@ -1,12 +1,13 @@
-
+
-
-FtcRobotControllerService
-
-
-
+
+ FtcRobotControllerService
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-Service
-
-
-com.qualcomm.ftccommon.FtcRobotControllerService
-
-
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ Service
+
+
+ com.qualcomm.ftccommon.FtcRobotControllerService
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/Restarter.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/Restarter.html
index 1fa5738..b10a3c9 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/Restarter.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/Restarter.html
@@ -1,12 +1,13 @@
-
+
-
-Restarter
-
-
-
+
+ Restarter
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-requestRestart
-void requestRestart()
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+ requestRestart
+ void requestRestart()
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html
index bbc30dc..09440f3 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html
@@ -1,12 +1,13 @@
-
+
-
-UpdateUI.Callback
-
-
-
+
+ UpdateUI.Callback
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.ftccommon.UpdateUI.Callback
-
-
-
-
-
-
-
-Enclosing class:
-UpdateUI
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.ftccommon.UpdateUI.Callback
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-Callback ()
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-Callback
-public Callback()
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-updateUi
+ Callback methods
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ Callback ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ Callback
+ public Callback()
+
+
+
+
+
+
-
-
-
+ Gamepad [] gamepads)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html
index 2278eee..63bca66 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html
@@ -1,12 +1,13 @@
-
+
-
-UpdateUI
-
-
-
+
+ UpdateUI
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.ftccommon.UpdateUI
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.ftccommon.UpdateUI
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Class and Description
-
-
-class
-UpdateUI.Callback
-Callback methods
-
-
-
-
-
-
-
-
-
-
-Field Summary
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-UpdateUI (Activity activity,
- Dimmer dimmer)
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+ Nested Classes
+
+
+ Modifier and Type
+ Class and Description
+
+
+ class
+ UpdateUI.Callback
+
+ Callback methods
+
+
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ UpdateUI (Activity activity,
+ Dimmer dimmer)
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+ setTextViews
public void setTextViews(TextView textWifiDirectStatus,
TextView textRobotStatus,
TextView[] textGamepad,
TextView textOpMode,
TextView textErrorMessage,
TextView textDeviceName)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-frame.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-frame.html
index 8ebc9e0..0dff3c1 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-frame.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-frame.html
@@ -1,29 +1,39 @@
-
+
-
-com.qualcomm.ftccommon
-
-
-
+
+ com.qualcomm.ftccommon
+
+
+
-
+
+
-
Interfaces
-
-
Classes
-
+
Interfaces
+
+
Classes
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-summary.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-summary.html
index d76a9be..85eb682 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-summary.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-summary.html
@@ -1,12 +1,13 @@
-
+
-
-com.qualcomm.ftccommon
-
-
-
+
+ com.qualcomm.ftccommon
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
-
-
-Interface Summary
-
-Interface
-Description
-
-
-
-Restarter
-
-
-
-
-
-
-
-
-
-
-
-
-
Package com.qualcomm.ftccommon Description
-
Classes common to FTC aps
+
+
+
+ Interface Summary
+
+ Interface
+ Description
+
+
+
+ Restarter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Package com.qualcomm.ftccommon
+ Description
+
+
Classes common to FTC aps
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-tree.html b/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-tree.html
index 4e1e079..c6ee44d 100644
--- a/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-tree.html
+++ b/Android/App/doc/javadoc/com/qualcomm/ftccommon/package-tree.html
@@ -1,12 +1,13 @@
-
+
-
-com.qualcomm.ftccommon Class Hierarchy
-
-
-
+
+ com.qualcomm.ftccommon Class Hierarchy
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
Class Hierarchy
-
-
Interface Hierarchy
-
+
Class Hierarchy
+
+
Interface Hierarchy
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html
index 64dccbf..5dd6e64 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html
@@ -1,12 +1,13 @@
-
+
-
-AccelerationSensor
-
-
-
+
+ AccelerationSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.AccelerationSensor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.AccelerationSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-
-
-
-
-
-
+ Acceleration Sensor
+
+
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+ Nested Classes
+
+
+ Modifier and Type
+ Class and Description
+
+
+ static class
+ AccelerationSensor.Acceleration
+
+ Acceleration in the x, y, and z axis
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html
index 264e041..aea3fad 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html
@@ -1,12 +1,13 @@
-
+
-
-CompassSensor.CompassMode
-
-
-
+
+ CompassSensor.CompassMode
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-
-
-
-
-
-
-All Implemented Interfaces:
-java.io.Serializable, java.lang.Comparable<CompassSensor.CompassMode >
-
-
-Enclosing class:
-CompassSensor
-
-
-
+
+ java.lang.Object
+
+
+
+
+
-
-
-
-
-
-
-
-
-Enum Constant Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Enum
-clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
-
-
-
-
-Methods inherited from class java.lang.Object
-getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Enum Constant Detail
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Returns:
+ an array containing the constants of this enum type, in the
+ order they are declared
+
+
+
+
+
+
+
+
+
+ valueOf
+ public static CompassSensor.CompassMode valueOf(java.lang.String name)
+ Returns the enum constant of this type with the
+ specified name.
+ The string must match exactly an identifier used to
+ declare an
+ enum constant in this type. (Extraneous whitespace characters
+ are
+ not permitted.)
+
+
+ Parameters:
+ name - the name of the enum constant to be
+ returned.
+
+ Returns:
+ the enum constant with the specified name
+ Throws:
+ java.lang.IllegalArgumentException - if this
+ enum type has no constant with the specified name
+
+ java.lang.NullPointerException - if the
+ argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html
index aeabc65..d6254b8 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html
@@ -1,12 +1,13 @@
-
+
-
-CompassSensor
-
-
-
+
+ CompassSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.CompassSensor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.CompassSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-CompassSensor ()
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-CompassSensor
-public CompassSensor()
-
-
-
-
-
-
-
-
-
+ Nested Class Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ CompassSensor ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ CompassSensor
+ public CompassSensor()
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ calibrationFailed
+ public abstract boolean calibrationFailed()
+ Check to see whether calibration was successful.
+ After attempting a calibration, the hardware will (eventually)
+ indicate whether or
+ not it was unsuccessful. The default is "success", even when the
+ calibration is not
+ guaranteed to have completed successfully.
+
+ A user should monitor this field for (at least) several seconds
+ to determine success.
+
+
+ Returns:
+ failure
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.Direction.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.Direction.html
index f452fb2..9e76b78 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.Direction.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.Direction.html
@@ -1,12 +1,13 @@
-
+
-
-DcMotor.Direction
-
-
-
+
+ DcMotor.Direction
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-java.lang.Enum<DcMotor.Direction >
-
-
-com.qualcomm.robotcore.hardware.DcMotor.Direction
-
-
-
-
-
-
-
-
-
-All Implemented Interfaces:
-java.io.Serializable, java.lang.Comparable<DcMotor.Direction >
-
-
-Enclosing class:
-DcMotor
-
-
-
+
+ java.lang.Object
+
+
+ java.lang.Enum<DcMotor.Direction >
+
+
+
+ com.qualcomm.robotcore.hardware.DcMotor.Direction
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Enum Constant Summary
-
-Enum Constants
-
-Enum Constant and Description
-
-
-FORWARD
-
-
-REVERSE
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Enum
-clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
-
-
-
-
-Methods inherited from class java.lang.Object
-getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Enum Constant Detail
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Returns:
+ an array containing the constants of this enum type, in the
+ order they are declared
+
+
+
+
+
+
+
+
+
+ valueOf
+ public static DcMotor.Direction valueOf(java.lang.String name)
+ Returns the enum constant of this type with the
+ specified name.
+ The string must match exactly an identifier used to
+ declare an
+ enum constant in this type. (Extraneous whitespace characters
+ are
+ not permitted.)
+
+
+ Parameters:
+ name - the name of the enum constant to be
+ returned.
+
+ Returns:
+ the enum constant with the specified name
+ Throws:
+ java.lang.IllegalArgumentException - if this
+ enum type has no constant with the specified name
+
+ java.lang.NullPointerException - if the
+ argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.MotorCallback.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.MotorCallback.html
index 0f69e27..24b69e6 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.MotorCallback.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.MotorCallback.html
@@ -1,12 +1,13 @@
-
+
-
-DcMotor.MotorCallback
-
-
-
+
+ DcMotor.MotorCallback
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+ encoder
+ void encoder(int value)
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html
index 8e6bdca..21da8ad 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html
@@ -1,12 +1,13 @@
-
+
-
-DcMotor
-
-
-
+
+ DcMotor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.DcMotor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.DcMotor
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Class and Description
-
-
-static class
-DcMotor.Direction
-Motor direction
-
-
-
-static interface
-DcMotor.MotorCallback
-mock API
+
Control a DC Motor attached to a DC Motor Controller
+
+ See Also:
+ DcMotorController
+
+
+
+
+
+
+
+
+
+
+
+
+
- TODO: decide if we want to remove or implement this API
-
-
-
-
-
-
-
-
-
-
-Field Summary
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Field Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-portNumber
-protected int portNumber
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
+
+
+
+
+
+
+ Field Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Field Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ portNumber
+ protected int portNumber
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+ DcMotor.Direction direction)
+ Constructor
+
+ Parameters:
+ controller - DC motor controller this motor is
+ attached to
+
+ portNumber - portNumber port number on the
+ controller
+
+ direction - direction this motor should spin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html
index 99bd236..f0786e6 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html
@@ -1,12 +1,13 @@
-
+
-
-DcMotorController
-
-
-
+
+ DcMotorController
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-All Methods Instance Methods Abstract Methods
-
-Modifier and Type
-Method and Description
-
-
-void
-close ()
-Close this device
-
-
-
-java.lang.String
-getDeviceName ()
-Device Name
-
-
-
-DifferentialControlLoopCoefficients
-getDifferentialControlLoopCoefficients (int motor)
-Get the differential control loop coefficients
-
-
-
-double
-getGearRatio (int motor)
-Get the gear ratio
-
-
-
-DcMotorController.RunMode
-getMotorChannelMode (int motor)
-Get the current channel mode.
-
-
-
-DcMotorController.DeviceMode
-getMotorControllerDeviceMode ()
-Get the current device mode (read, write, or read/write)
-
- Note: on USB devices, this will always return "READ_WRITE" mode.
-
-
-
-int
-getMotorCurrentPosition (int motor)
-Get the current motor position
-
-
-
-double
-getMotorPower (int motor)
-Get the current motor power
-
-
-
-boolean
-getMotorPowerFloat (int motor)
-Is motor power set to float?
-
-
-
-int
-getMotorTargetPosition (int motor)
-Get the current motor target position
-
-
-
-int
-getVersion ()
-Version
-
-
-
-void
-setDifferentialControlLoopCoefficients (int motor,
- DifferentialControlLoopCoefficients pid)
-Set the differential control loop coefficients
-
-
-
-void
-setGearRatio (int motor,
- double ratio)
-Set the gear ratio
-
-
-
-void
-setMotorChannelMode (int motor,
- DcMotorController.RunMode mode)
-Set the current channel mode.
-
-
-
-void
-setMotorControllerDeviceMode (DcMotorController.DeviceMode mode)
-Set the device into read, write, or read/write modes
-
- Note: If you are using the NxtDcMotorController, you need to switch the controller into "read" mode
- before doing a read, and into "write" mode before doing a write.
-
-
-
-void
-setMotorPower (int motor,
- double power)
-Set the current motor power
-
-
-
-void
-setMotorPowerFloat (int motor)
-Allow motor to float
-
-
-
-void
-setMotorTargetPosition (int motor,
- int position)
-Set the motor target position.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-getVersion
-int getVersion()
-Version
-
-Returns:
-get the version of this device
-
-
-
-
-
-
-
-
-close
-void close()
-Close this device
-
-
-
-
-
-
-
-setMotorControllerDeviceMode
-void setMotorControllerDeviceMode(DcMotorController.DeviceMode mode)
-Set the device into read, write, or read/write modes
-
- Note: If you are using the NxtDcMotorController, you need to switch the controller into "read" mode
- before doing a read, and into "write" mode before doing a write. This is because
- the NxtDcMotorController is on the I2C interface, and can only do one at a time. If you are
- using the USBDcMotorController, there is no need to switch, because USB can handle reads
- and writes without changing modes. The NxtDcMotorControllers start up in "write" mode.
- This method does nothing on USB devices, but is needed on Nxt devices.
-
- The only modes the user should set are "READ_ONLY" and "WRITE_ONLY."
-
-Parameters:
-mode - device mode
-
-
-
-
-
-
-
-
-getMotorControllerDeviceMode
-DcMotorController.DeviceMode getMotorControllerDeviceMode()
-Get the current device mode (read, write, or read/write)
-
- Note: on USB devices, this will always return "READ_WRITE" mode. On Nxt devices, it may
- return "READ_ONLY", "WRITE_ONLY", "SWITCHING_TO_READ_MODE", or "SWITCHING_TO_WRITE_MODE".
- This is because of the delay between asking the hardware to switch modes, and the modes
- actually being switched. Both "SWITCHING" modes simply communicate that delay to the user.
- The only modes the user should set are "READ_ONLY" and "WRITE_ONLY."
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.DeviceType.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.DeviceType.html
index 4044843..7da807c 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.DeviceType.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.DeviceType.html
@@ -1,12 +1,13 @@
-
+
-
-DeviceManager.DeviceType
-
-
-
+
+ DeviceManager.DeviceType
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-
-
-
-
-
-
-All Implemented Interfaces:
-java.io.Serializable, java.lang.Comparable<DeviceManager.DeviceType >
-
-
-Enclosing class:
-DeviceManager
-
-
-
+
+ java.lang.Object
+
+
+
+
+
-
-
-
-
-
-
-
-
-Enum Constant Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Enum
-clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
-
-
-
-
-Methods inherited from class java.lang.Object
-getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
+
+ Returns:
+ an array containing the constants of this enum type, in the
+ order they are declared
+
+
+
+
+
+
+
+
+
+ valueOf
+ public static DeviceManager.DeviceType valueOf(java.lang.String name)
+ Returns the enum constant of this type with the
+ specified name.
+ The string must match exactly an identifier used to
+ declare an
+ enum constant in this type. (Extraneous whitespace characters
+ are
+ not permitted.)
+
+
+ Parameters:
+ name - the name of the enum constant to be
+ returned.
+
+ Returns:
+ the enum constant with the specified name
+ Throws:
+ java.lang.IllegalArgumentException - if this
+ enum type has no constant with the specified name
+
+ java.lang.NullPointerException - if the
+ argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html
index d9805be..731ef2d 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html
@@ -1,12 +1,13 @@
-
+
-
-DeviceManager
-
-
-
+
+ DeviceManager
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.DeviceManager
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html
index 941aba0..16b5845 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html
@@ -1,12 +1,13 @@
-
+
-
-DigitalChannel
-
-
-
+
+ DigitalChannel
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.DigitalChannel
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.DigitalChannel
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
-
-
-
-
-
-
-
+ Constructor
+
+ Parameters:
+ controller - Digital channel controller this
+ channel is attached to
+
+ channel - channel on the digital channel
+ controller
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html
index 89fbcd0..033e815 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html
@@ -1,12 +1,13 @@
-
+
-
-DigitalChannelController
-
-
-
+
+ DigitalChannelController
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Interface and Description
-
-
-static class
-DigitalChannelController.Mode
-Digital channel mode - input or output
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-getVersion
-int getVersion()
-Version
-
-Returns:
-get the version of this device
-
-
-
-
-
-
-
-
-close
-void close()
-Close this device
-
-
-
-
-
-
-
-
-
-
-
-setDigitalChannelMode
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+ Nested Classes
+
+
+ Modifier and Type
+ Interface and Description
+
+
+ static class
+ DigitalChannelController.Mode
+
+ Digital channel mode - input or output
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getVersion
+ int getVersion()
+ Version
+
+ Returns:
+ get the version of this device
+
+
+
+
+
+
+
+
+ close
+ void close()
+ Close this device
+
+
+
+
+
+
+
+
+
+
+
+ setDigitalChannelMode
void setDigitalChannelMode(int channel,
- DigitalChannelController.Mode mode)
-Set the mode of a digital channel
-
-Parameters:
-channel -
-mode - INPUT or OUTPUT
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+ Set the state of a digital channel
+
+ The behavior of this method is undefined for INPUT digital
+ channels.
+
+ Parameters:
+ channel -
+ state - true to set; false to unset
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html
index 11f08c7..aa11ae5 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html
@@ -1,12 +1,13 @@
-
+
-
-Gamepad.GamepadCallback
-
-
-
+
+ Gamepad.GamepadCallback
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html
index 140533f..536b652 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html
@@ -1,12 +1,13 @@
-
+
-
-Gamepad
-
-
-
+
+ Gamepad
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.Gamepad
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.Gamepad
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Class and Description
-
-
-static interface
-Gamepad.GamepadCallback
-Optional callback interface for monitoring changes due to MotionEvents and KeyEvents.
-
-
-
-
-
-
-
-
-
-
-Field Summary
-
-Fields
-
-Modifier and Type
-Field and Description
-
-
-boolean
-a
-button a
-
-
-
-boolean
-b
-button b
-
-
-
-boolean
-back
-button back
-
-
-
-boolean
-dpad_down
-dpad down
-
-
-
-boolean
-dpad_left
-dpad left
-
-
-
-boolean
-dpad_right
-dpad right
-
-
-
-boolean
-dpad_up
-dpad up
-
-
-
-protected float
-dpadThreshold
-DPAD button will be considered pressed when the movement crosses this
- threshold
-
-
-
-boolean
-guide
-button guide - often the large button in the middle of the controller.
-
-
-
-int
-id
-ID assigned to this gamepad by the OS.
-
-
-
-static int
-ID_UNASSOCIATED
-A gamepad with an ID equal to ID_UNASSOCIATED has not been associated with any device.
-
-
-
-protected float
-joystickDeadzone
-If the motion value is less than the threshold, the controller will be
- considered at rest
-
-
-
-boolean
-left_bumper
-button left bumper
-
-
-
-float
-left_stick_x
-left analog stick horizontal axis
-
-
-
-float
-left_stick_y
-left analog stick vertical axis
-
-
-
-float
-left_trigger
-left trigger
-
-
-
-boolean
-right_bumper
-button right bumper
-
-
-
-float
-right_stick_x
-right analog stick horizontal axis
-
-
-
-float
-right_stick_y
-right analog stick vertical axis
-
-
-
-float
-right_trigger
-right trigger
-
-
-
-boolean
-start
-button start
-
-
-
-long
-timestamp
-Relative timestamp of the last time an event was detected
-
-
-
-byte
-user
-Which user is this gamepad used by
-
-
-
-boolean
-x
-button x
-
-
-
-boolean
-y
-button y
-
-
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-All Methods Static Methods Instance Methods Concrete Methods
-
-Modifier and Type
-Method and Description
-
-
-boolean
-atRest ()
-Are all analog sticks and triggers in their rest position?
-
-
-
-protected void
-callCallback ()
-
-
-protected float
-cleanMotionValues (float number)
-
-
-static void
-clearWhitelistFilter ()
-Clear the device whitelist filter.
-
-
-
-static void
-enableWhitelistFilter (int vendorId,
- int productId)
-Add a whitelist filter for a specific device vendor/product ID.
-
-
-
-void
-fromByteArray (byte[] byteArray)
-
-
-MsgType
-getRobocolMsgType ()
-
-
-static boolean
-isGamepadDevice (int deviceId)
-Does this device ID belong to a gamepad device?
-
-
-
-protected boolean
-pressed (android.view.KeyEvent event)
-
-
-void
-setJoystickDeadzone (float deadzone)
-Set the joystick deadzone.
-
-
-
-byte[]
-toByteArray ()
-
-
-java.lang.String
-toString ()
-Display a summary of this gamepad, including the state of all buttons, analog sticks, and triggers
-
-
-
-java.lang.String
-type ()
-Get the type of gamepad as a String.
-
-
-
-void
-update (android.view.KeyEvent event)
-Update the gamepad based on a KeyEvent
-
-
-
-void
-update (android.view.MotionEvent event)
-Update the gamepad based on a MotionEvent
-
-
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Field Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-dpad_up
-public boolean dpad_up
-dpad up
-
-
-
-
-
-
-
-dpad_down
-public boolean dpad_down
-dpad down
-
-
-
-
-
-
-
-dpad_left
-public boolean dpad_left
-dpad left
-
-
-
-
-
-
-
-
-
-
-
-a
-public boolean a
-button a
-
-
-
-
-
-
-
-b
-public boolean b
-button b
-
-
-
-
-
-
-
-x
-public boolean x
-button x
-
-
-
-
-
-
-
-y
-public boolean y
-button y
-
-
-
-
-
-
-
-
-
-
-
-start
-public boolean start
-button start
-
-
-
-
-
-
-
-back
-public boolean back
-button back
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-joystickDeadzone
-protected float joystickDeadzone
-If the motion value is less than the threshold, the controller will be
- considered at rest
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-Gamepad
-public Gamepad()
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-toByteArray
+ Monitor a hardware gamepad.
+
+ The buttons, analog sticks, and triggers are represented a public
+ member variables that can be read from or written to directly.
+
+
+ Analog sticks are represented as floats that range from -1.0 to +1.0. They
+ will be 0.0 while at
+ rest. The horizontal axis is labeled x, and the vertical axis is labeled y.
+
+
+ Triggers are represented as floats that range from 0.0 to 1.0. They will be
+ at 0.0 while at
+ rest.
+
+
+ Buttons are boolean values. They will be true if the button is pressed,
+ otherwise they will be
+ false.
+
+
+ The dpad is represented as 4 buttons, dpad_up, dpad_down, dpad_left, and
+ dpad_right
+
+
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+ Nested Classes
+
+
+ Modifier and Type
+ Class and Description
+
+
+ static interface
+ Gamepad.GamepadCallback
+
+ Optional callback interface for monitoring
+ changes due to MotionEvents and KeyEvents.
+
+
+
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+ Fields
+
+ Modifier and Type
+ Field and Description
+
+
+ boolean
+ a
+
+ button a
+
+
+
+ boolean
+ b
+
+ button b
+
+
+
+ boolean
+ back
+
+ button back
+
+
+
+ boolean
+ dpad_down
+
+ dpad down
+
+
+
+ boolean
+ dpad_left
+
+ dpad left
+
+
+
+ boolean
+ dpad_right
+
+ dpad right
+
+
+
+ boolean
+ dpad_up
+
+ dpad up
+
+
+
+ protected float
+ dpadThreshold
+
+ DPAD button will be considered pressed when
+ the movement crosses this
+ threshold
+
+
+
+
+ boolean
+ guide
+
+ button guide - often the large button in the
+ middle of the controller.
+
+
+
+
+ int
+ id
+
+ ID assigned to this gamepad by the OS.
+
+
+
+ static int
+ ID_UNASSOCIATED
+
+ A gamepad with an ID equal to ID_UNASSOCIATED
+ has not been associated with any device.
+
+
+
+
+ protected float
+ joystickDeadzone
+
+ If the motion value is less than the
+ threshold, the controller will be
+ considered at rest
+
+
+
+
+ boolean
+ left_bumper
+
+ button left bumper
+
+
+
+ float
+ left_stick_x
+
+ left analog stick horizontal axis
+
+
+
+ float
+ left_stick_y
+
+ left analog stick vertical axis
+
+
+
+ float
+ left_trigger
+
+ left trigger
+
+
+
+ boolean
+ right_bumper
+
+ button right bumper
+
+
+
+ float
+ right_stick_x
+
+ right analog stick horizontal axis
+
+
+
+ float
+ right_stick_y
+
+ right analog stick vertical axis
+
+
+
+ float
+ right_trigger
+
+ right trigger
+
+
+
+ boolean
+ start
+
+ button start
+
+
+
+ long
+ timestamp
+
+ Relative timestamp of the last time an event
+ was detected
+
+
+
+
+ byte
+ user
+
+ Which user is this gamepad used by
+
+
+
+ boolean
+ x
+
+ button x
+
+
+
+ boolean
+ y
+
+ button y
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+ All Methods Static Methods Instance Methods Concrete Methods
+
+ Modifier and Type
+ Method and Description
+
+
+ boolean
+ atRest ()
+
+ Are all analog sticks and triggers in their
+ rest position?
+
+
+
+
+ protected void
+ callCallback ()
+
+
+
+ protected float
+ cleanMotionValues (float number)
+
+
+
+ static void
+ clearWhitelistFilter ()
+
+ Clear the device whitelist filter.
+
+
+
+ static void
+ enableWhitelistFilter (int vendorId,
+ int productId)
+
+ Add a whitelist filter for a specific device
+ vendor/product ID.
+
+
+
+
+ void
+ fromByteArray (byte[] byteArray)
+
+
+
+ MsgType
+ getRobocolMsgType ()
+
+
+
+ static boolean
+ isGamepadDevice (int deviceId)
+
+ Does this device ID belong to a gamepad
+ device?
+
+
+
+
+ protected boolean
+ pressed (android.view.KeyEvent event)
+
+
+
+ void
+ setJoystickDeadzone (float deadzone)
+
+ Set the joystick deadzone.
+
+
+
+ byte[]
+ toByteArray ()
+
+
+
+ java.lang.String
+ toString ()
+
+ Display a summary of this gamepad, including
+ the state of all buttons, analog sticks, and triggers
+
+
+
+
+ java.lang.String
+ type ()
+
+ Get the type of gamepad as a String.
+
+
+
+ void
+ update (android.view.KeyEvent event)
+
+ Update the gamepad based on a KeyEvent
+
+
+
+ void
+ update (android.view.MotionEvent event)
+
+ Update the gamepad based on a MotionEvent
+
+
+
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Field Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dpad_up
+ public boolean dpad_up
+ dpad up
+
+
+
+
+
+
+
+ dpad_down
+ public boolean dpad_down
+ dpad down
+
+
+
+
+
+
+
+ dpad_left
+ public boolean dpad_left
+ dpad left
+
+
+
+
+
+
+
+
+
+
+
+ a
+ public boolean a
+ button a
+
+
+
+
+
+
+
+ b
+ public boolean b
+ button b
+
+
+
+
+
+
+
+ x
+ public boolean x
+ button x
+
+
+
+
+
+
+
+ y
+ public boolean y
+ button y
+
+
+
+
+
+
+
+
+
+
+
+ start
+ public boolean start
+ button start
+
+
+
+
+
+
+
+ back
+ public boolean back
+ button back
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ joystickDeadzone
+ protected float joystickDeadzone
+ If the motion value is less than the threshold,
+ the controller will be
+ considered at rest
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ Gamepad
+ public Gamepad()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-toString
-public java.lang.String toString()
-Display a summary of this gamepad, including the state of all buttons, analog sticks, and triggers
-
-Overrides:
-toString in class java.lang.Object
-Returns:
-a summary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ toString
+ public java.lang.String toString()
+ Display a summary of this gamepad, including the
+ state of all buttons, analog sticks, and triggers
+
+
+ Overrides:
+ toString in class java.lang.Object
+
+ Returns:
+ a summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Add a whitelist filter for a specific device
+ vendor/product ID.
+
+ This adds a whitelist to the gamepad detection method. If a
+ device has been added to the
+ whitelist, then only devices that match the given vendor ID
+ and product ID will be considered
+ gamepads. This method can be called multiple times to add
+ multiple devices to the whitelist.
+
+
+ If no whitelist entries have been added, then the default OS
+ detection methods will be used.
+
+ Parameters:
+ vendorId - the vendor ID
+ productId - the product ID
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html
index f4b33fb..e01260b 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html
@@ -1,12 +1,13 @@
-
+
-
-GyroSensor
-
-
-
+
+ GyroSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.GyroSensor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.GyroSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-GyroSensor ()
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-GyroSensor
-public GyroSensor()
-
-
-
-
-
-
-
-
-
+ Gyro Sensor
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ GyroSensor ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ GyroSensor
+ public GyroSensor()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareFactory.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareFactory.html
index 2a9a400..ddd6dab 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareFactory.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareFactory.html
@@ -1,12 +1,13 @@
-
+
-
-HardwareFactory
-
-
-
+
+ HardwareFactory
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html
index 9c16739..e84d3db 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html
@@ -1,12 +1,13 @@
-
+
-
-HardwareMap
-
-
-
+
+ HardwareMap
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.HardwareMap
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.HardwareMap
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ HardwareMap ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ HardwareMap
+ public HardwareMap()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSensor.html
index 4746dfe..a2ec37a 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSensor.html
@@ -1,12 +1,13 @@
-
+
-
-IrSeekerSensor.IrSensor
-
-
-
+
+ IrSeekerSensor.IrSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
-
-
-
-
-
-
-
-Enclosing class:
-IrSeekerSensor
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-IrSensor ()
-Constructor
-
-
-
-IrSensor (double angle,
- double strength)
-Constructor
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-IrSensor
-public IrSensor()
-Constructor
-
-
-
-
-
-
-
-IrSensor
+ IR Sensor attached to an IR Seeker
+
+ Get the angle of this sensor, along with signal strength
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ IrSensor ()
+
+ Constructor
+
+
+
+ IrSensor (double angle,
+ double strength)
+
+ Constructor
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ IrSensor
+ public IrSensor()
+ Constructor
+
+
+
+
+
+
-
-
-
-
-
-
-
+ Constructor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html
index c40ab2e..3a8a016 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html
@@ -1,12 +1,13 @@
-
+
-
-IrSeekerSensor.Mode
-
-
-
+
+ IrSeekerSensor.Mode
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-java.lang.Enum<IrSeekerSensor.Mode >
-
-
-com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
-
-
-
-
-
-
-
-
-
-All Implemented Interfaces:
-java.io.Serializable, java.lang.Comparable<IrSeekerSensor.Mode >
-
-
-Enclosing class:
-IrSeekerSensor
-
-
-
+
+ java.lang.Object
+
+
+ java.lang.Enum<IrSeekerSensor.Mode >
+
+
+
+ com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Enum Constant Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Enum
-clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
-
-
-
-
-Methods inherited from class java.lang.Object
-getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Enum Constant Detail
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Returns:
+ an array containing the constants of this enum type, in the
+ order they are declared
+
+
+
+
+
+
+
+
+
+ valueOf
+ public static IrSeekerSensor.Mode valueOf(java.lang.String name)
+ Returns the enum constant of this type with the
+ specified name.
+ The string must match exactly an identifier used to
+ declare an
+ enum constant in this type. (Extraneous whitespace characters
+ are
+ not permitted.)
+
+
+ Parameters:
+ name - the name of the enum constant to be
+ returned.
+
+ Returns:
+ the enum constant with the specified name
+ Throws:
+ java.lang.IllegalArgumentException - if this
+ enum type has no constant with the specified name
+
+ java.lang.NullPointerException - if the
+ argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html
index f7ce9bc..8b38082 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html
@@ -1,12 +1,13 @@
-
+
-
-IrSeekerSensor
-
-
-
+
+ IrSeekerSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Class and Description
-
-
-static class
-IrSeekerSensor.IrSensor
-IR Sensor attached to an IR Seeker
-
-
-
-static class
-IrSeekerSensor.Mode
-Enumeration of device modes
-
-
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-IrSeekerSensor ()
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-IrSeekerSensor
-public IrSeekerSensor()
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-getSensors
-public abstract IrSeekerSensor.IrSensor [] getSensors()
-Get a list of all IR sensors attached to this seeker. The list will include the angle at which
- the sensor is mounted, and the signal strength.
-
-Returns:
-array of IrSensors
-
-
-
-
-
-
-
-
-
-
-
-
+ IR Seeker Sensor
+
+ Determine the location of an IR source
+
+
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+ Nested Classes
+
+
+ Modifier and Type
+ Class and Description
+
+
+ static class
+ IrSeekerSensor.IrSensor
+
+ IR Sensor attached to an IR Seeker
+
+
+
+ static class
+ IrSeekerSensor.Mode
+
+ Enumeration of device modes
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ IrSeekerSensor ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ IrSeekerSensor
+ public IrSeekerSensor()
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getSensors
+ public abstract IrSeekerSensor.IrSensor [] getSensors()
+ Get a list of all IR sensors attached to this
+ seeker. The list will include the angle at which
+ the sensor is mounted, and the signal strength.
+
+
+ Returns:
+ array of IrSensors
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html
index f305fb7..96b855b 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html
@@ -1,12 +1,13 @@
-
+
-
-LegacyModule
-
-
-
+
+ LegacyModule
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Method Summary
-
-All Methods Instance Methods Abstract Methods
-
-Modifier and Type
-Method and Description
-
-
-void
-close ()
-Close the device
-
-
-
-void
-enable9v (int physicalPort,
- boolean enable)
-Enable or disable 9V power on a port
-
-
-
-void
-enableAnalogReadMode (int physicalPort,
- int i2cAddress)
-Enable a physical port in analog read mode
-
-
-
-void
-enableNxtI2cReadMode (int physicalPort,
- int i2cAddress,
- int memAddress,
- int memLength)
-Enable a physical port in NXT I2C read mode
-
-
-
-void
-enableNxtI2cWriteMode (int physicalPort,
- int i2cAddress,
- int memAddress,
- byte[] initialValues)
-Enable a physical port in NXT I2C write mode
-
-
-
-boolean
-isPortReady (int physicalPort)
-Determine if a physical port is ready
-
-
-
-byte[]
-readAnalog (int physicalPort)
-Read an analog value from a device; only works in analog read mode
-
-
-
-byte[]
-readLegacyModuleCache (int physicalPort)
-Read the device memory map; only works in NXT I2C read mode
-
-
-
-void
-setDigitalLine (int physicalPort,
- int line,
- boolean set)
-Set the value of digital line 0 or 1 while in analog mode.
-
-
-
-void
-writeLegacyModuleCache (int physicalPort,
- byte[] data)
-Write to the device memory map; only works in NXT I2C write mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ close
+ void close()
+ Close the device
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html
index 562b516..58fa5c6 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html
@@ -1,12 +1,13 @@
-
+
-
-LightSensor
-
-
-
+
+ LightSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.LightSensor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.LightSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-LightSensor ()
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-LightSensor
-public LightSensor()
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-getLightLevel
-public abstract double getLightLevel()
-Get the amount of light detected by the sensor. 1.0 is max possible light, 0.0 is least
- possible light.
-
-Returns:
-amount of light, on a scale of 0 to 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Light Sensor
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ LightSensor ()
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ LightSensor
+ public LightSensor()
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+ getLightLevel
+ public abstract double getLightLevel()
+ Get the amount of light detected by the sensor.
+ 1.0 is max possible light, 0.0 is least
+ possible light.
+
+
+ Returns:
+ amount of light, on a scale of 0 to 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html
index 4612e9a..2dbed12 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html
@@ -1,12 +1,13 @@
-
+
-
-Servo.Direction
-
-
-
+
+ Servo.Direction
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-java.lang.Enum<Servo.Direction >
-
-
-com.qualcomm.robotcore.hardware.Servo.Direction
-
-
-
-
-
-
-
-
-
-All Implemented Interfaces:
-java.io.Serializable, java.lang.Comparable<Servo.Direction >
-
-
-Enclosing class:
-Servo
-
-
-
+
+ java.lang.Object
+
+
+ java.lang.Enum<Servo.Direction >
+
+
+ com.qualcomm.robotcore.hardware.Servo.Direction
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Enum Constant Summary
-
-Enum Constants
-
-Enum Constant and Description
-
-
-FORWARD
-
-
-REVERSE
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Enum
-clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
-
-
-
-
-Methods inherited from class java.lang.Object
-getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Enum Constant Detail
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Returns:
+ an array containing the constants of this enum type, in the
+ order they are declared
+
+
+
+
+
+
+
+
+
+ valueOf
+ public static Servo.Direction valueOf(java.lang.String name)
+ Returns the enum constant of this type with the
+ specified name.
+ The string must match exactly an identifier used to
+ declare an
+ enum constant in this type. (Extraneous whitespace characters
+ are
+ not permitted.)
+
+
+ Parameters:
+ name - the name of the enum constant to be
+ returned.
+
+ Returns:
+ the enum constant with the specified name
+ Throws:
+ java.lang.IllegalArgumentException - if this
+ enum type has no constant with the specified name
+
+ java.lang.NullPointerException - if the
+ argument is null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html
index e23c795..5a931d1 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html
@@ -1,12 +1,13 @@
-
+
-
-Servo
-
-
-
+
+ Servo
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.Servo
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.Servo
+
+
+
+
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Class and Description
-
-
-static class
-Servo.Direction
-Motor direction
-
-
-
-
-
-
-
-
-
-
-Field Summary
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Field Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-portNumber
-protected int portNumber
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Nested Class Summary
+
+ Nested Classes
+
+
+ Modifier and Type
+ Class and Description
+
+
+ static class
+ Servo.Direction
+
+ Motor direction
+
+
+
+
+
+
+
+
+
+
+
+ Field Summary
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Field Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ portNumber
+ protected int portNumber
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-scaleRange
+ Servo.Direction direction)
+ COnstructor
+
+ Parameters:
+ controller - Servo controller that this servo
+ is attached to
+
+ portNumber - physical port number on the servo
+ controller
+
+ direction - FORWARD for normal operation,
+ REVERSE to reverse operation
+
+
+
+
+
+
+
+
-
-
-
+ Automatically scale the position of the servo.
+
+ For example, if scaleRange(0.2, 0.8) is set; then servo
+ positions will be
+ scaled to fit in that range.
+ setPosition(0.0) scales to 0.2
+ setPosition(1.0) scales to 0.8
+ setPosition(0.5) scales to 0.5
+ setPosition(0.25) scales to 0.35
+ setPosition(0.75) scales to 0.65
+
+
+ This is useful if you don't want the servo to move past a
+ given position,
+ but don't want to manually scale the input to setPosition
+ each time.
+ getPosition() will scale the value back to a value between
+ 0.0 and 1.0. If
+ you need to know the actual position use
+ Servo.getController().getServoPosition(Servo.getChannel()).
+
+
+ Parameters:
+ min - minimum position of the servo from 0.0 to
+ 1.0
+
+ max - maximum position of the servo from 0.0 to
+ 1.0
+
+ Throws:
+ java.lang.IllegalArgumentException - if out of
+ bounds, or min >= max
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html
index e83a33d..819b0d1 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html
@@ -1,12 +1,13 @@
-
+
-
-ServoController
-
-
-
+
+ ServoController
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Nested Class Summary
-
-Nested Classes
-
-Modifier and Type
-Interface and Description
-
-
-static class
-ServoController.PwmStatus
-PWM Status - is pwm enabled?
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-getVersion
-int getVersion()
-Version
-
-Returns:
-get the version of this device
-
-
-
-
-
-
-
-
-close
-void close()
-Close this device
-
-
-
-
-
-
-
-pwmEnable
-void pwmEnable()
-PWM enable
-
-
-
-
-
-
-
-pwmDisable
-void pwmDisable()
-PWM disable
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html
index ebc8ff9..e4b8fde 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html
@@ -1,12 +1,13 @@
-
+
-
-UltrasonicSensor
-
-
-
+
+ UltrasonicSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.hardware.UltrasonicSensor
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.hardware.UltrasonicSensor
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html
index 2c39515..da7a2b0 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html
@@ -1,12 +1,13 @@
-
+
-
-VoltageSensor
-
-
-
+
+ VoltageSensor
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-getVoltage
-double getVoltage()
-Get the current voltage
-
-Returns:
-voltage
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+ getVoltage
+ double getVoltage()
+ Get the current voltage
+
+ Returns:
+ voltage
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html
index 05c7e85..88b8d0a 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html
@@ -1,57 +1,99 @@
-
+
-
-com.qualcomm.robotcore.hardware
-
-
-
+
+ com.qualcomm.robotcore.hardware
+
+
+
-
+
+
-
Interfaces
-
-
Classes
-
-
Enums
-
+
Interfaces
+
+
Classes
+
+
Enums
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html
index 0aabd9a..286bfee 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html
@@ -1,12 +1,13 @@
-
+
-
-com.qualcomm.robotcore.hardware
-
-
-
+
+ com.qualcomm.robotcore.hardware
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
-
-
-Interface Summary
-
-Interface
-Description
-
-
-
-DcMotor.MotorCallback
-
-mock API
+
+
+
+ Interface Summary
+
+ Interface
+ Description
+
+
+
+ DcMotor.MotorCallback
+
+
+ mock API
- TODO: decide if we want to remove or implement this API
-
-
-
-DcMotorController
-
-Interface for working with DC Motor Controllers
-
-
-
-DigitalChannelController
-
-Interface for working with Digital Channel Controllers
-
-
-
-Gamepad.GamepadCallback
-
-Optional callback interface for monitoring changes due to MotionEvents and KeyEvents.
-
-
-
-HardwareFactory
-
-Interface for a Hardware Factory
+ TODO: decide if we want to remove or implement this API
+
+
+
+
+ DcMotorController
+
+
+ Interface for working with DC Motor Controllers
+
+
+
+ DigitalChannelController
+
+
+ Interface for working with Digital Channel Controllers
+
+
+
+
+ Gamepad.GamepadCallback
+
+
+ Optional callback interface for monitoring changes due to
+ MotionEvents and KeyEvents.
+
+
+
+
+ HardwareFactory
+
+
+ Interface for a Hardware Factory
- A Hardware Factory should populate a HardwareMap, and return that map to
- the user.
-
-
-
-LegacyModule
-
-Legacy Module for working with NXT devices
-
-
-
-ServoController
-
-Interface for working with Servo Controllers
-
-
-
-VoltageSensor
-
-Voltage Sensor
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
Package com.qualcomm.robotcore.hardware Description
-
RobotCore hardware library.
-
- Contains libraries for working with gamepads, DC motor controllers, servo controllers, and more.
+ By default this creates a bunch of empty mappings between a string and
+ an
+ instance of a hardware driver.
+
+
+
+
+ HardwareMap.DeviceMapping <DEVICE_TYPE>
+
+
+
+
+ IrSeekerSensor
+
+ IR Seeker Sensor
+
+
+
+ IrSeekerSensor.IrSensor
+
+
+ IR Sensor attached to an IR Seeker
+
+
+
+ LightSensor
+
+ Light Sensor
+
+
+
+ Servo
+
+ Control a single servo
+
+
+
+ UltrasonicSensor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Package
+ com.qualcomm.robotcore.hardware Description
+
+
RobotCore hardware library.
+
+ Contains libraries for working with gamepads, DC motor controllers, servo controllers,
+ and more.
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html
index c6ab45a..b59b259 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html
@@ -1,12 +1,13 @@
-
+
-
-com.qualcomm.robotcore.hardware Class Hierarchy
-
-
-
+
+ com.qualcomm.robotcore.hardware Class Hierarchy
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
Class Hierarchy
-
-
Interface Hierarchy
-
-
Enum Hierarchy
-
-java.lang.Object
-
-java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
-
-
-
-
-
+
Class Hierarchy
+
+
Interface Hierarchy
+
+
Enum Hierarchy
+
+ java.lang.Object
+
+ java.lang.Enum<E> (implements java.lang.Comparable<T>,
+ java.io.Serializable)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/DifferentialControlLoopCoefficients.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/DifferentialControlLoopCoefficients.html
index eb801c4..0990f89 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/DifferentialControlLoopCoefficients.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/DifferentialControlLoopCoefficients.html
@@ -1,12 +1,13 @@
-
+
-
-DifferentialControlLoopCoefficients
-
-
-
+
+ DifferentialControlLoopCoefficients
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html
index e13645f..212013e 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html
@@ -1,12 +1,13 @@
-
+
-
-ElapsedTime
-
-
-
+
+ ElapsedTime
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.util.ElapsedTime
-
-
-
-
-
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.util.ElapsedTime
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-ElapsedTime ()
-Constructor
-
-
-
-ElapsedTime (long startTime)
-Constructor
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-All Methods Instance Methods Concrete Methods
-
-Modifier and Type
-Method and Description
-
-
-void
-log (java.lang.String label)
-Log a message stating how long the timer has been running
-
-
-
-void
-reset ()
-Reset the start time to now
-
-
-
-double
-startTime ()
-Get the relative start time
-
-
-
-double
-time ()
-How many seconds since the start time.
-
-
-
-java.lang.String
-toString ()
-Return a string stating the number of seconds that have passed
-
-
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-ElapsedTime
-public ElapsedTime()
-Constructor
-
- Starts the timer
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Measure elapsed time
+
+ Does not measure deep sleep. Nanosecond accuracy.
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ ElapsedTime ()
+
+ Constructor
+
+
+
+ ElapsedTime (long startTime)
+
+ Constructor
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+ All Methods Instance Methods Concrete Methods
+
+ Modifier and Type
+ Method and Description
+
+
+ void
+ log (java.lang.String label)
+
+ Log a message stating how long the timer has
+ been running
+
+
+
+
+ void
+ reset ()
+
+ Reset the start time to now
+
+
+
+ double
+ startTime ()
+
+ Get the relative start time
+
+
+
+ double
+ time ()
+
+ How many seconds since the start time.
+
+
+
+ java.lang.String
+ toString ()
+
+ Return a string stating the number of seconds
+ that have passed
+
+
+
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+ ElapsedTime
+ public ElapsedTime()
+ Constructor
+
+ Starts the timer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/Range.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/Range.html
index c205d21..995e47d 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/Range.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/Range.html
@@ -1,12 +1,13 @@
-
+
-
-Range
-
-
-
+
+ Range
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.util.Range
-
-
-
-
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html
index e53141e..da37e07 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html
@@ -1,12 +1,13 @@
-
+
-
-SerialNumber
-
-
-
+
+ SerialNumber
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.util.SerialNumber
-
-
-
-
-
-
-
-All Implemented Interfaces:
-java.io.Serializable
-
-
-
+
+ java.lang.Object
+
+
+ com.qualcomm.robotcore.util.SerialNumber
+
+
+
+
-
-
-
-
-
-
-
-
-Constructor Summary
-
-Constructors
-
-Constructor and Description
-
-
-SerialNumber ()
-Constructor - use default serial number
-
-
-
-SerialNumber (java.lang.String serialNumber)
-Constructor - use supplied serial number
-
-
-
-
-
-
-
-
-
-
-Method Summary
-
-
-
-
-
-Methods inherited from class java.lang.Object
-clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Constructor Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Method Detail
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-hashCode
-public int hashCode()
-
-Overrides:
-hashCode in class java.lang.Object
-
-
-
-
-
-
-
-
-
-
-
-
+ Manage a serial number
+
+ See Also:
+
+ Serialized
+ Form
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Summary
+
+ Constructors
+
+
+ Constructor and Description
+
+
+ SerialNumber ()
+
+ Constructor - use default serial number
+
+
+
+ SerialNumber (java.lang.String serialNumber)
+
+ Constructor - use supplied serial number
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Summary
+
+
+
+
+
+
+ Methods inherited from class java.lang.Object
+ clone, finalize, getClass, notify, notifyAll, wait, wait,
+ wait
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hashCode
+ public int hashCode()
+
+ Overrides:
+ hashCode in class java.lang.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html
index 3a460d3..0c0df3a 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html
@@ -1,12 +1,13 @@
-
+
-
-TypeConversion
-
-
-
+
+ TypeConversion
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
-
-java.lang.Object
-
-
-com.qualcomm.robotcore.util.TypeConversion
-
-
-
-
-
+
+
+
+
+
+ unsignedByteToInt
+ public static int unsignedByteToInt(byte b)
+ Accept a byte, treat that byte as an unsigned
+ byte, then covert it to the return type
+
+
+ Parameters:
+ b - byte to treat as unsigned byte
+ Returns:
+ a positive between 0 and 255
+
+
+
+
+
+
+
+
+ unsignedByteToDouble
+ public static double unsignedByteToDouble(byte b)
+ Accept a byte, treat that byte as an unsigned
+ byte, then covert it to the return type
+
+
+ Parameters:
+ b - byte to treat as unsigned byte
+ Returns:
+ a positive between 0 and 255
+
+
+
+
+
+
+
+
+ unsignedIntToLong
+ public static long unsignedIntToLong(int i)
+ Accept an int, treat that int as an unsigned int,
+ then covert it to the return type
+
+
+ Parameters:
+ i - int to treat as unsigned int
+ Returns:
+ a positive between 0 and 2^32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-Summary:
-Nested |
-Field |
-Constr |
-Method
-
-
-Detail:
-Field |
-Constr |
-Method
-
-
-
-
-
+
+
+
+
+
+ Summary:
+ Nested |
+ Field |
+ Constr |
+ Method
+
+
+ Detail:
+ Field |
+ Constr |
+ Method
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html
index c557482..bdad14b 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html
@@ -1,24 +1,33 @@
-
+
-
-com.qualcomm.robotcore.util
-
-
-
+
+ com.qualcomm.robotcore.util
+
+
+
-
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html
index b5b0d34..f53cb1a 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html
@@ -1,12 +1,13 @@
-
+
-
-com.qualcomm.robotcore.util
-
-
-
+
+ com.qualcomm.robotcore.util
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html
index 9435509..de34a7a 100644
--- a/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html
+++ b/Android/App/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html
@@ -1,12 +1,13 @@
-
+
-
-com.qualcomm.robotcore.util Class Hierarchy
-
-
-
+
+ com.qualcomm.robotcore.util Class Hierarchy
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
Class Hierarchy
-
+
Class Hierarchy
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/constant-values.html b/Android/App/doc/javadoc/constant-values.html
index a693a58..6522b08 100644
--- a/Android/App/doc/javadoc/constant-values.html
+++ b/Android/App/doc/javadoc/constant-values.html
@@ -1,12 +1,13 @@
-
+
-
-Constant Field Values
-
-
-
+
+ Constant Field Values
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
+
-
com.qualcomm.*
-
-
-
-
-
-
-com.qualcomm.ftccommon.DbgLog
-
-Modifier and Type
-Constant Field
-Value
-
-
-
-
-
- public static final java.lang.String
-ERROR_PREPEND
-"### ERROR: "
-
-
-
-
- public static final java.lang.String
-TAG
-"FIRST"
-
-
-
-
-
-
-
-
-
-
-
-
-com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-Modifier and Type
-Constant Field
-Value
-
-
-
-
-
- public static final java.lang.String
-DEFAULT_OP_MODE_NAME
-"Stop Robot"
-
-
-
-
-
-
-
-
-com.qualcomm.robotcore.hardware.Gamepad
-
-Modifier and Type
-Constant Field
-Value
-
-
-
-
-
- public static final int
-ID_UNASSOCIATED
--1
-
-
-
-
-
-
-com.qualcomm.robotcore.hardware.Servo
-
-Modifier and Type
-Constant Field
-Value
-
-
-
-
-
- public static final double
-MAX_POSITION
-1.0
-
-
-
-
- public static final double
-MIN_POSITION
-0.0
-
-
-
-
-
+
+
com.qualcomm.*
+
+
+
+
+
+
+ com.qualcomm.ftccommon.DbgLog
+
+ Modifier and Type
+ Constant Field
+ Value
+
+
+
+
+
+ public static final java.lang.String
+ ERROR_PREPEND
+
+ "### ERROR: "
+
+
+
+
+ public static final java.lang.String
+ TAG
+ "FIRST"
+
+
+
+
+
+
+ com.qualcomm.ftccommon.Device
+
+ Modifier and Type
+ Constant Field
+ Value
+
+
+
+
+
+ public static final java.lang.String
+ MANUFACTURER_ZTE
+
+ "zte"
+
+
+
+
+ public static final java.lang.String
+ MODEL_FOXDA_FL7007
+
+ "FL7007"
+
+
+
+
+ public static final java.lang.String
+ MODEL_ZTE_SPEED
+
+ "N9130"
+
+
+
+
+
+
+
+
+
+ com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ Modifier and Type
+ Constant Field
+ Value
+
+
+
+
+
+ public static final java.lang.String
+ DEFAULT_OP_MODE_NAME
+
+ "Stop Robot"
+
+
+
+
+
+
+
+
+ com.qualcomm.robotcore.hardware.Gamepad
+
+ Modifier and Type
+ Constant Field
+ Value
+
+
+
+
+
+ public static final int
+ ID_UNASSOCIATED
+
+ -1
+
+
+
+
+
+
+ com.qualcomm.robotcore.hardware.Servo
+
+ Modifier and Type
+ Constant Field
+ Value
+
+
+
+
+
+ public static final double
+ MAX_POSITION
+
+ 1.0
+
+
+
+
+ public static final double
+ MIN_POSITION
+
+ 0.0
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/deprecated-list.html b/Android/App/doc/javadoc/deprecated-list.html
index be0e730..652a0f0 100644
--- a/Android/App/doc/javadoc/deprecated-list.html
+++ b/Android/App/doc/javadoc/deprecated-list.html
@@ -1,12 +1,13 @@
-
+
-
-Deprecated List
-
-
-
+
+ Deprecated List
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/help-doc.html b/Android/App/doc/javadoc/help-doc.html
index 3551323..56ec2c7 100644
--- a/Android/App/doc/javadoc/help-doc.html
+++ b/Android/App/doc/javadoc/help-doc.html
@@ -1,12 +1,13 @@
-
+
-
-API Help
-
-
-
+
+ API Help
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
-
-Overview
-The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-
-
-Package
-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-
-Interfaces (italic)
-Classes
-Enums
-Exceptions
-Errors
-Annotation Types
-
-
-
-Class/Interface
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-
-Class inheritance diagram
-Direct Subclasses
-All Known Subinterfaces
-All Known Implementing Classes
-Class/interface declaration
-Class/interface description
-
-
-Nested Class Summary
-Field Summary
-Constructor Summary
-Method Summary
-
-
-Field Detail
-Constructor Detail
-Method Detail
-
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-
-
-Annotation Type
-Each annotation type has its own separate page with the following sections:
-
-Annotation Type declaration
-Annotation Type description
-Required Element Summary
-Optional Element Summary
-Element Detail
-
-
-
-Enum
-Each enum has its own separate page with the following sections:
-
-Enum declaration
-Enum description
-Enum Constant Summary
-Enum Constant Detail
-
-
-
-Tree (Class Hierarchy)
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
-
-When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
-When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
-
-
-
-Deprecated API
-The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-
-
-Index
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-
-
-Prev/Next
-These links take you to the next or previous class, interface, package, or related page.
-
-
-Frames/No Frames
-These links show and hide the HTML frames. All pages are available with or without frames.
-
-
-All Classes
-The All Classes link shows all classes and interfaces except non-static nested types.
-
-
-Serialized Form
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-
-
-Constant Field Values
-The Constant Field Values page lists the static final fields and their values.
-
-
-
This help file applies to API documentation generated using the standard doclet.
+
+
+ Overview
+
+ The Overview page is the front page of this API
+ document and provides a list of all packages with a summary for each. This page can
+ also contain an overall description of the set of packages.
+
+
+ Package
+
+ Each package has a page that contains a list of its classes and interfaces, with a
+ summary for each. This page can contain six categories:
+
+ Interfaces (italic)
+ Classes
+ Enums
+ Exceptions
+ Errors
+ Annotation Types
+
+
+
+ Class/Interface
+
+ Each class, interface, nested class and nested interface has its own separate page.
+ Each of these pages has three sections consisting of a class/interface description,
+ summary tables, and detailed member descriptions:
+
+ Class inheritance diagram
+ Direct Subclasses
+ All Known Subinterfaces
+ All Known Implementing Classes
+ Class/interface declaration
+ Class/interface description
+
+
+ Nested Class Summary
+ Field Summary
+ Constructor Summary
+ Method Summary
+
+
+ Field Detail
+ Constructor Detail
+ Method Detail
+
+ Each summary entry contains the first sentence from the detailed description for that
+ item. The summary entries are alphabetical, while the detailed descriptions are in
+ the order they appear in the source code. This preserves the logical groupings
+ established by the programmer.
+
+
+ Annotation Type
+
+ Each annotation type has its own separate page with the following sections:
+
+ Annotation Type declaration
+ Annotation Type description
+ Required Element Summary
+ Optional Element Summary
+ Element Detail
+
+
+
+ Enum
+
+ Each enum has its own separate page with the following sections:
+
+ Enum declaration
+ Enum description
+ Enum Constant Summary
+ Enum Constant Detail
+
+
+
+ Tree (Class Hierarchy)
+
+ There is a Class Hierarchy page for all packages,
+ plus a hierarchy for each package. Each hierarchy page contains a list of classes
+ and a list of interfaces. The classes are organized by inheritance structure
+ starting with java.lang.Object. The interfaces do not inherit from
+ java.lang.Object.
+
+ When viewing the Overview page, clicking on "Tree" displays the hierarchy for
+ all packages.
+
+ When viewing a particular package, class or interface page, clicking "Tree"
+ displays the hierarchy for only that package.
+
+
+
+
+ Deprecated API
+
+ The Deprecated API page lists all of the API that
+ have been deprecated. A deprecated API is not recommended for use, generally due to
+ improvements, and a replacement API is usually given. Deprecated APIs may be removed
+ in future implementations.
+
+
+ Index
+
+ The Index contains an alphabetic list of all classes,
+ interfaces, constructors, methods, and fields.
+
+
+ Prev/Next
+
+ These links take you to the next or previous class, interface, package, or related
+ page.
+
+
+ Frames/No Frames
+
+ These links show and hide the HTML frames. All pages are available with or without
+ frames.
+
+
+ All Classes
+
+ The All Classes link shows all classes and
+ interfaces except non-static nested types.
+
+
+ Serialized Form
+
+ Each serializable or externalizable class has a description of its serialization
+ fields and methods. This information is of interest to re-implementors, not to
+ developers using the API. While there is no link in the navigation bar, you can get
+ to this information by going to any serialized class and clicking "Serialized Form"
+ in the "See also" section of the class description.
+
+
+ Constant Field Values
+
+ The Constant Field Values page lists the static
+ final fields and their values.
+
+
+ This help file applies to API documentation generated using the standard doclet.
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/index-all.html b/Android/App/doc/javadoc/index-all.html
index c893f28..aa4c258 100644
--- a/Android/App/doc/javadoc/index-all.html
+++ b/Android/App/doc/javadoc/index-all.html
@@ -1,12 +1,13 @@
-
+
-
-Index
-
-
-
+
+ Index
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-A B C D E F G H I J L M N O P R S T U V W X Y Z
-
-
-
A
-
-a - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button a
-
-Acceleration() - Constructor for class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
-
-Acceleration(double, double, double) - Constructor for class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
-
-AccelerationSensor - Class in com.qualcomm.robotcore.hardware
-
-Acceleration Sensor
-
-AccelerationSensor() - Constructor for class com.qualcomm.robotcore.hardware.AccelerationSensor
-
-accelerationSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-AccelerationSensor.Acceleration - Class in com.qualcomm.robotcore.hardware
-
-Acceleration in the x, y, and z axis
-
-appContext - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-atRest() - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Are all analog sticks and triggers in their rest position?
-
-
-
-
+A B C D E F G H I J L M N O P R S T U V W X Y Z
+
-
B
-
-b - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button b
-
-back - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button back
-
-blockUntilReady() - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice
-
-This method should block until it is ready for the event loop to run, Once this method has
- returned, subsequent calls should return immediately until startBlockingWork() has been called.
-
-buildAndSendTelemetry(String, String) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-byteArrayToInt(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a byte array into an int; big endian is assumed
-
-byteArrayToInt(byte[], ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a byte array into an int
-
-byteArrayToLong(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a byte array into a long; big endian is assumed
-
-byteArrayToLong(byte[], ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a byte array into a long
-
-byteArrayToShort(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a short into a byte array; big endian is assumed
-
-byteArrayToShort(byte[], ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a short into a byte array
-
-
-
-
-
-
C
-
-calibrationFailed() - Method in class com.qualcomm.robotcore.hardware.CompassSensor
-
-Check to see whether calibration was successful.
-
-Callback() - Constructor for class com.qualcomm.ftccommon.UpdateUI.Callback
-
-callCallback() - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-cancelResume() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-cleanMotionValues(float) - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-clearWhitelistFilter() - Static method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Clear the device whitelist filter.
-
-clip(double, double, double) - Static method in class com.qualcomm.robotcore.util.Range
-
-clip 'number' if 'number' is less than 'min' or greater than 'max'
-
-clip(float, float, float) - Static method in class com.qualcomm.robotcore.util.Range
-
-clip 'number' if 'number' is less than 'min' or greater than 'max'
-
-close() - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Close this device
-
-close() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Close this device
-
-close() - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Close the device
-
-close() - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-Close this device
-
-CMD_CANCEL_RESUME - Static variable in class com.qualcomm.ftccommon.CommandList
-
-Command to cancel "restart" of op mode.
-
-CMD_REQUEST_OP_MODE_LIST - Static variable in class com.qualcomm.ftccommon.CommandList
-
-Command to request the list of op modes
-
-CMD_REQUEST_OP_MODE_LIST_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
-
-
-
-CMD_RESTART_ROBOT - Static variable in class com.qualcomm.ftccommon.CommandList
-
-Command to restart the robot
-
-CMD_RESUME_OP_MODE - Static variable in class com.qualcomm.ftccommon.CommandList
-
-
-
-CMD_RESUME_OP_MODE_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
-
-Response send after resuming an op mode
+
C
+
+ calibrationFailed()
+ - Method in class com.qualcomm.robotcore.hardware.CompassSensor
+
+ Check to see whether calibration was successful.
+
+ Callback()
+ - Constructor for class com.qualcomm.ftccommon.UpdateUI.Callback
+
+ callCallback()
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ cancelResume()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ cleanMotionValues(float)
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ clearWhitelistFilter()
+ - Static method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Clear the device whitelist filter.
+
+ clip(double,
+ double, double) - Static method in class com.qualcomm.robotcore.util.Range
+
+ clip 'number' if 'number' is less than 'min' or greater than 'max'
+
+
+ clip(float,
+ float, float) - Static method in class com.qualcomm.robotcore.util.Range
+
+ clip 'number' if 'number' is less than 'min' or greater than 'max'
+
+
+ close()
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Close this device
+
+ close()
+ - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Close this device
+
+ close()
+ - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Close the device
+
+ close()
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ Close this device
+
+ CMD_CANCEL_RESUME
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Command to cancel "restart" of op mode.
+
+ CMD_REQUEST_OP_MODE_LIST
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Command to request the list of op modes
+
+ CMD_REQUEST_OP_MODE_LIST_RESP
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Response to a command to request the list of op modes
- Op mode to restart will be in extra data
-
-CMD_SWITCH_OP_MODE - Static variable in class com.qualcomm.ftccommon.CommandList
-
-Command to switch op modes
- New op mode will be in extra data
-
-CMD_SWITCH_OP_MODE_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
-
-Response to a command to switch op modes.
-
-com.qualcomm.ftccommon - package com.qualcomm.ftccommon
-
-Classes common to FTC aps
-
-com.qualcomm.robotcore.eventloop - package com.qualcomm.robotcore.eventloop
-
-RobotCore event loop library.
-
-com.qualcomm.robotcore.eventloop.opmode - package com.qualcomm.robotcore.eventloop.opmode
-
-com.qualcomm.robotcore.exception - package com.qualcomm.robotcore.exception
-
-RobotCore exception library.
-
-com.qualcomm.robotcore.hardware - package com.qualcomm.robotcore.hardware
-
-RobotCore hardware library.
-
-com.qualcomm.robotcore.util - package com.qualcomm.robotcore.util
-
-CommandList - Class in com.qualcomm.ftccommon
-
-List of RobotCore Robocol commands used by the FIRST apps
-
-CommandList() - Constructor for class com.qualcomm.ftccommon.CommandList
-
-CompassSensor - Class in com.qualcomm.robotcore.hardware
-
-Compass Sensor
-
-CompassSensor() - Constructor for class com.qualcomm.robotcore.hardware.CompassSensor
-
-compassSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-CompassSensor.CompassMode - Enum in com.qualcomm.robotcore.hardware
-
-controller - Variable in class com.qualcomm.robotcore.hardware.DcMotor
-
-controller - Variable in class com.qualcomm.robotcore.hardware.Servo
-
-createDcMotor(DcMotorController, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a DcMotor
-
-createHardwareMap(EventLoopManager) - Method in interface com.qualcomm.robotcore.hardware.HardwareFactory
-
-Create a hardware map
-
-createNxtAccelerationSensor(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a AccelerationSensor
-
-createNxtCompassSensor(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a NxtCompassSensor
-
-createNxtDcMotorController(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of an NXT DcMotorController
-
-createNxtGyroSensor(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a GyroSensor
-
-createNxtIrSeekerSensor(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a IrSeekerSensor
-
-createNxtLightSensor(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a LightSensor
-
-createNxtServoController(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of an NXT ServoController
-
-createNxtUltrasonicSensor(LegacyModule, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of an UltrasonicSensor
-
-createServo(ServoController, int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a Servo
-
-createUsbDcMotorController(SerialNumber) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a DcMotorController
-
-createUsbLegacyModule(SerialNumber) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a LegacyModule
-
-createUsbServoController(SerialNumber) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Create an instance of a ServoController
-
-
-
-
-
-
D
-
-d - Variable in class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
-
-d coefficient
-
-DbgLog - Class in com.qualcomm.ftccommon
-
-Provide utility methods for debug logging
-
-DcMotor - Class in com.qualcomm.robotcore.hardware
-
-Control a DC Motor attached to a DC Motor Controller
-
-DcMotor(DcMotorController, int) - Constructor for class com.qualcomm.robotcore.hardware.DcMotor
-
-Constructor
-
-DcMotor(DcMotorController, int, DcMotor.Direction) - Constructor for class com.qualcomm.robotcore.hardware.DcMotor
-
-Constructor
-
-dcMotor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-DcMotor.Direction - Enum in com.qualcomm.robotcore.hardware
-
-Motor direction
-
-DcMotor.MotorCallback - Interface in com.qualcomm.robotcore.hardware
-
-mock API
+ Op modes will be in extra data
+
+
+ CMD_RESTART_ROBOT
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Command to restart the robot
+
+ CMD_RESUME_OP_MODE
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Response to a command to restart after dropping connection
- TODO: decide if we want to remove or implement this API
-
-DcMotorController - Interface in com.qualcomm.robotcore.hardware
-
-Interface for working with DC Motor Controllers
-
-dcMotorController - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-DcMotorController.DeviceMode - Enum in com.qualcomm.robotcore.hardware
-
-DcMotorController.RunMode - Enum in com.qualcomm.robotcore.hardware
-
-DEFAULT_OP_MODE - Static variable in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-DEFAULT_OP_MODE_NAME - Static variable in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-Device - Class in com.qualcomm.ftccommon
-
-Created by jberling on 3/16/15.
-
-Device() - Constructor for class com.qualcomm.ftccommon.Device
-
-DeviceManager - Class in com.qualcomm.robotcore.hardware
-
-DeviceManager() - Constructor for class com.qualcomm.robotcore.hardware.DeviceManager
-
-DeviceManager.DeviceType - Enum in com.qualcomm.robotcore.hardware
-
-Enum of Device Types
-
-DeviceMapping() - Constructor for class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
-
-devMode - Variable in class com.qualcomm.robotcore.hardware.DcMotor
-
-DifferentialControlLoopCoefficients - Class in com.qualcomm.robotcore.util
-
-Contains p, i, and d coefficients for control loops
-
-DifferentialControlLoopCoefficients() - Constructor for class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
-
-Constructor with coefficients set to 0.0
-
-DifferentialControlLoopCoefficients(double, double, double) - Constructor for class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
-
-Constructor with coefficients supplied
-
-DigitalChannel - Class in com.qualcomm.robotcore.hardware
-
-Control a single digital channel
-
-DigitalChannel(DigitalChannelController, int) - Constructor for class com.qualcomm.robotcore.hardware.DigitalChannel
-
-Constructor
-
-DigitalChannelController - Interface in com.qualcomm.robotcore.hardware
-
-Interface for working with Digital Channel Controllers
-
-DigitalChannelController.Mode - Enum in com.qualcomm.robotcore.hardware
-
-Digital channel mode - input or output
-
-direction - Variable in class com.qualcomm.robotcore.hardware.DcMotor
-
-direction - Variable in class com.qualcomm.robotcore.hardware.Servo
-
-displayGamePadInfo(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-dpad_down - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-dpad down
-
-dpad_left - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-dpad left
-
-dpad_right - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-dpad right
-
-dpad_up - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-dpad up
-
-dpadThreshold - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-DPAD button will be considered pressed when the movement crosses this
- threshold
-
-
-
-
-
-
E
-
-ElapsedTime - Class in com.qualcomm.robotcore.util
-
-Measure elapsed time
-
-ElapsedTime() - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
-
-Constructor
-
-ElapsedTime(long) - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
-
-Constructor
-
-enable9v(int, boolean) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Enable or disable 9V power on a port
-
-enableAnalogReadMode(int, int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Enable a physical port in analog read mode
-
-enableLed(boolean) - Method in class com.qualcomm.robotcore.hardware.LightSensor
-
-Enable the LED light
-
-enableNxtI2cReadMode(int, int, int, int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Enable a physical port in NXT I2C read mode
-
-enableNxtI2cWriteMode(int, int, int, byte[]) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Enable a physical port in NXT I2C write mode
-
-enableWhitelistFilter(int, int) - Static method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Add a whitelist filter for a specific device vendor/product ID.
-
-encoder(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotor.MotorCallback
-
-entrySet() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
-
-equals(Object) - Method in class com.qualcomm.robotcore.util.SerialNumber
-
-error(String) - Static method in class com.qualcomm.ftccommon.DbgLog
-
-Log an error message
-
-ERROR_PREPEND - Static variable in class com.qualcomm.ftccommon.DbgLog
-
-EventLoop - Interface in com.qualcomm.robotcore.eventloop
-
-Event loop interface
-
-EventLoopManager - Class in com.qualcomm.robotcore.eventloop
-
-Event Loop Manager
-
-EventLoopManager(RobocolDatagramSocket) - Constructor for class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Constructor
-
-EventLoopManager.EventLoopMonitor - Interface in com.qualcomm.robotcore.eventloop
-
-Callback to monitor when event loop changes state
-
-EventLoopManager.State - Enum in com.qualcomm.robotcore.eventloop
-
-
-
-
-
-
F
-
-finishRestart(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-fromByteArray(byte[]) - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-FtcEventLoopHandler - Class in com.qualcomm.ftccommon
-
-FtcEventLoopHandler(HardwareFactory, UpdateUI.Callback) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-FtcRobotControllerBinder() - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
-
-FtcRobotControllerService - Class in com.qualcomm.ftccommon
-
-FtcRobotControllerService() - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerService
-
-FtcRobotControllerService.FtcRobotControllerBinder - Class in com.qualcomm.ftccommon
-
-
-
-
-
-
G
-
-Gamepad - Class in com.qualcomm.robotcore.hardware
-
-Monitor a hardware gamepad.
-
-Gamepad() - Constructor for class com.qualcomm.robotcore.hardware.Gamepad
-
-Gamepad(Gamepad.GamepadCallback) - Constructor for class com.qualcomm.robotcore.hardware.Gamepad
-
-Gamepad.GamepadCallback - Interface in com.qualcomm.robotcore.hardware
-
-Optional callback interface for monitoring changes due to MotionEvents and KeyEvents.
-
-gamepad1 - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-Gamepad 1
-
-gamepad2 - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-Gamepad 2
-
-gamepadChanged(Gamepad) - Method in interface com.qualcomm.robotcore.hardware.Gamepad.GamepadCallback
-
-This method will be called whenever the gamepad state has changed due to either a KeyEvent
- or a MotionEvent.
-
-get(String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
-
-getAcceleration() - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor
-
-Acceleration, measured in g's
-
-getActiveOpMode() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-getActiveOpModeName() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-getAngle() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-Estimated angle in which the signal is coming from
-
-getChainedException() - Method in exception com.qualcomm.robotcore.exception.RobotCoreException
-
-getChannelMode() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get the current channel mode
-
-getController() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get DC motor controller
-
-getController() - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Get Servo Controller
-
-getCurrentPosition() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get the current encoder value
-
-getDeviceName() - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Device Name
-
-getDeviceName() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Device Name
-
-getDeviceName() - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-Device Name
-
-getDifferentialControlLoopCoefficients(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the differential control loop coefficients
-
-getDigitalChannelMode(int) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Get the mode of a digital channel
-
-getDigitalChannelState(int) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Get the state of a digital channel
-
-getDirection() - Method in class com.qualcomm.robotcore.hardware.CompassSensor
-
-Get the current direction, in degrees
-
-getDirection() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get the direction
-
-getDirection() - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Get the direction
-
-getEncoders(DcMotor.MotorCallback) - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-getEventLoop() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Get the current event loop
-
-getGamepad() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Get the current gamepad state
-
-getGamepad(int) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Get the gamepad connected to a particular user
-
-getGamepads() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-getGamepads() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Get the gamepads
-
-getGearRatio(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the gear ratio
-
-getHardwareMap() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-getHardwareMap() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-getHeartbeat() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Get the current heartbeat state
-
-getLightLevel() - Method in class com.qualcomm.robotcore.hardware.LightSensor
-
-Get the amount of light detected by the sensor.
-
-getMode() - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
-
-Get the channel mode
-
-getMode() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-Get the device mode
-
-getMotorChannelMode(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the current channel mode.
-
-getMotorControllerDeviceMode() - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the current device mode (read, write, or read/write)
+ Op mode to restart will be in extra data
+
+
+ CMD_RESUME_OP_MODE_RESP
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Response send after resuming an op mode
- Note: on USB devices, this will always return "READ_WRITE" mode.
-
-getMotorCurrentPosition(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the current motor position
-
-getMotorPower(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the current motor power
-
-getMotorPowerFloat(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Is motor power set to float?
-
-getMotorTargetPosition(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Get the current motor target position
-
-getOpMode(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-getOpModeManager() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
-
-getOpModes() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-getPortNumber() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get port number
-
-getPortNumber() - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Get Channel
-
-getPosition() - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Get the position of the servo
-
-getPower() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get the current motor power
-
-getPowerFloat() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Is motor power set to float?
-
-getPwmStatus() - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-Get the PWM status
-
-getRobocolMsgType() - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-getRobotStatus() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-getRotation() - Method in class com.qualcomm.robotcore.hardware.GyroSensor
-
-Get the rotation of this sensor
-
-getRuntime() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-Get the number of seconds this op mode has been running
-
-getSensorAngle() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
-
-Get the angle at which this sensor is mounted
-
-getSensors() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-Get a list of all IR sensors attached to this seeker.
-
-getSensorStrength() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
-
-Get the strength of the IR signal detected by this sensor
-
-getSerialNumber() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Serial Number
-
-getSerialNumber() - Method in class com.qualcomm.robotcore.util.SerialNumber
-
-Get the serial number
-
-getService() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
-
-getServoPosition(int) - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-Get the position of a servo at a given channel
-
-getState() - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
-
-Get the channel state
-
-getStrength() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-IR Signal strength
-
-getTargetPosition() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Get the current motor target position
-
-getUltrasonicLevel() - Method in class com.qualcomm.robotcore.hardware.UltrasonicSensor
-
-Get the Ultrasonic levels from this sensor
-
-getVersion() - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Version
-
-getVersion() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Version
-
-getVersion() - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-Version
-
-getVoltage() - Method in interface com.qualcomm.robotcore.hardware.VoltageSensor
-
-Get the current voltage
-
-getWifiDirectAssistant() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-getWifiDirectStatus() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-guide - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button guide - often the large button in the middle of the controller.
-
-GyroSensor - Class in com.qualcomm.robotcore.hardware
-
-Gyro Sensor
-
-GyroSensor() - Constructor for class com.qualcomm.robotcore.hardware.GyroSensor
-
-gyroSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-
-
-
-
-
H
-
-handleDroppedConnection() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-HardwareFactory - Interface in com.qualcomm.robotcore.hardware
-
-Interface for a Hardware Factory
+ Op mode to restart will be in extra data
+
+
+ CMD_SWITCH_OP_MODE
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Command to switch op modes
- A Hardware Factory should populate a HardwareMap, and return that map to
- the user.
-
-hardwareMap - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-Hardware Mappings
-
-HardwareMap - Class in com.qualcomm.robotcore.hardware
-
-Hardware Mappings
+ New op mode will be in extra data
+
+
+ CMD_SWITCH_OP_MODE_RESP
+ - Static variable in class com.qualcomm.ftccommon.CommandList
+
+ Response to a command to switch op modes.
+
+ com.qualcomm.ftccommon -
+ package com.qualcomm.ftccommon
+
+
+ Classes common to FTC aps
+
+ com.qualcomm.robotcore.eventloop
+ - package com.qualcomm.robotcore.eventloop
+
+
+ RobotCore event loop library.
+
+ com.qualcomm.robotcore.eventloop.opmode
+ - package com.qualcomm.robotcore.eventloop.opmode
+
+
+ com.qualcomm.robotcore.exception
+ - package com.qualcomm.robotcore.exception
+
+
+ RobotCore exception library.
+
+ com.qualcomm.robotcore.hardware
+ - package com.qualcomm.robotcore.hardware
+
+
+ RobotCore hardware library.
+
+
+ com.qualcomm.robotcore.util
+ - package com.qualcomm.robotcore.util
+
+
+ CommandList
+ - Class in com.qualcomm.ftccommon
+
+
+ List of RobotCore Robocol commands used by the FIRST apps
+
+ CommandList()
+ - Constructor for class com.qualcomm.ftccommon.CommandList
+
+ CompassSensor
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ Compass Sensor
+
+ CompassSensor()
+ - Constructor for class com.qualcomm.robotcore.hardware.CompassSensor
+
+ compassSensor
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ CompassSensor.CompassMode
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ controller
+ - Variable in class com.qualcomm.robotcore.hardware.DcMotor
+
+ controller -
+ Variable in class com.qualcomm.robotcore.hardware.Servo
+
+ createDcMotor(DcMotorController,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a DcMotor
+
+ createHardwareMap(EventLoopManager)
+ - Method in interface com.qualcomm.robotcore.hardware.HardwareFactory
+
+ Create a hardware map
+
+ createNxtAccelerationSensor(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a AccelerationSensor
+
+ createNxtCompassSensor(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a NxtCompassSensor
+
+ createNxtDcMotorController(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of an NXT DcMotorController
+
+ createNxtGyroSensor(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a GyroSensor
+
+ createNxtIrSeekerSensor(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a IrSeekerSensor
+
+ createNxtLightSensor(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a LightSensor
+
+ createNxtServoController(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of an NXT ServoController
+
+ createNxtUltrasonicSensor(LegacyModule,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of an UltrasonicSensor
+
+ createServo(ServoController,
+ int) - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a Servo
+
+ createUsbDcMotorController(SerialNumber)
+ - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a DcMotorController
+
+ createUsbLegacyModule(SerialNumber)
+ - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a LegacyModule
+
+ createUsbServoController(SerialNumber)
+ - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Create an instance of a ServoController
+
+
+
+
+
- By default this creates a bunch of empty mappings between a string and an
- instance of a hardware driver.
-
-HardwareMap() - Constructor for class com.qualcomm.robotcore.hardware.HardwareMap
-
-HardwareMap.DeviceMapping <DEVICE_TYPE > - Class in com.qualcomm.robotcore.hardware
-
-hashCode() - Method in class com.qualcomm.robotcore.util.SerialNumber
-
-
-
-
-
-
I
-
-i - Variable in class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
-
-i coefficient
-
-id - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-ID assigned to this gamepad by the OS.
-
-ID_UNASSOCIATED - Static variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-A gamepad with an ID equal to ID_UNASSOCIATED has not been associated with any device.
-
-init(EventLoopManager) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-init(EventLoopManager) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
-
-Init method, this will be called before the first call to loop.
-
-intToByteArray(int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert an int into a byte array; big endian is assumed
-
-intToByteArray(int, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert an int into a byte array
-
-irSeekerSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-IrSeekerSensor - Class in com.qualcomm.robotcore.hardware
-
-IR Seeker Sensor
-
-IrSeekerSensor() - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-IrSeekerSensor.IrSensor - Class in com.qualcomm.robotcore.hardware
-
-IR Sensor attached to an IR Seeker
-
-IrSeekerSensor.Mode - Enum in com.qualcomm.robotcore.hardware
-
-Enumeration of device modes
-
-IrSensor() - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
-
-Constructor
-
-IrSensor(double, double) - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
-
-Constructor
-
-isChainedException() - Method in exception com.qualcomm.robotcore.exception.RobotCoreException
-
-isGamepadDevice(int) - Static method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Does this device ID belong to a gamepad device?
-
-isPortReady(int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Determine if a physical port is ready
-
-isWaitingForRestart() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-iterator() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
-
-
-
-
-
-
J
-
-joystickDeadzone - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-If the motion value is less than the threshold, the controller will be
- considered at rest
-
-
-
-
-
-
L
-
-left_bumper - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button left bumper
-
-left_stick_x - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-left analog stick horizontal axis
-
-left_stick_y - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-left analog stick vertical axis
-
-left_trigger - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-left trigger
-
-legacyModule - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-LegacyModule - Interface in com.qualcomm.robotcore.hardware
-
-Legacy Module for working with NXT devices
-
-lightSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-LightSensor - Class in com.qualcomm.robotcore.hardware
-
-Light Sensor
-
-LightSensor() - Constructor for class com.qualcomm.robotcore.hardware.LightSensor
-
-log(String) - Method in class com.qualcomm.robotcore.util.ElapsedTime
-
-Log a message stating how long the timer has been running
-
-logOpModes() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-logStacktrace(Exception) - Static method in class com.qualcomm.ftccommon.DbgLog
-
-longToByteArray(long) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a long into a byte array; big endian is assumed
-
-longToByteArray(long, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a long into a byte array
-
-loop() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
-
-This method will be repeatedly called by the event loop manager.
-
-loop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-User defined loop method
-
-
-
-
-
-
M
-
-MANUFACTURER_ZTE - Static variable in class com.qualcomm.ftccommon.Device
-
-MAX_POSITION - Static variable in class com.qualcomm.robotcore.hardware.Servo
-
-maxPosition - Variable in class com.qualcomm.robotcore.hardware.Servo
-
-MIN_POSITION - Static variable in class com.qualcomm.robotcore.hardware.Servo
-
-minPosition - Variable in class com.qualcomm.robotcore.hardware.Servo
-
-mode - Variable in class com.qualcomm.robotcore.hardware.DcMotor
-
-MODEL_FOXDA_FL7007 - Static variable in class com.qualcomm.ftccommon.Device
-
-MODEL_ZTE_SPEED - Static variable in class com.qualcomm.ftccommon.Device
-
-msg(String) - Static method in class com.qualcomm.ftccommon.DbgLog
-
-Log a debug message
-
-
-
-
-
-
N
-
-noLongerWaitForRestart(String) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-
-
-
-
-
O
-
-onBind(Intent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-onStateChange(EventLoopManager.State) - Method in interface com.qualcomm.robotcore.eventloop.EventLoopManager.EventLoopMonitor
-
-onUnbind(Intent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-onWifiDirectEvent(WifiDirectAssistant.Event) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-OpMode - Class in com.qualcomm.robotcore.eventloop.opmode
-
-Base class for user defined operation modes (op modes).
-
-OpMode() - Constructor for class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-OpMode constructor
-
-OPMODE_RESTART_FINISHED - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-OpModeManager - Class in com.qualcomm.robotcore.eventloop.opmode
-
-Manages Op Modes
+
D
+
+ d
+ - Variable in class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
+
+
+ d coefficient
+
+ DbgLog
+ - Class in com.qualcomm.ftccommon
+
+
+ Provide utility methods for debug logging
+
+ DcMotor - Class in com.qualcomm.robotcore.hardware
+
+
+ Control a DC Motor attached to a DC Motor Controller
+
+ DcMotor(DcMotorController,
+ int) - Constructor for class com.qualcomm.robotcore.hardware.DcMotor
+
+ Constructor
+
+ DcMotor(DcMotorController,
+ int, DcMotor.Direction) - Constructor for class
+ com.qualcomm.robotcore.hardware.DcMotor
+
+
+ Constructor
+
+ dcMotor -
+ Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ DcMotor.Direction
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ Motor direction
+
+ DcMotor.MotorCallback
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ mock API
- Able to switch between op modes
-
-OpModeManager(HardwareMap) - Constructor for class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-OpModeRegister - Interface in com.qualcomm.robotcore.eventloop.opmode
-
-Register Op Modes
-
-
-
-
-
-
P
-
-p - Variable in class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
-
-p coefficient
-
-pauseOpMode(String) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-portNumber - Variable in class com.qualcomm.robotcore.hardware.DcMotor
-
-portNumber - Variable in class com.qualcomm.robotcore.hardware.Servo
-
-pressed(android.view.KeyEvent) - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-processCommand(Command) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
-
-Process command method, this will be called if the event loop manager receives a user defined
- command.
-
-put(String, DEVICE_TYPE) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
-
-pwmDisable() - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-PWM disable
-
-pwmEnable() - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-PWM enable
-
-
-
-
-
-
R
-
-Range - Class in com.qualcomm.robotcore.util
-
-Utility class for performing range operations
-
-RC_BATTERY_LEVEL_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-readAnalog(int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Read an analog value from a device; only works in analog read mode
-
-readLegacyModuleCache(int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Read the device memory map; only works in NXT I2C read mode
-
-register(String, Class) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-register(String, OpMode) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-register(OpModeManager) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeRegister
-
-The Op Mode Manager will call this method when it wants a list of all
- available op modes.
-
-registerOpModes(OpModeRegister) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-registerSyncdDevice(SyncdDevice) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Register a sync'd device
-
-requestRestart() - Method in interface com.qualcomm.ftccommon.Restarter
-
-reset() - Method in class com.qualcomm.robotcore.util.ElapsedTime
-
-Reset the start time to now
-
-RESTART_OPMODE - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Restarter - Interface in com.qualcomm.ftccommon
-
-restartRobot() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-restartRobot() - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
-
-callback method to restart the robot
-
-resumeOpMode() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-right_bumper - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button right bumper
-
-right_stick_x - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-right analog stick horizontal axis
-
-right_stick_y - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-right analog stick vertical axis
-
-right_trigger - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-right trigger
-
-ROBOT_BATTERY_LEVEL_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-RobotCoreException - Exception in com.qualcomm.robotcore.exception
-
-RobotCoreException(String) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
-
-RobotCoreException(String, Exception) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
-
-RobotCoreNonResponsiveException - Exception in com.qualcomm.robotcore.exception
-
-RobotCore Exception for non-responsive states
-
-RobotCoreNonResponsiveException(String) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreNonResponsiveException
-
-robotUpdate(String) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
-
-runActiveOpMode(Gamepad[]) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-
-
-
-
-
S
-
-scale(double, double, double, double, double) - Static method in class com.qualcomm.robotcore.util.Range
-
-Scale a number in the range of x1 to x2, to the range of y1 to y2
-
-scaleRange(double, double) - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Automatically scale the position of the servo.
-
-scanForUsbDevices() - Method in class com.qualcomm.robotcore.hardware.DeviceManager
-
-Get a listing of all Modern Robotics devices connected.
-
-sendCommand(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-sendCommand(Command) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-sendTelemetry(String, String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-sendTelemetryData(Telemetry) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-sendTelemetryData(Telemetry) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Send telemetry data
-
-SerialNumber - Class in com.qualcomm.robotcore.util
-
-Manage a serial number
-
-SerialNumber() - Constructor for class com.qualcomm.robotcore.util.SerialNumber
-
-Constructor - use default serial number
-
-SerialNumber(String) - Constructor for class com.qualcomm.robotcore.util.SerialNumber
-
-Constructor - use supplied serial number
-
-servo - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-Servo - Class in com.qualcomm.robotcore.hardware
-
-Control a single servo
-
-Servo(ServoController, int) - Constructor for class com.qualcomm.robotcore.hardware.Servo
-
-Constructor
-
-Servo(ServoController, int, Servo.Direction) - Constructor for class com.qualcomm.robotcore.hardware.Servo
-
-COnstructor
-
-Servo.Direction - Enum in com.qualcomm.robotcore.hardware
-
-Motor direction
-
-servoController - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-ServoController - Interface in com.qualcomm.robotcore.hardware
-
-Interface for working with Servo Controllers
-
-ServoController.PwmStatus - Enum in com.qualcomm.robotcore.hardware
-
-PWM Status - is pwm enabled?
-
-setCallback(UpdateUI.Callback) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-setChannelMode(DcMotorController.RunMode) - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Set the current channel mode
-
-setControllerService(FtcRobotControllerService) - Method in class com.qualcomm.ftccommon.UpdateUI
-
-setDifferentialControlLoopCoefficients(int, DifferentialControlLoopCoefficients) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Set the differential control loop coefficients
-
-setDigitalChannelMode(int, DigitalChannelController.Mode) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Set the mode of a digital channel
-
-setDigitalChannelState(int, boolean) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
-
-Set the state of a digital channel
-
-setDigitalLine(int, int, boolean) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Set the value of digital line 0 or 1 while in analog mode.
-
-setDirection(DcMotor.Direction) - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Set the direction
-
-setDirection(Servo.Direction) - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Set the direction
-
-setEventLoop(EventLoop) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Replace the current event loop with a new event loop
-
-setGearRatio(int, double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Set the gear ratio
-
-setHardwareMap(HardwareMap) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-setJoystickDeadzone(float) - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Set the joystick deadzone.
-
-setMode(CompassSensor.CompassMode) - Method in class com.qualcomm.robotcore.hardware.CompassSensor
-
-Change to calibration or measurement mode
-
-setMode(DigitalChannelController.Mode) - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
-
-Set the channel mode
-
-setMode(IrSeekerSensor.Mode) - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-Set the device mode
-
-setMonitor(EventLoopManager.EventLoopMonitor) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Set a monitor for this event loop
-
-setMotorChannelMode(int, DcMotorController.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Set the current channel mode.
-
-setMotorControllerDeviceMode(DcMotorController.DeviceMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Set the device into read, write, or read/write modes
+ TODO: decide if we want to remove or implement this API
+
+
+ DcMotorController
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Interface for working with DC Motor Controllers
+
+ dcMotorController
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ DcMotorController.DeviceMode
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ DcMotorController.RunMode
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ DEFAULT_OP_MODE
+ - Static variable in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ DEFAULT_OP_MODE_NAME
+ - Static variable in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ Device
+ - Class in com.qualcomm.ftccommon
+
+
+ Created by jberling on 3/16/15.
+
+ Device()
+ - Constructor for class com.qualcomm.ftccommon.Device
+
+ DeviceManager
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ DeviceManager()
+ - Constructor for class com.qualcomm.robotcore.hardware.DeviceManager
+
+ DeviceManager.DeviceType
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ Enum of Device Types
+
+ DeviceMapping()
+ - Constructor for class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
+
+
+ devMode -
+ Variable in class com.qualcomm.robotcore.hardware.DcMotor
+
+ DifferentialControlLoopCoefficients
+ - Class in com.qualcomm.robotcore.util
+
+
+ Contains p, i, and d coefficients for control loops
+
+ DifferentialControlLoopCoefficients()
+ - Constructor for class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
+
+
+ Constructor with coefficients set to 0.0
+
+ DifferentialControlLoopCoefficients(double,
+ double, double) - Constructor for class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
+
+
+ Constructor with coefficients supplied
+
+ DigitalChannel
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ Control a single digital channel
+
+ DigitalChannel(DigitalChannelController,
+ int) - Constructor for class com.qualcomm.robotcore.hardware.DigitalChannel
+
+ Constructor
+
+ DigitalChannelController
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Interface for working with Digital Channel Controllers
+
+ DigitalChannelController.Mode
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ Digital channel mode - input or output
+
+ direction -
+ Variable in class com.qualcomm.robotcore.hardware.DcMotor
+
+ direction -
+ Variable in class com.qualcomm.robotcore.hardware.Servo
+
+ displayGamePadInfo(String)
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ dpad_down -
+ Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ dpad down
+
+ dpad_left -
+ Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ dpad left
+
+ dpad_right
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ dpad right
+
+ dpad_up -
+ Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ dpad up
+
+ dpadThreshold
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ DPAD button will be considered pressed when the movement crosses this
+ threshold
+
+
+
+
+
+
- Note: If you are using the NxtDcMotorController, you need to switch the controller into "read" mode
- before doing a read, and into "write" mode before doing a write.
-
-setMotorPower(int, double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Set the current motor power
-
-setMotorPowerFloat(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Allow motor to float
-
-setMotorTargetPosition(int, int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
-
-Set the motor target position.
-
-setPosition(double) - Method in class com.qualcomm.robotcore.hardware.Servo
-
-Set the position of the servo
-
-setPower(double) - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Set the current motor power
-
-setPowerFloat() - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Allow motor to float
-
-setRestarter(Restarter) - Method in class com.qualcomm.ftccommon.UpdateUI
-
-setSerialNumber(String) - Method in class com.qualcomm.robotcore.util.SerialNumber
-
-Set the serial number
-
-setServoPosition(int, double) - Method in interface com.qualcomm.robotcore.hardware.ServoController
-
-Set the position of a servo at the given channel
-
-setState(boolean) - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
-
-Set the channel state
-
-setTargetPosition(int) - Method in class com.qualcomm.robotcore.hardware.DcMotor
-
-Set the motor target position, using an integer.
-
-setTextViews(TextView, TextView, TextView[], TextView, TextView, TextView) - Method in class com.qualcomm.ftccommon.UpdateUI
-
-setupRobot(EventLoop) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-shortToByteArray(short) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a short into a byte array; big endian is assumed
-
-shortToByteArray(short, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-convert a short into a byte array
-
-shutdown() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Shut down the event processor
-
-shutdownLegacyModules() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-shutdownMotorControllers() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-shutdownRobot() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
-
-shutdownServoControllers() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-signalDetected() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-Returns true if an IR signal is detected
-
-size() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
-
-start(EventLoop) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Start the event processor
-
-start() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-User defined start method
-
-start - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button start
-
-startActiveOpMode() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-startBlockingWork() - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice
-
-This method will be called to let the sync'd device know that it's ok to enter a blocking
- state.
-
-startTime() - Method in class com.qualcomm.robotcore.util.ElapsedTime
-
-Get the relative start time
-
-state - Variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-status() - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor
-
-Status of this sensor, in string form
-
-status() - Method in class com.qualcomm.robotcore.hardware.CompassSensor
-
-Status of this sensor, in string form
-
-status() - Method in class com.qualcomm.robotcore.hardware.GyroSensor
-
-Status of this sensor, in string form
-
-status() - Method in class com.qualcomm.robotcore.hardware.LightSensor
-
-Status of this sensor, in string form
-
-status() - Method in class com.qualcomm.robotcore.hardware.UltrasonicSensor
-
-Status of this sensor, in string form
-
-stop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-User defined stop method
-
-stopActiveOpMode() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-stringToUtf8(String) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-Convert a Java String into a UTF-8 byte array
-
-switchOpModes(String) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
-
-SyncdDevice - Interface in com.qualcomm.robotcore.eventloop
-
-SyncdDevice is for a device that wants to be in sync with the event loop.
-
-SYSTEM_TELEMETRY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-
-
-
-
-
T
-
-TAG - Static variable in class com.qualcomm.ftccommon.DbgLog
-
-Tag used by logcat
-
-teardown() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
-
-Teardown method, this will be called after the last call to loop.
-
-telemetry - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-Telemetry Data
-
-textDeviceName - Variable in class com.qualcomm.ftccommon.UpdateUI
-
-textErrorMessage - Variable in class com.qualcomm.ftccommon.UpdateUI
-
-textGamepad - Variable in class com.qualcomm.ftccommon.UpdateUI
-
-textOpMode - Variable in class com.qualcomm.ftccommon.UpdateUI
-
-textRobotStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
-
-textWifiDirectStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
-
-throwIfRangeIsInvalid(double, double, double) - Static method in class com.qualcomm.robotcore.util.Range
-
-Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
-
-time - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
-
-number of seconds this op mode has been running, this is
- updated before every call to loop.
-
-time() - Method in class com.qualcomm.robotcore.util.ElapsedTime
-
-How many seconds since the start time.
-
-timestamp - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-Relative timestamp of the last time an event was detected
-
-toByteArray() - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-toString() - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
-
-toString() - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor
-
-toString() - Method in class com.qualcomm.robotcore.hardware.CompassSensor
-
-toString() - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Display a summary of this gamepad, including the state of all buttons, analog sticks, and triggers
-
-toString() - Method in class com.qualcomm.robotcore.hardware.GyroSensor
-
-toString() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
-
-toString() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
-
-toString() - Method in class com.qualcomm.robotcore.hardware.LightSensor
-
-toString() - Method in class com.qualcomm.robotcore.hardware.UltrasonicSensor
-
-toString() - Method in class com.qualcomm.robotcore.util.ElapsedTime
-
-Return a string stating the number of seconds that have passed
-
-toString() - Method in class com.qualcomm.robotcore.util.SerialNumber
-
-type() - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Get the type of gamepad as a String.
-
-TypeConversion - Class in com.qualcomm.robotcore.util
-
-Utility class for performing type conversions
-
-
-
-
-
-
U
-
-ultrasonicSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-UltrasonicSensor - Class in com.qualcomm.robotcore.hardware
-
-UltrasonicSensor() - Constructor for class com.qualcomm.robotcore.hardware.UltrasonicSensor
-
-unregisterSyncdDevice(SyncdDevice) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
-
-Unregister a sync'd device
-
-unsignedByteToDouble(byte) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
-
-unsignedByteToInt(byte) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
-
-unsignedIntToLong(int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-Accept an int, treat that int as an unsigned int, then covert it to the return type
-
-update(android.view.MotionEvent) - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Update the gamepad based on a MotionEvent
-
-update(android.view.KeyEvent) - Method in class com.qualcomm.robotcore.hardware.Gamepad
-
-Update the gamepad based on a KeyEvent
-
-UpdateUI - Class in com.qualcomm.ftccommon
-
-UpdateUI(Activity, Dimmer) - Constructor for class com.qualcomm.ftccommon.UpdateUI
-
-updateUi(String, Gamepad[]) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
-
-UpdateUI.Callback - Class in com.qualcomm.ftccommon
-
-Callback methods
-
-user - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-Which user is this gamepad used by
-
-utf8ToString(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
-
-
-
-
-
-
V
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.eventloop.EventLoopManager.State
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.CompassSensor.CompassMode
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.Direction
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.DeviceMode
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.RunMode
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.DeviceType
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.Servo.Direction
-
-Returns the enum constant of this type with the specified name.
-
-valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.ServoController.PwmStatus
-
-Returns the enum constant of this type with the specified name.
-
-values() - Static method in enum com.qualcomm.robotcore.eventloop.EventLoopManager.State
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.CompassSensor.CompassMode
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.Direction
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.DeviceMode
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.RunMode
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.DeviceType
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.Servo.Direction
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-values() - Static method in enum com.qualcomm.robotcore.hardware.ServoController.PwmStatus
-
-Returns an array containing the constants of this enum type, in
-the order they are declared.
-
-voltageSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
-
-VoltageSensor - Interface in com.qualcomm.robotcore.hardware
-
-Voltage Sensor
-
-
-
-
-
-
W
-
-waitingForRestart() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
-
-wifiDirectUpdate(WifiDirectAssistant.Event) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
-
-writeLegacyModuleCache(int, byte[]) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
-
-Write to the device memory map; only works in NXT I2C write mode
-
-
-
-
-
-
X
-
-x - Variable in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
-
-x - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button x
-
-
-
-
-
-
Y
-
-y - Variable in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
-
-y - Variable in class com.qualcomm.robotcore.hardware.Gamepad
-
-button y
-
-
-
-
-
-
Z
-
-z - Variable in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
-
-
-
A B C D E F G H I J L M N O P R S T U V W X Y Z
+ E
+
+ ElapsedTime - Class in com.qualcomm.robotcore.util
+
+
+ Measure elapsed time
+
+ ElapsedTime()
+ - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
+
+ Constructor
+
+ ElapsedTime(long)
+ - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
+
+ Constructor
+
+ enable9v(int,
+ boolean) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Enable or disable 9V power on a port
+
+ enableAnalogReadMode(int,
+ int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Enable a physical port in analog read mode
+
+ enableLed(boolean)
+ - Method in class com.qualcomm.robotcore.hardware.LightSensor
+
+ Enable the LED light
+
+ enableNxtI2cReadMode(int,
+ int, int, int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Enable a physical port in NXT I2C read mode
+
+ enableNxtI2cWriteMode(int,
+ int, int, byte[]) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Enable a physical port in NXT I2C write mode
+
+ enableWhitelistFilter(int,
+ int) - Static method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Add a whitelist filter for a specific device vendor/product ID.
+
+ encoder(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotor.MotorCallback
+
+
+ entrySet()
+ - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
+
+
+ equals(Object)
+ - Method in class com.qualcomm.robotcore.util.SerialNumber
+
+ error(String)
+ - Static method in class com.qualcomm.ftccommon.DbgLog
+
+ Log an error message
+
+ ERROR_PREPEND
+ - Static variable in class com.qualcomm.ftccommon.DbgLog
+
+ EventLoop
+ - Interface in com.qualcomm.robotcore.eventloop
+
+
+ Event loop interface
+
+ EventLoopManager
+ - Class in com.qualcomm.robotcore.eventloop
+
+
+ Event Loop Manager
+
+ EventLoopManager(RobocolDatagramSocket)
+ - Constructor for class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Constructor
+
+ EventLoopManager.EventLoopMonitor
+ - Interface in com.qualcomm.robotcore.eventloop
+
+
+ Callback to monitor when event loop changes state
+
+ EventLoopManager.State
+ - Enum in com.qualcomm.robotcore.eventloop
+
+
+
+
+
+
+
+
F
+
+ finishRestart(String)
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ fromByteArray(byte[])
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ FtcEventLoopHandler
+ - Class in com.qualcomm.ftccommon
+
+
+ FtcEventLoopHandler(HardwareFactory,
+ UpdateUI.Callback) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ FtcRobotControllerBinder()
+ - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
+
+
+ FtcRobotControllerService
+ - Class in com.qualcomm.ftccommon
+
+
+ FtcRobotControllerService()
+ - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ FtcRobotControllerService.FtcRobotControllerBinder
+ - Class in com.qualcomm.ftccommon
+
+
+
+
+
+
+
+
G
+
+ Gamepad - Class in com.qualcomm.robotcore.hardware
+
+
+ Monitor a hardware gamepad.
+
+ Gamepad() -
+ Constructor for class com.qualcomm.robotcore.hardware.Gamepad
+
+ Gamepad(Gamepad.GamepadCallback)
+ - Constructor for class com.qualcomm.robotcore.hardware.Gamepad
+
+ Gamepad.GamepadCallback
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Optional callback interface for monitoring changes due to
+ MotionEvents and KeyEvents.
+
+
+ gamepad1
+ - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ Gamepad 1
+
+ gamepad2
+ - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ Gamepad 2
+
+ gamepadChanged(Gamepad)
+ - Method in interface com.qualcomm.robotcore.hardware.Gamepad.GamepadCallback
+
+
+ This method will be called whenever the gamepad state has changed due
+ to either a KeyEvent
+ or a MotionEvent.
+
+
+ get(String)
+ - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
+
+
+ getAcceleration()
+ - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor
+
+ Acceleration, measured in g's
+
+ getActiveOpMode()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ getActiveOpModeName()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ getAngle()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ Estimated angle in which the signal is coming from
+
+ getChainedException()
+ - Method in exception com.qualcomm.robotcore.exception.RobotCoreException
+
+ getChannelMode()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get the current channel mode
+
+ getController()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get DC motor controller
+
+ getController()
+ - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Get Servo Controller
+
+ getCurrentPosition()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get the current encoder value
+
+ getDeviceName()
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Device Name
+
+ getDeviceName()
+ - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Device Name
+
+ getDeviceName()
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ Device Name
+
+ getDifferentialControlLoopCoefficients(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the differential control loop coefficients
+
+ getDigitalChannelMode(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Get the mode of a digital channel
+
+ getDigitalChannelState(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Get the state of a digital channel
+
+ getDirection()
+ - Method in class com.qualcomm.robotcore.hardware.CompassSensor
+
+ Get the current direction, in degrees
+
+ getDirection()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get the direction
+
+ getDirection()
+ - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Get the direction
+
+ getEncoders(DcMotor.MotorCallback)
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ getEventLoop()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Get the current event loop
+
+ getGamepad()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Get the current gamepad state
+
+ getGamepad(int)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Get the gamepad connected to a particular user
+
+ getGamepads()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ getGamepads()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Get the gamepads
+
+ getGearRatio(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the gear ratio
+
+ getHardwareMap()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ getHardwareMap()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ getHeartbeat()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Get the current heartbeat state
+
+ getLightLevel()
+ - Method in class com.qualcomm.robotcore.hardware.LightSensor
+
+ Get the amount of light detected by the sensor.
+
+ getMode()
+ - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
+
+ Get the channel mode
+
+ getMode()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ Get the device mode
+
+ getMotorChannelMode(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the current channel mode.
+
+ getMotorControllerDeviceMode()
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the current device mode (read, write, or read/write)
+
+ Note: on USB devices, this will always return "READ_WRITE" mode.
+
+
+ getMotorCurrentPosition(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the current motor position
+
+ getMotorPower(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the current motor power
+
+ getMotorPowerFloat(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Is motor power set to float?
+
+ getMotorTargetPosition(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Get the current motor target position
+
+ getOpMode(String)
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ getOpModeManager()
+ - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
+
+ getOpModes()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ getPortNumber()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get port number
+
+ getPortNumber()
+ - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Get Channel
+
+ getPosition()
+ - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Get the position of the servo
+
+ getPower()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get the current motor power
+
+ getPowerFloat()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Is motor power set to float?
+
+ getPwmStatus()
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ Get the PWM status
+
+ getRobocolMsgType()
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ getRobotStatus()
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ getRotation()
+ - Method in class com.qualcomm.robotcore.hardware.GyroSensor
+
+ Get the rotation of this sensor
+
+ getRuntime()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ Get the number of seconds this op mode has been running
+
+ getSensorAngle()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
+
+
+ Get the angle at which this sensor is mounted
+
+ getSensors()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ Get a list of all IR sensors attached to this seeker.
+
+ getSensorStrength()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
+
+
+ Get the strength of the IR signal detected by this sensor
+
+ getSerialNumber()
+ - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Serial Number
+
+ getSerialNumber()
+ - Method in class com.qualcomm.robotcore.util.SerialNumber
+
+ Get the serial number
+
+ getService()
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
+
+
+ getServoPosition(int)
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ Get the position of a servo at a given channel
+
+ getState()
+ - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
+
+ Get the channel state
+
+ getStrength()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ IR Signal strength
+
+ getTargetPosition()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Get the current motor target position
+
+ getUltrasonicLevel()
+ - Method in class com.qualcomm.robotcore.hardware.UltrasonicSensor
+
+ Get the Ultrasonic levels from this sensor
+
+ getVersion()
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Version
+
+ getVersion()
+ - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Version
+
+ getVersion()
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ Version
+
+ getVoltage()
+ - Method in interface com.qualcomm.robotcore.hardware.VoltageSensor
+
+ Get the current voltage
+
+ getWifiDirectAssistant()
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ getWifiDirectStatus()
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ guide -
+ Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ button guide - often the large button in the middle of the
+ controller.
+
+
+ GyroSensor
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ Gyro Sensor
+
+ GyroSensor()
+ - Constructor for class com.qualcomm.robotcore.hardware.GyroSensor
+
+ gyroSensor
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+
+
+
+
+
+
H
+
+ handleDroppedConnection()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ HardwareFactory
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Interface for a Hardware Factory
+
+ A Hardware Factory should populate a HardwareMap, and return that map to
+ the user.
+
+
+ hardwareMap
+ - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ Hardware Mappings
+
+ HardwareMap
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ Hardware Mappings
+
+ By default this creates a bunch of empty mappings between a string and an
+ instance of a hardware driver.
+
+
+ HardwareMap()
+ - Constructor for class com.qualcomm.robotcore.hardware.HardwareMap
+
+ HardwareMap.DeviceMapping <DEVICE_TYPE > - Class in
+ com.qualcomm.robotcore.hardware
+
+
+ hashCode()
+ - Method in class com.qualcomm.robotcore.util.SerialNumber
+
+
+
+
+
+
+
I
+
+ i
+ - Variable in class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
+
+
+ i coefficient
+
+ id
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ ID assigned to this gamepad by the OS.
+
+ ID_UNASSOCIATED
+ - Static variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ A gamepad with an ID equal to ID_UNASSOCIATED has not been associated
+ with any device.
+
+
+ init(EventLoopManager)
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ init(EventLoopManager)
+ - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
+
+ Init method, this will be called before the first call to loop.
+
+ intToByteArray(int)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ convert an int into a byte array; big endian is assumed
+
+ intToByteArray(int,
+ ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ convert an int into a byte array
+
+ irSeekerSensor
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ IrSeekerSensor
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ IR Seeker Sensor
+
+ IrSeekerSensor()
+ - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ IrSeekerSensor.IrSensor
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ IR Sensor attached to an IR Seeker
+
+ IrSeekerSensor.Mode
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ Enumeration of device modes
+
+ IrSensor()
+ - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
+
+
+ Constructor
+
+ IrSensor(double,
+ double) - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
+
+ Constructor
+
+ isChainedException()
+ - Method in exception com.qualcomm.robotcore.exception.RobotCoreException
+
+ isGamepadDevice(int)
+ - Static method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Does this device ID belong to a gamepad device?
+
+ isPortReady(int)
+ - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Determine if a physical port is ready
+
+ isWaitingForRestart()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ iterator()
+ - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
+
+
+
+
+
+
+
+
J
+
+ joystickDeadzone
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ If the motion value is less than the threshold, the controller will
+ be
+ considered at rest
+
+
+
+
+
+
+
+
L
+
+ left_bumper
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ button left bumper
+
+ left_stick_x
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ left analog stick horizontal axis
+
+ left_stick_y
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ left analog stick vertical axis
+
+ left_trigger
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ left trigger
+
+ legacyModule
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ LegacyModule
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Legacy Module for working with NXT devices
+
+ lightSensor
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ LightSensor
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ Light Sensor
+
+ LightSensor()
+ - Constructor for class com.qualcomm.robotcore.hardware.LightSensor
+
+ log(String)
+ - Method in class com.qualcomm.robotcore.util.ElapsedTime
+
+ Log a message stating how long the timer has been running
+
+ logOpModes()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ logStacktrace(Exception)
+ - Static method in class com.qualcomm.ftccommon.DbgLog
+
+ longToByteArray(long)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ convert a long into a byte array; big endian is assumed
+
+ longToByteArray(long,
+ ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ convert a long into a byte array
+
+ loop() -
+ Method in interface com.qualcomm.robotcore.eventloop.EventLoop
+
+ This method will be repeatedly called by the event loop manager.
+
+
+ loop()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ User defined loop method
+
+
+
+
+
+
+
M
+
+ MANUFACTURER_ZTE
+ - Static variable in class com.qualcomm.ftccommon.Device
+
+ MAX_POSITION
+ - Static variable in class com.qualcomm.robotcore.hardware.Servo
+
+ maxPosition
+ - Variable in class com.qualcomm.robotcore.hardware.Servo
+
+ MIN_POSITION
+ - Static variable in class com.qualcomm.robotcore.hardware.Servo
+
+ minPosition
+ - Variable in class com.qualcomm.robotcore.hardware.Servo
+
+ mode - Variable
+ in class com.qualcomm.robotcore.hardware.DcMotor
+
+ MODEL_FOXDA_FL7007
+ - Static variable in class com.qualcomm.ftccommon.Device
+
+ MODEL_ZTE_SPEED
+ - Static variable in class com.qualcomm.ftccommon.Device
+
+ msg(String)
+ - Static method in class com.qualcomm.ftccommon.DbgLog
+
+ Log a debug message
+
+
+
+
+
+
+
N
+
+ noLongerWaitForRestart(String)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+
+
+
+
+
+
O
+
+ onBind(Intent)
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ onStateChange(EventLoopManager.State)
+ - Method in interface com.qualcomm.robotcore.eventloop.EventLoopManager.EventLoopMonitor
+
+
+ onUnbind(Intent)
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ onWifiDirectEvent(WifiDirectAssistant.Event)
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ OpMode
+ - Class in com.qualcomm.robotcore.eventloop.opmode
+
+
+ Base class for user defined operation modes (op modes).
+
+ OpMode()
+ - Constructor for class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ OpMode constructor
+
+ OPMODE_RESTART_FINISHED
+ - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ OpModeManager
+ - Class in com.qualcomm.robotcore.eventloop.opmode
+
+
+ Manages Op Modes
+
+ Able to switch between op modes
+
+
+ OpModeManager(HardwareMap)
+ - Constructor for class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ OpModeRegister - Interface in com.qualcomm.robotcore.eventloop.opmode
+
+
+ Register Op Modes
+
+
+
+
+
+
+
P
+
+ p
+ - Variable in class com.qualcomm.robotcore.util.DifferentialControlLoopCoefficients
+
+
+ p coefficient
+
+ pauseOpMode(String)
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ portNumber
+ - Variable in class com.qualcomm.robotcore.hardware.DcMotor
+
+ portNumber -
+ Variable in class com.qualcomm.robotcore.hardware.Servo
+
+ pressed(android.view.KeyEvent)
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ processCommand(Command)
+ - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
+
+ Process command method, this will be called if the event loop manager
+ receives a user defined
+ command.
+
+
+ put(String,
+ DEVICE_TYPE) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
+
+ pwmDisable()
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ PWM disable
+
+ pwmEnable()
+ - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ PWM enable
+
+
+
+
+
+
+
R
+
+ Range
+ - Class in com.qualcomm.robotcore.util
+
+
+ Utility class for performing range operations
+
+ RC_BATTERY_LEVEL_KEY
+ - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ readAnalog(int)
+ - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Read an analog value from a device; only works in analog read mode
+
+
+ readLegacyModuleCache(int)
+ - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Read the device memory map; only works in NXT I2C read mode
+
+ register(String,
+ Class) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ register(String,
+ OpMode) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ register(OpModeManager)
+ - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeRegister
+
+
+ The Op Mode Manager will call this method when it wants a list of all
+ available op modes.
+
+
+ registerOpModes(OpModeRegister)
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ registerSyncdDevice(SyncdDevice)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Register a sync'd device
+
+ requestRestart()
+ - Method in interface com.qualcomm.ftccommon.Restarter
+
+ reset() -
+ Method in class com.qualcomm.robotcore.util.ElapsedTime
+
+ Reset the start time to now
+
+ RESTART_OPMODE
+ - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Restarter - Interface in com.qualcomm.ftccommon
+
+ restartRobot()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ restartRobot()
+ - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
+
+ callback method to restart the robot
+
+ resumeOpMode()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ right_bumper
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ button right bumper
+
+ right_stick_x
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ right analog stick horizontal axis
+
+ right_stick_y
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ right analog stick vertical axis
+
+ right_trigger
+ - Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ right trigger
+
+ ROBOT_BATTERY_LEVEL_KEY
+ - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ RobotCoreException
+ - Exception in com.qualcomm.robotcore.exception
+
+
+ RobotCoreException(String)
+ - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
+
+ RobotCoreException(String,
+ Exception) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
+
+ RobotCoreNonResponsiveException
+ - Exception in com.qualcomm.robotcore.exception
+
+
+ RobotCore Exception for non-responsive states
+
+ RobotCoreNonResponsiveException(String)
+ - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreNonResponsiveException
+
+
+ robotUpdate(String)
+ - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
+
+ runActiveOpMode(Gamepad[])
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+
+
+
+
+
+
S
+
+ scale(double,
+ double, double, double, double) - Static method in class
+ com.qualcomm.robotcore.util.Range
+
+
+ Scale a number in the range of x1 to x2, to the range of y1 to y2
+
+
+ scaleRange(double,
+ double) - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Automatically scale the position of the servo.
+
+ scanForUsbDevices()
+ - Method in class com.qualcomm.robotcore.hardware.DeviceManager
+
+ Get a listing of all Modern Robotics devices connected.
+
+ sendCommand(Command)
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ sendCommand(Command)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ sendTelemetry(String,
+ String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ sendTelemetryData(Telemetry)
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ sendTelemetryData(Telemetry)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Send telemetry data
+
+ SerialNumber - Class in com.qualcomm.robotcore.util
+
+
+ Manage a serial number
+
+ SerialNumber()
+ - Constructor for class com.qualcomm.robotcore.util.SerialNumber
+
+ Constructor - use default serial number
+
+ SerialNumber(String)
+ - Constructor for class com.qualcomm.robotcore.util.SerialNumber
+
+ Constructor - use supplied serial number
+
+ servo -
+ Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ Servo - Class in com.qualcomm.robotcore.hardware
+
+
+ Control a single servo
+
+ Servo(ServoController,
+ int) - Constructor for class com.qualcomm.robotcore.hardware.Servo
+
+ Constructor
+
+ Servo(ServoController,
+ int, Servo.Direction) - Constructor for class
+ com.qualcomm.robotcore.hardware.Servo
+
+
+ COnstructor
+
+ Servo.Direction
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ Motor direction
+
+ servoController
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ ServoController
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Interface for working with Servo Controllers
+
+ ServoController.PwmStatus
+ - Enum in com.qualcomm.robotcore.hardware
+
+
+ PWM Status - is pwm enabled?
+
+ setCallback(UpdateUI.Callback)
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ setChannelMode(DcMotorController.RunMode)
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Set the current channel mode
+
+ setControllerService(FtcRobotControllerService)
+ - Method in class com.qualcomm.ftccommon.UpdateUI
+
+
+ setDifferentialControlLoopCoefficients(int,
+ DifferentialControlLoopCoefficients) - Method in interface
+ com.qualcomm.robotcore.hardware.DcMotorController
+
+ Set the differential control loop coefficients
+
+ setDigitalChannelMode(int,
+ DigitalChannelController.Mode) - Method in interface
+ com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Set the mode of a digital channel
+
+ setDigitalChannelState(int,
+ boolean) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
+
+
+ Set the state of a digital channel
+
+ setDigitalLine(int,
+ int, boolean) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Set the value of digital line 0 or 1 while in analog mode.
+
+ setDirection(DcMotor.Direction)
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Set the direction
+
+ setDirection(Servo.Direction)
+ - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Set the direction
+
+ setEventLoop(EventLoop)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Replace the current event loop with a new event loop
+
+ setGearRatio(int,
+ double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Set the gear ratio
+
+ setHardwareMap(HardwareMap)
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ setJoystickDeadzone(float)
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Set the joystick deadzone.
+
+ setMode(CompassSensor.CompassMode)
+ - Method in class com.qualcomm.robotcore.hardware.CompassSensor
+
+ Change to calibration or measurement mode
+
+ setMode(DigitalChannelController.Mode)
+ - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
+
+ Set the channel mode
+
+ setMode(IrSeekerSensor.Mode)
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ Set the device mode
+
+ setMonitor(EventLoopManager.EventLoopMonitor)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Set a monitor for this event loop
+
+ setMotorChannelMode(int,
+ DcMotorController.RunMode) - Method in interface
+ com.qualcomm.robotcore.hardware.DcMotorController
+
+ Set the current channel mode.
+
+ setMotorControllerDeviceMode(DcMotorController.DeviceMode)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Set the device into read, write, or read/write modes
+
+ Note: If you are using the NxtDcMotorController, you need to switch the controller
+ into "read" mode
+ before doing a read, and into "write" mode before doing a write.
+
+
+ setMotorPower(int,
+ double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Set the current motor power
+
+ setMotorPowerFloat(int)
+ - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Allow motor to float
+
+ setMotorTargetPosition(int,
+ int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
+
+ Set the motor target position.
+
+ setPosition(double)
+ - Method in class com.qualcomm.robotcore.hardware.Servo
+
+ Set the position of the servo
+
+ setPower(double)
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Set the current motor power
+
+ setPowerFloat()
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Allow motor to float
+
+ setRestarter(Restarter)
+ - Method in class com.qualcomm.ftccommon.UpdateUI
+
+
+ setSerialNumber(String)
+ - Method in class com.qualcomm.robotcore.util.SerialNumber
+
+ Set the serial number
+
+ setServoPosition(int,
+ double) - Method in interface com.qualcomm.robotcore.hardware.ServoController
+
+ Set the position of a servo at the given channel
+
+ setState(boolean)
+ - Method in class com.qualcomm.robotcore.hardware.DigitalChannel
+
+ Set the channel state
+
+ setTargetPosition(int)
+ - Method in class com.qualcomm.robotcore.hardware.DcMotor
+
+ Set the motor target position, using an integer.
+
+ setTextViews(TextView,
+ TextView, TextView[], TextView, TextView, TextView) - Method in class
+ com.qualcomm.ftccommon.UpdateUI
+
+ setupRobot(EventLoop)
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ shortToByteArray(short)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ convert a short into a byte array; big endian is assumed
+
+ shortToByteArray(short,
+ ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ convert a short into a byte array
+
+ shutdown()
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Shut down the event processor
+
+ shutdownLegacyModules()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ shutdownMotorControllers()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ shutdownRobot()
+ - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
+
+ shutdownServoControllers()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ signalDetected()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ Returns true if an IR signal is detected
+
+ size()
+ - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
+
+
+ start(EventLoop)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Start the event processor
+
+ start()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ User defined start method
+
+ start -
+ Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ button start
+
+ startActiveOpMode()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ startBlockingWork()
+ - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice
+
+ This method will be called to let the sync'd device know that it's ok
+ to enter a blocking
+ state.
+
+
+ startTime()
+ - Method in class com.qualcomm.robotcore.util.ElapsedTime
+
+ Get the relative start time
+
+ state
+ - Variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ status()
+ - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor
+
+ Status of this sensor, in string form
+
+ status()
+ - Method in class com.qualcomm.robotcore.hardware.CompassSensor
+
+ Status of this sensor, in string form
+
+ status()
+ - Method in class com.qualcomm.robotcore.hardware.GyroSensor
+
+ Status of this sensor, in string form
+
+ status()
+ - Method in class com.qualcomm.robotcore.hardware.LightSensor
+
+ Status of this sensor, in string form
+
+ status()
+ - Method in class com.qualcomm.robotcore.hardware.UltrasonicSensor
+
+ Status of this sensor, in string form
+
+ stop()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ User defined stop method
+
+ stopActiveOpMode()
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ stringToUtf8(String)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ Convert a Java String into a UTF-8 byte array
+
+ switchOpModes(String)
+ - Method in class com.qualcomm.robotcore.eventloop.opmode.OpModeManager
+
+ SyncdDevice
+ - Interface in com.qualcomm.robotcore.eventloop
+
+
+ SyncdDevice is for a device that wants to be in sync with the event
+ loop.
+
+
+ SYSTEM_TELEMETRY
+ - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+
+
+
+
+
+
T
+
+ TAG - Static variable in
+ class com.qualcomm.ftccommon.DbgLog
+
+ Tag used by logcat
+
+ teardown()
+ - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
+
+ Teardown method, this will be called after the last call to loop.
+
+
+ telemetry
+ - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ Telemetry Data
+
+ textDeviceName
+ - Variable in class com.qualcomm.ftccommon.UpdateUI
+
+ textErrorMessage
+ - Variable in class com.qualcomm.ftccommon.UpdateUI
+
+ textGamepad
+ - Variable in class com.qualcomm.ftccommon.UpdateUI
+
+ textOpMode
+ - Variable in class com.qualcomm.ftccommon.UpdateUI
+
+ textRobotStatus
+ - Variable in class com.qualcomm.ftccommon.UpdateUI
+
+ textWifiDirectStatus
+ - Variable in class com.qualcomm.ftccommon.UpdateUI
+
+ throwIfRangeIsInvalid(double,
+ double, double) - Static method in class com.qualcomm.robotcore.util.Range
+
+ Throw an IllegalArgumentException if 'number' is less than 'min' or
+ greater than 'max'
+
+
+ time -
+ Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
+
+ number of seconds this op mode has been running, this is
+ updated before every call to loop.
+
+
+ time() -
+ Method in class com.qualcomm.robotcore.util.ElapsedTime
+
+ How many seconds since the start time.
+
+ timestamp -
+ Variable in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Relative timestamp of the last time an event was detected
+
+ toByteArray()
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
+
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.AccelerationSensor
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.CompassSensor
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Display a summary of this gamepad, including the state of all
+ buttons, analog sticks, and triggers
+
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.GyroSensor
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSensor
+
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.LightSensor
+
+ toString()
+ - Method in class com.qualcomm.robotcore.hardware.UltrasonicSensor
+
+ toString()
+ - Method in class com.qualcomm.robotcore.util.ElapsedTime
+
+ Return a string stating the number of seconds that have passed
+
+ toString()
+ - Method in class com.qualcomm.robotcore.util.SerialNumber
+
+ type() -
+ Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Get the type of gamepad as a String.
+
+ TypeConversion
+ - Class in com.qualcomm.robotcore.util
+
+
+ Utility class for performing type conversions
+
+
+
+
+
+
+
U
+
+ ultrasonicSensor
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ UltrasonicSensor
+ - Class in com.qualcomm.robotcore.hardware
+
+
+ UltrasonicSensor()
+ - Constructor for class com.qualcomm.robotcore.hardware.UltrasonicSensor
+
+ unregisterSyncdDevice(SyncdDevice)
+ - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
+
+ Unregister a sync'd device
+
+ unsignedByteToDouble(byte)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ Accept a byte, treat that byte as an unsigned byte, then covert it to
+ the return type
+
+
+ unsignedByteToInt(byte)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ Accept a byte, treat that byte as an unsigned byte, then covert it to
+ the return type
+
+
+ unsignedIntToLong(int)
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+ Accept an int, treat that int as an unsigned int, then covert it to
+ the return type
+
+
+ update(android.view.MotionEvent)
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Update the gamepad based on a MotionEvent
+
+ update(android.view.KeyEvent)
+ - Method in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Update the gamepad based on a KeyEvent
+
+ UpdateUI - Class in com.qualcomm.ftccommon
+
+ UpdateUI(Activity,
+ Dimmer) - Constructor for class com.qualcomm.ftccommon.UpdateUI
+
+
+ updateUi(String,
+ Gamepad[]) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
+
+ UpdateUI.Callback - Class in com.qualcomm.ftccommon
+
+ Callback methods
+
+ user - Variable
+ in class com.qualcomm.robotcore.hardware.Gamepad
+
+ Which user is this gamepad used by
+
+ utf8ToString(byte[])
+ - Static method in class com.qualcomm.robotcore.util.TypeConversion
+
+
+
+
+
+
+
V
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.eventloop.EventLoopManager.State
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.CompassSensor.CompassMode
+
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.Direction
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.DeviceMode
+
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.RunMode
+
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.DeviceType
+
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
+
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.Servo.Direction
+
+ Returns the enum constant of this type with the specified name.
+
+ valueOf(String)
+ - Static method in enum com.qualcomm.robotcore.hardware.ServoController.PwmStatus
+
+
+ Returns the enum constant of this type with the specified name.
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.eventloop.EventLoopManager.State
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.CompassSensor.CompassMode
+
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.Direction
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.DeviceMode
+
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.DcMotorController.RunMode
+
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.DeviceType
+
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
+
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.Servo.Direction
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ values()
+ - Static method in enum com.qualcomm.robotcore.hardware.ServoController.PwmStatus
+
+
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+
+ voltageSensor
+ - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
+
+ VoltageSensor
+ - Interface in com.qualcomm.robotcore.hardware
+
+
+ Voltage Sensor
+
+
+
+
+
+
+
W
+
+ waitingForRestart()
+ - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
+
+ wifiDirectUpdate(WifiDirectAssistant.Event)
+ - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
+
+ writeLegacyModuleCache(int,
+ byte[]) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
+
+ Write to the device memory map; only works in NXT I2C write mode
+
+
+
+
+
+
+
+
X
+
+ x
+ - Variable in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
+
+
+ x - Variable in
+ class com.qualcomm.robotcore.hardware.Gamepad
+
+ button x
+
+
+
+
+
+
+
Y
+
+ y
+ - Variable in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
+
+
+ y - Variable in
+ class com.qualcomm.robotcore.hardware.Gamepad
+
+ button y
+
+
+
+
+
+
+
Z
+
+ z
+ - Variable in class com.qualcomm.robotcore.hardware.AccelerationSensor.Acceleration
+
+
+
+
A B C D E F G H I J L M N O P R S T U V W X Y Z
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/index.html b/Android/App/doc/javadoc/index.html
index 14d0e63..b41151c 100644
--- a/Android/App/doc/javadoc/index.html
+++ b/Android/App/doc/javadoc/index.html
@@ -1,10 +1,11 @@
-
+
-
-Generated Documentation (Untitled)
-
+
+
-
-
-
-
-
-
-
-JavaScript is disabled on your browser.
-
-Frame Alert
-This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to Non-frame version .
-
+
+
+
+
+
+
+
+ JavaScript is disabled on your browser.
+
+ Frame Alert
+
+ This document is designed to be viewed using the frames feature. If you see this message,
+ you are using a non-frame-capable web client. Link to Non-frame
+ version .
+
diff --git a/Android/App/doc/javadoc/overview-frame.html b/Android/App/doc/javadoc/overview-frame.html
index 2efdfed..f592825 100644
--- a/Android/App/doc/javadoc/overview-frame.html
+++ b/Android/App/doc/javadoc/overview-frame.html
@@ -1,25 +1,33 @@
-
+
-
-Overview List
-
-
-
+
+ Overview List
+
+
+
-
+
diff --git a/Android/App/doc/javadoc/overview-summary.html b/Android/App/doc/javadoc/overview-summary.html
index 477822a..c16e029 100644
--- a/Android/App/doc/javadoc/overview-summary.html
+++ b/Android/App/doc/javadoc/overview-summary.html
@@ -1,12 +1,13 @@
-
+
-
-Overview
-
-
-
+
+ Overview
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/overview-tree.html b/Android/App/doc/javadoc/overview-tree.html
index ae22283..e66f876 100644
--- a/Android/App/doc/javadoc/overview-tree.html
+++ b/Android/App/doc/javadoc/overview-tree.html
@@ -1,12 +1,13 @@
-
+
-
-Class Hierarchy
-
-
-
+
+ Class Hierarchy
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
-
Class Hierarchy
-
-
Interface Hierarchy
-
-
Enum Hierarchy
-
-java.lang.Object
-
-java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
-
-
-
-
-
+
Class Hierarchy
+
+
Interface Hierarchy
+
+
Enum Hierarchy
+
+ java.lang.Object
+
+ java.lang.Enum<E> (implements java.lang.Comparable<T>,
+ java.io.Serializable)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/doc/javadoc/serialized-form.html b/Android/App/doc/javadoc/serialized-form.html
index 589882c..3480713 100644
--- a/Android/App/doc/javadoc/serialized-form.html
+++ b/Android/App/doc/javadoc/serialized-form.html
@@ -1,12 +1,13 @@
-
+
-
-Serialized Form
-
-
-
+
+ Serialized Form
+
+
+
-JavaScript is disabled on your browser.
+ JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android/App/settings.gradle b/Android/App/settings.gradle
index 68db5e3..aa099ab 100644
--- a/Android/App/settings.gradle
+++ b/Android/App/settings.gradle
@@ -1,2 +1,2 @@
// FTC Apps
-include (':FtcRobotController')
+include ':FtcRobotController'
diff --git a/PC/Java/RobotSimulator/lib/guava-18.0.jar b/PC/Java/RobotSimulator/lib/guava-18.0.jar
new file mode 100644
index 0000000..8f89e49
Binary files /dev/null and b/PC/Java/RobotSimulator/lib/guava-18.0.jar differ
diff --git a/PC/Java/RobotSimulator/lib/netty-all-4.0.30.Final.jar b/PC/Java/RobotSimulator/lib/netty-all-4.0.30.Final.jar
new file mode 100644
index 0000000..1b50a88
Binary files /dev/null and b/PC/Java/RobotSimulator/lib/netty-all-4.0.30.Final.jar differ
diff --git a/PC/Java/RobotSimulator/lib/protobuf.jar b/PC/Java/RobotSimulator/lib/protobuf.jar
new file mode 100644
index 0000000..2b54728
Binary files /dev/null and b/PC/Java/RobotSimulator/lib/protobuf.jar differ
diff --git a/PC/Java/RobotSimulator/remoteApiJava.dll b/PC/Java/RobotSimulator/remoteApiJava.dll
new file mode 100644
index 0000000..195cd56
Binary files /dev/null and b/PC/Java/RobotSimulator/remoteApiJava.dll differ
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/MainApp.java b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/MainApp.java
index 12e1c46..1d70f0b 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/MainApp.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/MainApp.java
@@ -3,6 +3,7 @@
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
+import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Insets;
import javafx.scene.Scene;
@@ -19,10 +20,12 @@
import java.util.logging.Logger;
import java.util.prefs.Preferences;
+import javafx.stage.WindowEvent;
import org.ftccommunity.gui.view.*;
+//import org.ftccommunity.simulator.RobotSimulator;
import org.ftccommunity.simulator.RobotSimulator;
import org.ftccommunity.simulator.modules.BrickSimulator;
-import org.ftccommunity.simulator.modules.LegacyBrickSimulator;
+//import org.ftccommunity.simulator.modules.LegacyBrickSimulator;
import org.ftccommunity.utils.ClientLogger;
import org.ftccommunity.utils.Utils;
@@ -34,7 +37,7 @@ public class MainApp extends Application {
/**
* The data as an observable list of Controllers.
*/
- private ObservableList brickList;
+ private final ObservableList brickList;
public MainApp() {
brickList = FXCollections.observableArrayList();
@@ -63,7 +66,7 @@ public void start(Stage primaryStage) {
Runtime.getRuntime().addShutdownHook(new Thread("shutdown thread") {
public void run() {
System.out.println("***** Threads Exiting *****");
- RobotSimulator.isgThreadsAreRunning();
+ RobotSimulator.requestTermination();
}
});
@@ -71,8 +74,13 @@ public void run() {
MainApp.primaryStage.setTitle("Simulator App");
// Set the application icon.
- this.primaryStage.getIcons().add(new Image("file:resources/images/robot.png"));
+ MainApp.primaryStage.getIcons().add(new Image("file:resources/images/robot.png"));
+ // Add a close request handler to run when closed, otherwise certian cleanup procedures won't run
+ MainApp.primaryStage.setOnCloseRequest(event -> {
+ primaryStage.close();
+ System.exit(0);
+ });
initRootLayout();
showBrickOverview();
}
@@ -103,6 +111,7 @@ public void initRootLayout() {
// Try to load last opened controller file.
//File file = Utils.getBrickFilePath(Preferences.userNodeForPackage(this.getClass()));
+ //File file = Utils.getBrickFilePath(Preferences.userNodeForPackage(MainApp.class));
File file = Utils.getBrickFilePath(Preferences.userNodeForPackage(MainApp.class));
if (file != null) {
try {
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/DebugWindowController.java b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/DebugWindowController.java
index cab03fb..65dd936 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/DebugWindowController.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/DebugWindowController.java
@@ -50,7 +50,7 @@ public void setMainApp(MainApp mainApp) {
/**
* Start a thread that queries the Brick Simulators and displays current values here.
*/
- public void startLiveDebug() {
+ private void startLiveDebug() {
Task task = new Task() {
@Override
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/EditDialogController.java b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/EditDialogController.java
index 0af1881..67b78a6 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/EditDialogController.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/EditDialogController.java
@@ -1,21 +1,19 @@
package org.ftccommunity.gui.view;
-import org.ftccommunity.simulator.modules.BrickSimulator;
-import org.ftccommunity.simulator.modules.devices.DeviceType;
-
-import java.util.List;
-
import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
-import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
+import org.ftccommunity.simulator.modules.BrickSimulator;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import java.util.List;
/**
* Dialog to edit details of a Motor Controller.
@@ -24,7 +22,9 @@
*/
public class EditDialogController {
- @FXML
+ private final ChoiceBox[] choiceBoxes;
+ private final TextField[][] portNames = new TextField[6][2];
+ @FXML
private Label brickTypeField;
@FXML
private TextField brickNameField;
@@ -34,13 +34,8 @@ public class EditDialogController {
private TextField brickPortField;
@FXML
private TextField brickSerialField;
-
@FXML
private GridPane portGrid;
-
- private ChoiceBox[] choiceBoxes;
- private TextField[][] portNames = new TextField[6][2];
-
private Stage dialogStage;
private BrickSimulator brick;
private boolean okClicked = false;
@@ -113,7 +108,7 @@ public void fillFieldsWithCurrentValues() {
brickPortField.setText(brick.getPort().toString());
brickSerialField.setText(brick.getSerial());
- for (int i=0;i nameList = brick.getPortDevice(i).getPortNames();
for (int j=0;j
-
+
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/OverviewController.java b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/OverviewController.java
index dd28b09..f4ad111 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/OverviewController.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/OverviewController.java
@@ -1,15 +1,13 @@
package org.ftccommunity.gui.view;
+import javafx.scene.control.*;
import org.ftccommunity.gui.MainApp;
+// import org.ftccommunity.simulator.RobotSimulator;
import org.ftccommunity.simulator.RobotSimulator;
import org.ftccommunity.simulator.modules.BrickSimulator;
import javafx.fxml.FXML;
-import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
-import javafx.scene.control.Label;
-import javafx.scene.control.TableColumn;
-import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.Pane;
@@ -30,6 +28,9 @@ public class OverviewController {
@FXML
private Pane detailsPane;
+ @FXML
+ Button btnStartSimulator;
+
// Reference to the main application.
private MainApp mainApp;
private RobotSimulator simulator;
@@ -44,7 +45,7 @@ private void initialize() {
//controllerNameColumn.setCellValueFactory(cellData -> cellData.getValue().getName());
//noinspection Convert2Diamond
// the "type" is tied to getType() in BrickSimulator
- brickNameColumn.setCellValueFactory(new PropertyValueFactory("type"));
+ brickNameColumn.setCellValueFactory(new PropertyValueFactory<>("type"));
brickAliasColumn.setCellValueFactory(cellData -> cellData.getValue().nameProperty());
// Show brick details in the Details window.
@@ -104,7 +105,7 @@ private void handleDeleteBrick() {
} else {
// Nothing selected.
Alert alert = new Alert(AlertType.WARNING);
- alert.initOwner(mainApp.getPrimaryStage());
+ alert.initOwner(MainApp.getPrimaryStage());
alert.setTitle("No Selection");
alert.setHeaderText("No Controller Selected");
alert.setContentText("Please select a controller in the table.");
@@ -155,8 +156,15 @@ private void handleEditBrick() {
*/
@FXML
private void handleStartSimulatorButton() {
- if (!RobotSimulator.simulatorStarted())
- RobotSimulator.startSimulator(mainApp);
+ if (!RobotSimulator.simulatorStarted()) {
+ // TODO: read from interface (multicast)
+ RobotSimulator.startSimulator(mainApp, false);
+ btnStartSimulator.setText("Stop Simulator");
+ } else {
+ System.out.println("Trying to terminate Robot Simulator");
+ RobotSimulator.requestTermination();
+ btnStartSimulator.setText("Start Simulator");
+ }
}
/**
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/RootLayoutController.java b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/RootLayoutController.java
index ed77fb5..bdfb098 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/RootLayoutController.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/gui/view/RootLayoutController.java
@@ -54,7 +54,7 @@ private void handleOpen() {
fileChooser.getExtensionFilters().add(extFilter);
// Show save file dialog
- File file = fileChooser.showOpenDialog(mainApp.getPrimaryStage());
+ File file = fileChooser.showOpenDialog(MainApp.getPrimaryStage());
if (file != null) {
try {
@@ -96,7 +96,7 @@ private void handleSaveAs() {
fileChooser.getExtensionFilters().add(extFilter);
// Show save file dialog
- File file = fileChooser.showSaveDialog(mainApp.getPrimaryStage());
+ File file = fileChooser.showSaveDialog(MainApp.getPrimaryStage());
if (file != null) {
// Make sure it has the correct extension
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/BrickListGenerator.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/BrickListGenerator.java
index 79d4e61..0ffba9e 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/BrickListGenerator.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/BrickListGenerator.java
@@ -1,6 +1,7 @@
package org.ftccommunity.simulator;
-
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.ftccommunity.utils.Utils;
import org.ftccommunity.gui.MainApp;
import org.ftccommunity.simulator.data.AnalogSimData;
import org.ftccommunity.simulator.data.MotorSimData;
@@ -14,99 +15,77 @@
import org.ftccommunity.simulator.modules.devices.USBMotorControllerDevice;
import javafx.collections.ObservableList;
+import org.ftccommunity.simulator.net.manager.NetworkManager;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+import sun.nio.ch.Net;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
+import java.net.NetworkInterface;
+import java.util.logging.Level;
import java.util.logging.Logger;
public class BrickListGenerator implements Runnable {
private static final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
- DatagramSocket mServerSocket;
+ //DatagramSocket mServerSocket;
byte[] mReceiveData = new byte[1024];
byte[] mSendData = new byte[1024];
- MainApp mMainApp;
+ private final MainApp mMainApp;
public BrickListGenerator(MainApp mainApp) {
mMainApp = mainApp;
-
- try {
- mServerSocket = new DatagramSocket(7000);
- } catch (IOException e) {
- e.printStackTrace();
- }
}
@Override
public void run() {
- byte[] packet;
+ byte[] packet;
- try {
+ try {
while (!Thread.currentThread().isInterrupted()) {
packet = receivePacketFromPhone();
+ NetworkManager.clear(SimulatorData.Type.Types.DEVICE_LIST);
handleIncomingPacket(packet, false);
}
// Catch unhandled exceptions and cleanup
- } catch (Exception e) {
- e.printStackTrace();
- close();
- }
+ } catch (Exception e) {
+ logger.log(Level.SEVERE, e.toString());
+ }
}
- public void close() {
- try {
- mServerSocket.close();
- } catch (Exception ex) {
- System.out.println("An error occurred while closing!");
- ex.printStackTrace();
- }
+ private byte[] receivePacketFromPhone() throws InterruptedException{
+ return NetworkManager.getLatestData(SimulatorData.Type.Types.DEVICE_LIST, true);
}
-
- private byte[] receivePacketFromPhone() {
- DatagramPacket receivePacket = new DatagramPacket(mReceiveData, mReceiveData.length);
- try {
- mServerSocket.receive(receivePacket);
- } catch (IOException e) {
- e.printStackTrace();
+ private void sendPacketToPhone(String sendData) {
+ try {
+ NetworkManager.requestSend(SimulatorData.Type.Types.DEVICE_LIST, SimulatorData.Data.Modules.LEGACY_CONTROLLER, sendData);
+// logger.log(Level.FINER, "sendPacketToPhone: (" + Utils.bufferToHexString(sendData, 0, sendData.length()) +
+// ") len=" + sendData.length());
+ } catch (Exception e) {
+ logger.log(Level.SEVERE, e.toString());
}
-
- // Get the port and address of the sender from the incoming packet and set some global variables
- // to be used when we reply back.
- // TODO: do we need to set this every time?
- RobotSimulator.GetPhoneConnectionDetails(receivePacket.getPort(), receivePacket.getAddress());
-
- // Make a copy of the packet. Not sure if we need to do this. Might not hold on to it for long.
- // byte[] myPacket = new byte[receivePacket.getLength()];
- // System.arraycopy(receivePacket.getData(), 0, myPacket, 0, receivePacket.getLength());
- return receivePacket.getData();
}
- private void sendPacketToPhone(byte[] sendData) {
- try {
- DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length,
- RobotSimulator.getPhoneIPAddress(), RobotSimulator.getPhonePort());
- mServerSocket.send(sendPacket);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ public void handleIncomingPacket(byte[] data, boolean wait) {
+ // System.out.println("Receive Buffer: (" + Utils.bufferToHexString(data, 0, 25) + ") len=" + data.length);
- public void handleIncomingPacket(byte[] data, boolean wait)
- {
- if (data[0] == '?') { // infoCmd
- sendPacketToPhone(getXmlModuleList(mMainApp.getBrickData()));
+ // Wrap the device list in a data in order to be sent correctly
+ if (data[0] == '?') {
+ logger.log(Level.INFO, "Sending DEVICE_LIST...");
+ sendPacketToPhone(getXmlModuleList(mMainApp.getBrickData()));
+ //NetworkManager.requestSend(SimulatorData.Type.Types.DEVICE_LIST,
+ // SimulatorData.Data.Modules.LEGACY_CONTROLLER,
+ // getXmlModuleList(mMainApp.getBrickData()));
}
+
}
- private byte[] getXmlModuleList(ObservableList mBrickList) {
+ private String getXmlModuleList(ObservableList mBrickList) {
try {
JAXBContext context = JAXBContext.newInstance(
BrickListWrapper.class,
@@ -126,22 +105,21 @@ private byte[] getXmlModuleList(ObservableList mBrickList) {
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- // Wrapping our controller data.
- BrickListWrapper wrapper = new BrickListWrapper();
- wrapper.setBricks(mBrickList);
+ // Wrapping our controller data.
+ BrickListWrapper wrapper = new BrickListWrapper();
+ wrapper.setBricks(mBrickList);
- // Marshalling to generate XML stream.
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ // Marshalling to generate XML stream.
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
m.marshal(wrapper, outputStream);
- return outputStream.toByteArray();
+ return outputStream.toString();
} catch (JAXBException e) {
e.printStackTrace();
throw new AssertionError("JAXB should not be throwing", e.getCause());
}
}
-
}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/CoppeliaApiClient.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/CoppeliaApiClient.java
index 8670484..9608a65 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/CoppeliaApiClient.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/CoppeliaApiClient.java
@@ -1,19 +1,20 @@
package org.ftccommunity.simulator;
+import org.ftccommunity.gui.MainApp;
import org.ftccommunity.simulator.data.AnalogSimData;
import org.ftccommunity.simulator.data.MotorSimData;
import org.ftccommunity.simulator.data.SimData;
import org.ftccommunity.simulator.modules.BrickSimulator;
import coppelia.BoolW;
-import coppelia.CharWA;
import coppelia.FloatWAA;
import coppelia.IntW;
import coppelia.IntWA;
import coppelia.remoteApi;
import java.util.List;
+import java.util.concurrent.LinkedBlockingQueue;
public class CoppeliaApiClient implements Runnable {
public static final String LOCAL_HOST = "127.0.0.1";
@@ -35,11 +36,11 @@ public class CoppeliaApiClient implements Runnable {
int mClientID;
remoteApi mVrep;
- org.ftccommunity.gui.MainApp mMainApp;
+ final org.ftccommunity.gui.MainApp mMainApp;
private volatile boolean done;
int ret;
- public CoppeliaApiClient(org.ftccommunity.gui.MainApp mainApp) {
+ public CoppeliaApiClient(MainApp mainApp) {
mMainApp = mainApp;
done = false;
}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulator.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulator.java
index 0c224bf..7aad39b 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulator.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulator.java
@@ -1,10 +1,17 @@
package org.ftccommunity.simulator;
+import org.ftccommunity.gui.MainApp;
import org.ftccommunity.simulator.modules.BrickSimulator;
+import org.ftccommunity.simulator.net.manager.NetworkManager;
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
import java.net.InetAddress;
+import java.net.SocketException;
import java.util.LinkedList;
import java.util.List;
+import java.util.logging.Level;
import java.util.logging.Logger;
public class RobotSimulator {
@@ -12,55 +19,87 @@ public class RobotSimulator {
private static BrickListGenerator gBrickListGenerator;
private static CoppeliaApiClient gCoppeliaApiClient;
private static volatile boolean gThreadsAreRunning = true;
- private static LinkedList threadLinkedList = new LinkedList<>();
+ private static final LinkedList threadLinkedList = new LinkedList<>();
private static int gPhonePort;
private static InetAddress gPhoneIPAddress;
private static boolean simulatorStarted = false;
private static boolean visualizerStarted = false;
- static public void startSimulator(org.ftccommunity.gui.MainApp mainApp) {
- simulatorStarted = true;
-
- // Start the module info server
- System.out.println("Starting Module Lister...");
+ static public void startSimulator(MainApp mainApp, boolean multicast) {
+ Thread processQueue = new Thread(() -> {
+ while (!Thread.currentThread().isInterrupted()) {
+ NetworkManager.processQueue();
+ }
+ }, "Process Queue");
+ processQueue.start();
+ threadLinkedList.add(processQueue);
+ simulatorStarted = true;
+
+ System.out.println("Starting Module Lister...");
gBrickListGenerator = new BrickListGenerator(mainApp); // Runnable
- Thread moduleListerThread = new Thread(gBrickListGenerator,"");
+ Thread moduleListerThread = new Thread(gBrickListGenerator, "Brick List Generator");
moduleListerThread.start();
+ threadLinkedList.add(moduleListerThread);
+
+ // Start the network and add its thread to the threads running
+ threadLinkedList.add(NetworkManager.start());
+
+ if (multicast) {
+ System.out.println("Seeing if we can get a multicast...");
+ Thread multicastListener = new Thread(() -> {
+ DatagramSocket socket = null;
+ try {
+ socket = new DatagramSocket(7003);
+ } catch (SocketException e) {
+ logger.log(Level.SEVERE, e.toString());
+ }
+
+ while (!Thread.currentThread().isInterrupted() && socket != null) {
+ DatagramPacket packet = new DatagramPacket(new byte[1], 1);
+ try {
+ socket.receive(packet);
+ } catch (IOException e) {
+ logger.log(Level.SEVERE, e.toString());
+ }
+ System.out.println(packet.getAddress().getHostAddress());
+ }
+ });
+ multicastListener.start();
+ }
-
- // Read the current list of modules from the GUI MainApp class
// Start the individual threads for each module
+ // Read the current list of modules from the GUI MainApp class
List brickList = mainApp.getBrickData();
+
for (BrickSimulator temp : brickList) {
- Thread t = new Thread(temp,temp.getName()); // Make a thread from the object and also set the process name
- t.start();
+ Thread t = new Thread(temp, temp.getName()); // Make a thread from the object and also set the process name
+ t.start();
threadLinkedList.add(t);
- System.out.println("Starting: " + temp.getName() + " \"" + temp.getName() + "\"");
- }
+ System.out.println(temp.getName() + " " + temp.getName());
+ }
}
static public boolean simulatorStarted() {
- return simulatorStarted;
+ return simulatorStarted;
}
- static public void startVisualizer(org.ftccommunity.gui.MainApp mainApp) {
+ static public void startVisualizer(MainApp mainApp) {
+ visualizerStarted = true;
- visualizerStarted = true;
-
- // Start the module info server
- System.out.println("Starting Visualizer...");
- gCoppeliaApiClient = new CoppeliaApiClient(mainApp); // Runnable
+ // Start the module info server
+ System.out.println("Starting Visualizer...");
+ gCoppeliaApiClient = new CoppeliaApiClient(mainApp); // Runnable
Thread coppeliaThread = new Thread(gCoppeliaApiClient);
if (gCoppeliaApiClient.init()) {
- coppeliaThread.start();
- } else {
- System.out.println("Initialization of Visualizer failed");
- }
+ coppeliaThread.start();
+ } else {
+ System.out.println("Initialization of Visualizer failed");
+ }
}
static public boolean visualizerStarted() {
- return visualizerStarted;
+ return visualizerStarted;
}
public static boolean isgThreadsAreRunning() {
@@ -70,12 +109,13 @@ public static boolean isgThreadsAreRunning() {
public static void requestTermination() {
gThreadsAreRunning = false;
try {
- Thread.currentThread().wait(50);
+ Thread.sleep(50);
} catch (InterruptedException ex) {
- ex.toString(); // Do nothing
+ logger.log(Level.SEVERE, ex.toString());
}
threadLinkedList.forEach(Thread::interrupt);
Thread.currentThread().interrupt();
+ simulatorStarted = false;
}
public static int getPhonePort() {
@@ -86,8 +126,8 @@ public static InetAddress getPhoneIPAddress() {
return gPhoneIPAddress;
}
- public static void GetPhoneConnectionDetails(int phonePort, InetAddress phoneIpAddress) {
+ public static void setPhoneConnectionDetails(int phonePort, InetAddress phoneIpAddress) {
gPhonePort = phonePort;
gPhoneIPAddress = phoneIpAddress;
}
-}
+}
\ No newline at end of file
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulatorConsole.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulatorConsole.java
new file mode 100644
index 0000000..1721e66
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/RobotSimulatorConsole.java
@@ -0,0 +1,105 @@
+package org.ftccommunity.simulator;
+
+import org.ftccommunity.gui.MainApp;
+import org.ftccommunity.utils.ClientLogger;
+import java.io.IOException;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.logging.Level;
+
+import java.util.logging.Logger;
+
+@Deprecated
+class RobotSimulatorConsole
+{
+ public static void main(String[] args)
+ {
+ try {
+ ClientLogger.setup();
+ } catch (IOException ex) {
+ System.out.println("Cannot setup the logger!");
+ }
+
+ final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
+ System.out.println("Program started");
+
+ //LinkedBlockingQueue mQueue = new LinkedBlockingQueue<>(100);
+ CoppeliaApiClient client = new CoppeliaApiClient(new MainApp());
+
+ /*// Start the network reader
+ org.ftccommunity.simulator.ControllerSimulator simulator;
+ try {
+ simulator = new org.ftccommunity.simulator.ControllerSimulator(new MainApp()); // Runnable
+ } catch (Exception ex) {
+ System.out.println("Sorry, this application cannot continue.\nAborting! Details:");
+ logger.log(Level.SEVERE, ex.getMessage());
+ return;
+ }
+ Thread simulatorThread = new Thread(simulator);
+
+ try {
+ System.out.print("Starting up...");
+ if (client.init()) {
+ System.out.println("Done!");
+ simulatorThread.start();
+
+ Thread clientThread = new Thread(new CoppeliaApiClient(mQueue));
+ clientThread.start();
+
+ long totalPackets = 0;
+ int packetsReceivedPerSecond;
+ double packetsReceivedAvg;
+ int secondCounter=0;
+ while (!Thread.currentThread().isInterrupted()) {
+ Thread.sleep(1000);
+ secondCounter++;
+
+ packetsReceivedPerSecond = simulator.getPacketsReceived();
+ totalPackets += packetsReceivedPerSecond;
+
+ packetsReceivedAvg = (double) totalPackets / secondCounter;
+ System.out.println("Status: " + "GOOD" +
+ "\tPackets sent: " + simulator.getPacketsSent() +
+ "\tPacket received: " + packetsReceivedPerSecond +
+ "\tAverage # of packets received: " + Math.round(packetsReceivedAvg));
+ simulator.resetCount();
+
+ }
+ } else {
+ System.out.println("Failed!");
+ }
+
+ } catch (Exception ex) {
+ System.out.println("\nAn error occurred during execution! Please see the log.");
+ logger.log(Level.SEVERE, ex.getMessage());
+ for (StackTraceElement stack : ex.getStackTrace()) {
+ logger.log(Level.SEVERE,stack.toString());
+ }
+
+ try {
+ Thread.sleep(25); // Wait a brief period for termination
+ simulatorThread.join(); // Get the thread to join
+ } catch (InterruptedException e) {
+ logger.log(Level.WARNING, "Interruption acknowledged!");
+ }
+ } catch (UnsatisfiedLinkError libraryNotFound){
+ System.out.println("I could not find the 'remoteApiJava.dll' in the system PATH or the current directory.");
+ try {
+ Thread.sleep(25); // Wait a brief period for termination
+ simulatorThread.join(); // Get the thread to join
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ }
+ System.out.print("Cleaning up...");
+ simulator.requestTerminate();
+ try {
+ simulatorThread.join(300);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }*/
+ System.out.println("Done!");
+ System.out.println("Program ended");
+ }
+
+}
+
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/AnalogSimData.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/AnalogSimData.java
index dc52840..9f319ee 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/AnalogSimData.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/AnalogSimData.java
@@ -8,7 +8,7 @@
@XmlAccessorType(XmlAccessType.NONE)
public class AnalogSimData extends SimData {
- float mAnalogValue=0.0f;
+ private float mAnalogValue=0.0f;
public AnalogSimData() {
super();
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/MotorSimData.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/MotorSimData.java
index 4ae4a2a..d5f2e8b 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/MotorSimData.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/MotorSimData.java
@@ -8,8 +8,8 @@
@XmlAccessorType(XmlAccessType.NONE)
public class MotorSimData extends SimData {
- float mMotorSpeed=0;
- boolean mMotorFloatMode=false;
+ private float mMotorSpeed=0;
+ private boolean mMotorFloatMode=false;
public MotorSimData() {
super();
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/SimData.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/SimData.java
index d14f4d0..09918d9 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/SimData.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/data/SimData.java
@@ -15,7 +15,7 @@
public abstract class SimData {
public final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
- protected StringProperty mName = null;
+ private StringProperty mName = null;
public SimData() {
mName = new SimpleStringProperty("");
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/io/handler/ClientHandler.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/io/handler/ClientHandler.java
new file mode 100644
index 0000000..34543c8
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/io/handler/ClientHandler.java
@@ -0,0 +1,91 @@
+package org.ftccommunity.simulator.io.handler;
+
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelDuplexHandler;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.handler.timeout.IdleState;
+import io.netty.handler.timeout.IdleStateEvent;
+import org.ftccommunity.simulator.net.manager.NetworkManager;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+import org.ftccommunity.simulator.net.tasks.HeartbeatTask;
+
+import java.io.IOException;
+import java.net.SocketException;
+
+public class ClientHandler extends ChannelDuplexHandler {
+ @Override
+ public void channelRead(ChannelHandlerContext ctx, Object msg) {
+ SimulatorData.Data received = (SimulatorData.Data) msg;
+
+ // Uncomment to display all data
+ /*for (byte test : data.getInfo(0).getBytes(Charsets.US_ASCII)) {
+ System.out.print(String.format("0x%02X ", test));
+ }*/
+
+ // We don't need to queue heartbearts (HEARTBEAT)
+ if (received.getType().getType() != SimulatorData.Type.Types.HEARTBEAT) {
+ // Print out size and data
+ // System.out.println("Received Data of significance with size=" + data.getSerializedSize());
+ NetworkManager.add(received);
+ }
+
+ while (ctx.channel().isWritable()) {
+ SimulatorData.Data data = NetworkManager.getNextSend();
+ if (data != null) {
+ ctx.write(data);
+ } else {
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void channelReadComplete(ChannelHandlerContext ctx) {
+ ctx.flush();
+ }
+
+
+ @Override
+ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
+ if (evt instanceof IdleStateEvent) {
+ IdleStateEvent e = (IdleStateEvent) evt;
+ if (e.state() == IdleState.WRITER_IDLE ||
+ e.state() == IdleState.READER_IDLE ||
+ e.state() == IdleState.ALL_IDLE) {
+ while (ctx.channel().isWritable()) {
+ SimulatorData.Data data = NetworkManager.getNextSend();
+ if (data != null) {
+ ctx.write(data);
+ } else {
+ ctx.write(HeartbeatTask.buildMessage());
+ break;
+ }
+ }
+ ctx.flush();
+ }
+ }
+ }
+
+ @Override
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
+ if (cause instanceof SocketException) {
+ cause.printStackTrace();
+ } else if (cause instanceof IOException) {
+ cause.printStackTrace();
+ } else {
+ ctx.close();
+ }
+ }
+
+ private void writeMessage(Channel channel, SimulatorData.Data data) {
+ while (!channel.isWritable()) {
+ try {
+ Thread.sleep(10);
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ return;
+ }
+ }
+ channel.write(data);
+ }
+}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/io/handler/HeartbeatHandler.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/io/handler/HeartbeatHandler.java
new file mode 100644
index 0000000..e6bc1a4
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/io/handler/HeartbeatHandler.java
@@ -0,0 +1,30 @@
+package org.ftccommunity.simulator.io.handler;
+
+import io.netty.channel.ChannelInboundHandlerAdapter;
+
+@Deprecated
+public class HeartbeatHandler extends ChannelInboundHandlerAdapter {
+/* @Override
+ public void channelRead(ChannelHandlerContext ctx, Object msg) {
+ SimulatorData.Data data = (SimulatorData.Data) msg;
+ if (data.getType().getType() == SimulatorData.Type.Types.HEARTBEAT) {
+ InetAddress address = InetAddresses.forString(data.getInfo(0));
+ try {
+ if (address.isReachable(100)) {
+ NetworkManager.changeReadiness(true);
+ NetworkManager.setRobotAddress(address);
+ } else {
+ NetworkManager.changeReadiness(false);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ @Override
+ public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) {
+ cause.printStackTrace();
+ ctx.close();
+ }*/
+}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/BrickSimulator.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/BrickSimulator.java
index f15ba63..867cb31 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/BrickSimulator.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/BrickSimulator.java
@@ -4,7 +4,6 @@
import org.ftccommunity.simulator.data.SimData;
import org.ftccommunity.simulator.modules.devices.Device;
import org.ftccommunity.simulator.modules.devices.DeviceFactory;
-import org.ftccommunity.simulator.modules.devices.DeviceType;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
@@ -12,16 +11,14 @@
import javafx.beans.property.StringProperty;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import java.util.logging.Level;
import javax.xml.bind.annotation.XmlElementRef;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
import java.util.List;
import java.util.logging.Logger;
@@ -36,12 +33,9 @@ public abstract class BrickSimulator implements Runnable {
protected String mType;
protected int mNumberOfPorts;
- protected final StringProperty mName;
+ private final StringProperty mName;
protected final StringProperty mSerial;
- protected IntegerProperty mPort;
- protected int mPhonePort;
- protected InetAddress mPhoneIPAddress;
- protected DatagramSocket mServerSocket;
+ private final IntegerProperty mPort;
protected String mFXMLFileName;
@XmlElementRef(name="Devices")
@@ -50,9 +44,6 @@ public abstract class BrickSimulator implements Runnable {
byte[] mReceiveData = new byte[1024];
byte[] mSendData = new byte[1024];
- /** Default Constructor.
- *
- */
public BrickSimulator() {
mName = new SimpleStringProperty("");
mPort = new SimpleIntegerProperty(0);
@@ -64,48 +55,21 @@ public BrickSimulator() {
public void run() {
byte[] packet;
try {
- mServerSocket = new DatagramSocket(mPort.intValue());
-
while (!Thread.currentThread().isInterrupted()) {
packet = receivePacketFromPhone();
- handleIncomingPacket(packet, packet.length, false);
+ handleIncomingPacket(packet, packet.length, true);
}
// Catch unhandled exceptions and cleanup
} catch (Exception e) {
- e.printStackTrace();
- close();
+ logger.log(Level.SEVERE, e.toString(), e);
}
}
- private byte[] receivePacketFromPhone() {
- DatagramPacket receivePacket = new DatagramPacket(mReceiveData, mReceiveData.length);
- try {
- mServerSocket.receive(receivePacket);
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- // Get the port and address of the sender from the incoming packet and set some global variables
- // to be used when we reply back.
- // TODO: do we need to set this every time?
- mPhonePort = receivePacket.getPort();
- mPhoneIPAddress = receivePacket.getAddress();
-
- // Make a copy of the packet. Not sure if we need to do this. Might not hold on to it for long.
- byte[] mypacket = new byte[receivePacket.getLength()];
- System.arraycopy(receivePacket.getData(), 0, mypacket, 0, receivePacket.getLength());
+ protected abstract byte[] receivePacketFromPhone() throws InterruptedException;
- return mypacket;
- }
+ protected abstract void handleIncomingPacket(byte[] data, int length, boolean wait);
- public void close() {
- try {
- mServerSocket.close();
- } catch (Exception ex) {
- System.out.println("An error occurred while closing!");
- ex.printStackTrace();
- }
- }
+ //public abstract String getName();
public abstract void setupDebugGuiVbox(VBox vbox);
@@ -113,9 +77,10 @@ public void close() {
public abstract void populateDetailsPane(Pane pane);
- public abstract void handleIncomingPacket(byte[] data, int length, boolean wait);
+ public abstract SimData findSimDataName(String name);
+ //public abstract void handleIncomingPacket(byte[] data, int length, boolean wait);
- public abstract List getDeviceTypeList();
+ public abstract List getDeviceTypeList();
//---------------------------------------------------------------
@@ -171,11 +136,11 @@ public Device getPortDevice(int i) {
return mDevices[i];
}
- public DeviceType getPortDeviceType(int i) {
+ public SimulatorData.Type.Types getPortDeviceType(int i) {
return mDevices[i].getType();
}
- public void setPortDeviceType(int i, DeviceType type) {
+ public void setPortDeviceType(int i, SimulatorData.Type.Types type) {
mDevices[i] = DeviceFactory.buildDevice(type);
}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/LegacyBrickSimulator.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/LegacyBrickSimulator.java
index 8b0a3f8..e865ce0 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/LegacyBrickSimulator.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/LegacyBrickSimulator.java
@@ -1,20 +1,23 @@
package org.ftccommunity.simulator.modules;
+import javafx.geometry.Insets;
+import javafx.scene.layout.GridPane;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.Region;
+import javafx.scene.layout.VBox;
+import javafx.scene.text.Text;
+import org.ftccommunity.simulator.data.SimData;
import org.ftccommunity.simulator.modules.devices.Device;
import org.ftccommunity.simulator.modules.devices.DeviceType;
import org.ftccommunity.simulator.modules.devices.NullDevice;
-
-import javafx.geometry.Insets;
-import javafx.scene.layout.*;
-import javafx.scene.text.Text;
+import org.ftccommunity.simulator.net.manager.NetworkManager;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
import javax.xml.bind.annotation.XmlRootElement;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
import java.util.ArrayList;
import java.util.List;
+import java.util.logging.Level;
import java.util.logging.Logger;
@@ -25,12 +28,6 @@
*/
@XmlRootElement(name="Legacy")
public class LegacyBrickSimulator extends BrickSimulator {
- private static final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
-
- protected final byte[] mCurrentStateBuffer = new byte[208];
- protected final byte[] temp15 = new byte[15];
- protected final byte[] temp12 = new byte[12];
-
/*
** Packet types
*/
@@ -38,6 +35,10 @@ public class LegacyBrickSimulator extends BrickSimulator {
protected static final byte PACKET_HEADER_1 = (byte)0xaa;
protected static final byte PACKET_WRITE_FLAG = (byte)0x00;
protected static final byte PACKET_READ_FLAG = (byte)0x80;
+ private static final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
+ protected final byte[] mCurrentStateBuffer = new byte[208];
+ protected final byte[] temp15 = new byte[15];
+ protected final byte[] temp12 = new byte[12];
/**
* Default constructor.
@@ -52,19 +53,34 @@ public LegacyBrickSimulator() {
}
}
- private void sendPacketToPhone(byte[] sendData) {
- try {
- DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, mPhoneIPAddress, mPhonePort);
- mServerSocket.send(sendPacket);
+ @Override
+ protected byte[] receivePacketFromPhone() throws InterruptedException {
+ return NetworkManager.getLatestData(SimulatorData.Type.Types.BRICK_INFO);
+ }
+
+ private void sendPacketToPhone(byte[] sendData) {
+ /*try {
+ //DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, mPhoneIPAddress, mPhonePort);
+ //mServerSocket.send(sendPacket);
} catch (IOException e) {
e.printStackTrace();
- }
+ }*/
+ NetworkManager.requestSend(SimulatorData.Type.Types.BRICK_INFO,
+ SimulatorData.Data.Modules.LEGACY_CONTROLLER, sendData);
}
- public void handleIncomingPacket(byte[] data, int length, boolean wait)
- {
- if (data[0] == PACKET_HEADER_0 && data[1] == PACKET_HEADER_1) { // valid packet
+ public void handleIncomingPacket(byte[] data, int length, boolean wait) {
+ if (data[0] == PACKET_HEADER_0 && data[1] == PACKET_HEADER_1) { // valid packet
+ if (data.length < 5) {
+ logger.log(Level.WARNING, "Received a data with in invalid length");
+ return;
+ }
+ sendPacketToPhone(mCurrentStateBuffer);
+ } else {
+ // Write Command...
+ // Process the received data packet
+ // Loop through each of the ports in this object
if (data[2] == PACKET_READ_FLAG) { // read command
byte[] tempBuffer = new byte[data[4]];
@@ -115,7 +131,7 @@ public void populateDetailsPane(Pane pane) {
Text portText = new Text("Port " + i);
grid.add(portText, 0, i);
- Text typeText = new Text(mDevices[i].getType().getName());
+ Text typeText = new Text(DeviceType.getName(mDevices[i].getType()));
grid.add(typeText, 1, i);
List nameList = getPortDevice(i).getPortNames();
@@ -128,13 +144,15 @@ public void populateDetailsPane(Pane pane) {
pane.getChildren().add(grid);
}
+ @Override
+ public SimData findSimDataName(String name) {
+ return null;
+ }
/**
* Getters/Setters
*/
-
-
/**
* GUI Stuff
*/
@@ -152,12 +170,12 @@ public void updateDebugGuiVbox() {
}
}
- public List getDeviceTypeList() {
- List dtl = new ArrayList<>();
- dtl.add(DeviceType.NONE);
- dtl.add(DeviceType.TETRIX_MOTOR);
- dtl.add(DeviceType.TETRIX_SERVO);
- dtl.add(DeviceType.LEGO_LIGHT);
+ public List getDeviceTypeList() {
+ List dtl = new ArrayList<>();
+ dtl.add(SimulatorData.Type.Types.NONE);
+ dtl.add(SimulatorData.Type.Types.LEGACY_MOTOR);
+ dtl.add(SimulatorData.Type.Types.LEGACY_SERVO);
+ dtl.add(SimulatorData.Type.Types.LEGACY_LIGHT);
return dtl;
}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/MotorBrickSimulator.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/MotorBrickSimulator.java
index fc2cc8c..4f94a8b 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/MotorBrickSimulator.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/MotorBrickSimulator.java
@@ -1,5 +1,6 @@
package org.ftccommunity.simulator.modules;
+import org.ftccommunity.simulator.data.SimData;
import org.ftccommunity.simulator.modules.devices.Device;
import org.ftccommunity.simulator.modules.devices.DeviceType;
import org.ftccommunity.simulator.modules.devices.USBMotorControllerDevice;
@@ -7,11 +8,11 @@
import javafx.geometry.Insets;
import javafx.scene.layout.*;
import javafx.scene.text.Text;
+import org.ftccommunity.simulator.net.manager.NetworkManager;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
import javax.xml.bind.annotation.XmlRootElement;
-import java.io.IOException;
-import java.net.DatagramPacket;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
@@ -52,13 +53,20 @@ public MotorBrickSimulator() {
}
}
+ @Override
+ protected byte[] receivePacketFromPhone() {
+ return new byte[0];
+ }
+
private void sendPacketToPhone(byte[] sendData) {
- try {
+ /*try {
DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, mPhoneIPAddress, mPhonePort);
mServerSocket.send(sendPacket);
} catch (IOException e) {
e.printStackTrace();
- }
+ }*/
+ NetworkManager.requestSend(SimulatorData.Type.Types.LEGACY_MOTOR,
+ SimulatorData.Data.Modules.LEGACY_MOTOR, sendData);
}
@@ -100,7 +108,7 @@ public void populateDetailsPane(Pane pane) {
Text portText = new Text("Port " + i);
grid.add(portText, 0, i);
- Text typeText = new Text(mDevices[i].getType().getName());
+ Text typeText = new Text(DeviceType.getName(mDevices[i].getType()));
grid.add(typeText, 1, i);
List nameList = getPortDevice(i).getPortNames();
@@ -112,6 +120,10 @@ public void populateDetailsPane(Pane pane) {
pane.getChildren().add(grid);
}
+ @Override
+ public SimData findSimDataName(String name) {
+ return null;
+ }
/**
* Getters/Setters
@@ -130,9 +142,9 @@ public void updateDebugGuiVbox() {
mDevices[0].updateDebugGuiVbox();
}
- public List getDeviceTypeList() {
- List dtl = new ArrayList<>();
- dtl.add(DeviceType.USB_MOTOR);
+ public List getDeviceTypeList() {
+ List dtl = new ArrayList<>();
+ dtl.add(SimulatorData.Type.Types.USB_MOTOR);
return dtl;
}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/ServoBrickSimulator.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/ServoBrickSimulator.java
index 7f4d163..6d06284 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/ServoBrickSimulator.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/ServoBrickSimulator.java
@@ -5,9 +5,11 @@
import javax.xml.bind.annotation.XmlRootElement;
+import org.ftccommunity.simulator.data.SimData;
import org.ftccommunity.simulator.modules.devices.Device;
-import org.ftccommunity.simulator.modules.devices.DeviceType;
import org.ftccommunity.simulator.modules.devices.NullDevice;
+import org.ftccommunity.simulator.net.manager.NetworkManager;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
import java.util.ArrayList;
import java.util.List;
@@ -32,7 +34,12 @@ public ServoBrickSimulator() {
}
}
- public void fixupUnMarshaling() {}
+ @Override
+ protected byte[] receivePacketFromPhone() throws InterruptedException {
+ return NetworkManager.getLatestData(SimulatorData.Type.Types.USB_SERVO);
+ }
+
+ public void fixupUnMarshaling() {}
public void setupDebugGuiVbox(VBox vbox) {}
@@ -40,12 +47,17 @@ public void updateDebugGuiVbox() {}
public void populateDetailsPane(Pane pane) {}
- public void handleIncomingPacket(byte[] data, int length, boolean wait) {
+ @Override
+ public SimData findSimDataName(String name) {
+ return null;
+ }
+
+ public void handleIncomingPacket(byte[] data, int length, boolean wait) {
}
- public List getDeviceTypeList() {
- List dtl = new ArrayList<>();
- dtl.add(DeviceType.USB_SERVO);
+ public List getDeviceTypeList() {
+ List dtl = new ArrayList<>();
+ dtl.add(SimulatorData.Type.Types.USB_SERVO);
return dtl;
}
}
\ No newline at end of file
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/devices/Device.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/devices/Device.java
index 4b971e3..5b20b35 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/devices/Device.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/modules/devices/Device.java
@@ -10,11 +10,12 @@
import javax.xml.bind.annotation.XmlAccessType;
import javafx.scene.layout.VBox;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
@XmlAccessorType(XmlAccessType.NONE)
public abstract class Device {
- protected DeviceType mType=null;
+ protected SimulatorData.Type.Types mType = null;
@XmlElementRef(name="SimData")
protected SimData[] mSimData;
@@ -22,15 +23,15 @@ public abstract class Device {
public Device() {
}
- public Device(DeviceType type) {
- mType=type;
+ public Device(SimulatorData.Type.Types type) {
+ mType = type;
}
abstract public void processBuffer(byte[] currentStateBuffer, int portNum);
abstract public void updateDebugGuiVbox();
abstract public void setupDebugGuiVbox(VBox vbox);
- public DeviceType getType() {
+ public SimulatorData.Type.Types getType() {
return mType;
}
@@ -52,9 +53,8 @@ public int getNumberOfPorts() {
public List getPortNames() {
List names = new ArrayList<>();
- int len = mSimData.length;
- for (int i=0;i() {
+ @Override
+ public void initChannel(SocketChannel ch) throws Exception {
+ ch.pipeline().addLast(new IdleStateHandler(1, 1, 2), new MessageEncoder(),
+ new Decoder(), new ClientHandler());
+ }
+ });
+
+ // Start the client.
+ ChannelFuture f = b.connect(NetworkManager.host, NetworkManager.port).sync(); // (5)
+ f.channel().closeFuture().sync();
+
+ // Wait until the connection is closed.
+ f.channel().closeFuture().sync();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ } finally {
+ workerGroup.shutdownGracefully();
+ }
+ System.out.print("Server closed");
+ }
+
+}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/decoder/Decoder.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/decoder/Decoder.java
new file mode 100644
index 0000000..b336f82
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/decoder/Decoder.java
@@ -0,0 +1,36 @@
+package org.ftccommunity.simulator.net.decoder;
+
+import com.google.protobuf.InvalidProtocolBufferException;
+import io.netty.buffer.ByteBuf;
+import io.netty.handler.codec.ByteToMessageDecoder;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import java.util.List;
+
+public class Decoder extends ByteToMessageDecoder { // (1)
+ @Override
+ protected void decode(io.netty.channel.ChannelHandlerContext ctx, ByteBuf in, List out) { // (2)
+ long size;
+ if (in.readableBytes() < 4) {
+ return;
+ } else {
+ size = in.readUnsignedInt();
+ // System.out.print(" Size of data: " + size + " Received: " + in.readableBytes());
+ }
+
+ if (in.readableBytes() < size) {
+ return;
+ }
+
+ SimulatorData.Data test;
+ try {
+ test = SimulatorData.Data.parseFrom(in.readBytes((int) size).array());
+ } catch (InvalidProtocolBufferException e) {
+ return;
+ }
+ if (test != null) {
+ out.add(test);
+ }
+ }
+}
+
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/encoder/MessageEncoder.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/encoder/MessageEncoder.java
new file mode 100644
index 0000000..40904e6
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/encoder/MessageEncoder.java
@@ -0,0 +1,68 @@
+package org.ftccommunity.simulator.net.encoder;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.handler.codec.MessageToByteEncoder;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class MessageEncoder extends MessageToByteEncoder {
+ private static final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
+ public MessageEncoder() {
+ super(false);
+ }
+
+/*
+ @Override
+ protected void encode(ChannelHandlerContext ctx, SimulatorData.Data msg, ByteBuf out) throws Exception {
+ int length = msg.getSerializedSize();
+ out.ensureWritable(4 + length);
+
+ out.writeInt(length);
+ out.writeBytes(msg.toByteArray());
+ }*/
+
+
+ @Override
+ protected void encode(ChannelHandlerContext channelHandlerContext,
+ SimulatorData.Data msg, ByteBuf out) throws Exception {
+ /*
+ // Setup for write
+ int length = msg.getSerializedSize();
+ out.writeInt(length);
+ out.ensureWritable(length);
+ final int offset = out.arrayOffset() + out.writerIndex();
+
+ // Write the data to the backing array
+ final byte[] array = out.array();
+ out.writerIndex(out.writerIndex() + encode(msg, array, offset, length));
+ */
+ /*/ final int length = msg.getSerializedSize();
+ out.ensureWritable(4 + length);
+ out.writeInt(length);
+ out.writeBytes(msg.toByteArray());
+
+ if (msg.getType().getType() != SimulatorData.Type.Types.HEARTBEAT) {
+ logger.log(Level.INFO, "Encoded data type " +
+ msg.getType().getType().getValueDescriptor().getName());
+ }*/
+
+ int length = msg.getSerializedSize();
+ out.writeInt(length);
+ out.ensureWritable(length);
+ final int offset = out.arrayOffset() + out.writerIndex();
+ final byte[] array = out.array();
+ out.writerIndex(out.writerIndex() + encode(msg, array, offset, length));
+ if (msg.getType().getType() != SimulatorData.Type.Types.HEARTBEAT) {
+ logger.log(Level.FINER, "SIM_NETWORKING::", "Encoded data type " +
+ msg.getType().getType().toString());
+ }
+ }
+
+ private int encode(final SimulatorData.Data msg, byte[] array, final int offset, final int length) {
+ System.arraycopy(msg.toByteArray(), 0, array, offset, length);
+ return length;
+ }
+}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/manager/NetworkManager.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/manager/NetworkManager.java
new file mode 100644
index 0000000..b8c8df6
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/manager/NetworkManager.java
@@ -0,0 +1,322 @@
+package org.ftccommunity.simulator.net.manager;
+
+import com.google.common.base.Charsets;
+import com.google.common.collect.LinkedListMultimap;
+import com.google.common.net.InetAddresses;
+import com.sun.istack.internal.NotNull;
+import org.ftccommunity.simulator.net.Client;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+import org.ftccommunity.simulator.net.tasks.HeartbeatTask;
+
+import java.net.InetSocketAddress;
+import java.util.LinkedList;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+public final class NetworkManager {
+ public static final String host = "192.168.42.129";
+ public static final int port = 7002;
+ private final static LinkedListMultimap main = LinkedListMultimap.create();
+ private final static LinkedList receivedQueue = new LinkedList<>();
+ private final static LinkedList sendingQueue = new LinkedList<>();
+ private static InetSocketAddress robotAddress;
+ private static boolean isReady;
+
+ /**
+ * Add a recieved packet to the processing queue for deferred processing
+ * @param data The data to add to processing queue
+ */
+ public static void add(@NotNull SimulatorData.Data data) {
+ synchronized (receivedQueue) {
+ receivedQueue.add(data);
+ }
+ }
+
+ /**
+ * Force the queue to sort the processing queue into their respective types
+ */
+ public synchronized static void processQueue() {
+ int size;
+ synchronized (receivedQueue) {
+ size = receivedQueue.size();
+ }
+ while (size < 1 && !Thread.currentThread().isInterrupted()) {
+ try {
+ Thread.sleep(25);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ return;
+ }
+ synchronized (receivedQueue) {
+ size = receivedQueue.size();
+ }
+ }
+
+ ConcurrentLinkedQueue temp = new ConcurrentLinkedQueue<>();
+ // Move the contents over to an new queue
+ synchronized (receivedQueue) {
+ temp.addAll(receivedQueue);
+ receivedQueue.clear();
+ }
+
+ // Flip the old moved data into a new container
+ LinkedList tempB = new LinkedList<>();
+ while (!temp.isEmpty()) {
+ tempB.add(temp.poll());
+ }
+ temp.clear();
+
+ // Then, add the flipped data so the oldest gets processed first
+ while (!tempB.isEmpty()) {
+ SimulatorData.Data data = tempB.poll();
+ main.put(data.getType().getType(), data);
+ }
+ tempB.clear();
+ }
+
+ /**
+ * Find what the latest data is and returns it based on the type need
+ * @param type the type of packet to get
+ * @return The latest message in the queue, based on the type
+ */
+ @NotNull
+ public static SimulatorData.Data getLatestMessage(@NotNull SimulatorData.Type.Types type) throws InterruptedException {
+ return getLatestMessage(type, false);
+ }
+
+ /**
+ * Find what the latest data is and returns it based on the type need
+ * @param type the type of packet to get
+ * @param cache delete the value
+ * @return The latest message in the queue, based on the type
+ */
+ @NotNull
+ public static SimulatorData.Data getLatestMessage(@NotNull SimulatorData.Type.Types type, boolean cache) throws InterruptedException {
+ int size;
+ synchronized (main) {
+ size = main.get(type).size();
+ }
+ while ((size <= 0) && !(Thread.currentThread().isInterrupted())) {
+ try {
+ Thread.sleep(10);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new InterruptedException();
+ }
+ // Fetch the size again
+ synchronized (main) {
+ size = main.get(type).size();
+ }
+ }
+
+ synchronized (main) {
+ System.out.println("Retrieving latest packet of " + type.getValueDescriptor().getName());
+ if (cache) {
+ SimulatorData.Data data = main.get(type).get(main.get(type).size() - 1);
+ clear(type);
+ main.put(type, data);
+ return data;
+ } else {
+ return main.get(type).remove(main.get(type).size() - 1);
+ }
+ }
+ }
+
+ /**
+ * This returns that data information based on the type specifed
+ * @param type the type of data to get
+ * @return a byte array of the latest data
+ */
+ @NotNull
+ public static byte[] getLatestData(@NotNull SimulatorData.Type.Types type) throws InterruptedException {
+ return getLatestData(type, false);
+ }
+
+ /**
+ * This returns that data information based on the type specifed
+ * @param type the type of data to get
+ * @param cache delete the old version
+ * @return a byte array of the latest data
+ */
+ @NotNull
+ public static byte[] getLatestData(@NotNull SimulatorData.Type.Types type, boolean cache) throws InterruptedException {
+ SimulatorData.Data data = getLatestMessage(type, cache);
+ return data.getInfo(0).getBytes(Charsets.US_ASCII);
+ }
+
+ /**
+ * Clears the queue for a specific type
+ * @param type the type of data to get
+ */
+ public static void clear(SimulatorData.Type.Types type) {
+ main.get(type).clear();
+ }
+
+ public static boolean isReadyToFetch(SimulatorData.Type.Types type) {
+ return main.get(type).size() > 0;
+ }
+
+ /**
+ * Request the packets to be sent, the sending does not have a guarantee to be sent
+ * @param type the type of data to send
+ * @param module which module correlates to the data being sent
+ * @param data a byte array of data to send
+ */
+ public static void requestSend(SimulatorData.Type.Types type, SimulatorData.Data.Modules module, byte[] data) {
+ String dataString = new String(data, Charsets.US_ASCII);
+ System.out.println(dataString);
+ requestSend(type, module, dataString);
+ }
+
+ /**
+ * Request the packets to be sent, the sending does not have a guarantee to be sent
+ * @param type the type of data to send
+ * @param module which module correlates to the data being sent
+ * @param data a string of data to send
+ */
+ public static void requestSend(SimulatorData.Type.Types type, SimulatorData.Data.Modules module, String data) {
+ SimulatorData.Data.Builder sendDataBuilder = SimulatorData.Data.newBuilder();
+ sendDataBuilder.setType(SimulatorData.Type.newBuilder().setType(type).build())
+ .setModule(module)
+ .addInfo(data);
+ synchronized (sendingQueue) {
+ sendingQueue.add(sendDataBuilder.build());
+ }
+ }
+
+ /**
+ * Gets the next data to send
+ * @return the next data to send
+ */
+ @NotNull
+ public static SimulatorData.Data getNextSend() {
+ int size;
+ synchronized (sendingQueue) {
+ size = sendingQueue.size();
+ }
+ if (size > 100) {
+ LinkedList temp = new LinkedList<>();
+ synchronized (sendingQueue) {
+ for (int i = size - 1; i > size / 2; i--) {
+ temp.add(sendingQueue.pollLast());
+ }
+ sendingQueue.clear();
+ sendingQueue.addAll(temp);
+ }
+ }
+
+ if (size > 0) {
+ System.out.println("Getting next send.");
+ return sendingQueue.removeFirst();
+ } else {
+ return HeartbeatTask.buildMessage();
+ }
+ }
+
+ /**
+ * Rertrieve the next datas to send
+ * @return an array of the entire sending queue
+ */
+ public static SimulatorData.Data[] getNextSends() {
+ return getNextSends(sendingQueue.size());
+ }
+
+ /**
+ * Rertieve an the next datas to send based on a specificed amount
+ * @param size the maximum, inclusive size of the data array
+ * @return a data array of the next datas to send up to a limit
+ */
+ public static SimulatorData.Data[] getNextSends(int size) {
+ return getNextSends(size, true);
+ }
+
+ /**
+ * Retrieve an array of the next datas to send up to a specific size
+ * @param size the maximum size of the returned array
+ * @param autoShrink if true this automatically adjusts the size returned
+ * @return a data array of the next datas to send
+ */
+ @NotNull
+ public static SimulatorData.Data[] getNextSends(final int size, final boolean autoShrink) {
+ int currentSize = size;
+ if (currentSize <= sendingQueue.size() / 2) {
+ cleanup();
+ }
+
+ if (size > sendingQueue.size() && !autoShrink) {
+ throw new IndexOutOfBoundsException("Size is bigger then sending queue");
+ }
+
+ if (autoShrink) {
+ if (size > sendingQueue.size()) {
+ currentSize = sendingQueue.size();
+ }
+ }
+
+ SimulatorData.Data[] datas;
+ if (currentSize == 0) {
+ datas = new SimulatorData.Data[1];
+ datas[0] = HeartbeatTask.buildMessage();
+ } else {
+ datas = new SimulatorData.Data[currentSize];
+ synchronized (sendingQueue) {
+ for (int i = 0; i < datas.length; i++) {
+ datas[i] = sendingQueue.removeLast();
+ }
+ }
+ }
+ return datas;
+ }
+
+ /**
+ * Cleanup the sending queue
+ */
+ private static void cleanup() {
+ synchronized (sendingQueue) {
+ if (sendingQueue.size() > 100) {
+ LinkedList temp = new LinkedList<>();
+ for (int i = sendingQueue.size() - 1; i > sendingQueue.size() / 2; i--) {
+ temp.add(sendingQueue.get(i));
+ }
+ sendingQueue.clear();
+ sendingQueue.addAll(temp);
+ }
+ }
+ }
+
+ public static InetSocketAddress getRobotAddress() {
+ return new InetSocketAddress(InetAddresses.forString(host), port);
+ }
+
+ /**
+ * Sets the current Robot IP address
+ * @param robotAddress an InetAddress of the Robot Controller
+ */
+ public static void setRobotAddress(@NotNull InetSocketAddress robotAddress) {
+ NetworkManager.robotAddress = robotAddress;
+ }
+
+ /**
+ * Returns if enough data has been received to start up
+ * @return whether or not the robot server can start up
+ */
+ @NotNull
+ public static boolean isReady() {
+ return isReady;
+ }
+
+ /**
+ * Change the readiness state of the Manager
+ * @param isReady what the current status is of the network
+ */
+ public static void changeReadiness(boolean isReady) {
+ NetworkManager.isReady = isReady;
+ }
+
+ public static Thread start() {
+ Thread clientListener = new Thread(new Client(), "Client");
+ clientListener.start();
+ return clientListener;
+ }
+
+}
+
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/protobuf/Data.proto b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/protobuf/Data.proto
new file mode 100644
index 0000000..16e42c2
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/protobuf/Data.proto
@@ -0,0 +1,77 @@
+package org.ftccommunity.simulator.net.protocol;
+
+option java_package = "org.ftccommunity.simulator.net.protocol";
+option java_outer_classname = "SimulatorData";
+
+
+message Data {
+ required Type type = 1;
+ required Modules module = 2;
+ repeated string info = 3;
+ optional int32 port = 4 [default = 1];
+ optional string dataName = 5 [default = ""];
+
+ enum Modules {
+ LEGACY_CONTROLLER = 1;
+ LEGACY_MOTOR = 2;
+ LEGACY_SENSOR = 3;
+ }
+}
+
+message DeviceListOld {
+ required Type type = 1;
+ required string serialized = 2;
+}
+
+message DeviceList {
+ required Type type = 1;
+ repeated BrickInfo bricks = 2;
+}
+
+message BrickInfo {
+ required Type type = 1;
+ optional string alias = 2;
+ optional string serial = 3;
+}
+
+message Type {
+ required Types type = 1;
+
+ enum Types {
+ // Pritory values take the range 1-16
+ NONE = 1;
+
+ LEGACY_MOTOR = 2;
+ LEGACY_SERVO = 3;
+
+ LEGACY_LIGHT = 4;
+ LEGACY_TOUCH = 5;
+ LEGACY_IR = 6;
+
+ USB_MOTOR= 7;
+ USB_SERVO = 8;
+
+ SENSOR_IR = 9;
+ SENSOR_OPT_DIST = 10;
+ SENSOR_TOUCH = 11;
+
+ DEVICE_LIST = 12;
+ BRICK_INFO = 13;
+
+ HEARTBEAT = 14;
+
+ LEGACY_TILT_ACCL = 15;
+ LEGACY_COLOR = 16;
+ LEGACY_EOPD = 17;
+ LEGACY_FORCE = 18;
+ LEGACY_GYRO = 19;
+
+ SIM_DATA = 20;
+
+ OPT_DATA1 = 21;
+ OPT_DATA2 = 22;
+ OPT_DATA3 = 23;
+ OPT_DATA4 = 24;
+ }
+}
+
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/protocol/SimulatorData.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/protocol/SimulatorData.java
new file mode 100644
index 0000000..b69a489
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/protocol/SimulatorData.java
@@ -0,0 +1,4368 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Data.proto
+
+package org.ftccommunity.simulator.net.protocol;
+
+@SuppressWarnings("ALL")
+public final class SimulatorData {
+ private SimulatorData() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+ public interface DataOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.Data)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ boolean hasModule();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules getModule();
+
+ /**
+ * repeated string info = 3;
+ */
+ com.google.protobuf.ProtocolStringList
+ getInfoList();
+ /**
+ * repeated string info = 3;
+ */
+ int getInfoCount();
+ /**
+ * repeated string info = 3;
+ */
+ java.lang.String getInfo(int index);
+ /**
+ * repeated string info = 3;
+ */
+ com.google.protobuf.ByteString
+ getInfoBytes(int index);
+
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ boolean hasPort();
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ int getPort();
+
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ boolean hasDataName();
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ java.lang.String getDataName();
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ com.google.protobuf.ByteString
+ getDataNameBytes();
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Data}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Data extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.Data)
+ DataOrBuilder {
+ // Use Data.newBuilder() to construct.
+ private Data(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private Data() {
+ module_ = 1;
+ info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ port_ = 1;
+ dataName_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Data(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(org.ftccommunity.simulator.net.protocol.SimulatorData.Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 16: {
+ int rawValue = input.readEnum();
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules value = org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules.valueOf(rawValue);
+ if (value == null) {
+ unknownFields.mergeVarintField(2, rawValue);
+ } else {
+ bitField0_ |= 0x00000002;
+ module_ = rawValue;
+ }
+ break;
+ }
+ case 26: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ info_.add(bs);
+ break;
+ }
+ case 32: {
+ bitField0_ |= 0x00000004;
+ port_ = input.readInt32();
+ break;
+ }
+ case 42: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000008;
+ dataName_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = info_.getUnmodifiableView();
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data.class, org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code org.ftccommunity.simulator.net.protocol.Data.Modules}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public enum Modules
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * LEGACY_CONTROLLER = 1;
+ */
+ LEGACY_CONTROLLER(0, 1),
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ LEGACY_MOTOR(1, 2),
+ /**
+ * LEGACY_SENSOR = 3;
+ */
+ LEGACY_SENSOR(2, 3),
+ ;
+
+ /**
+ * LEGACY_CONTROLLER = 1;
+ */
+ public static final int LEGACY_CONTROLLER_VALUE = 1;
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ public static final int LEGACY_MOTOR_VALUE = 2;
+ /**
+ * LEGACY_SENSOR = 3;
+ */
+ public static final int LEGACY_SENSOR_VALUE = 3;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ public static Modules valueOf(int value) {
+ switch (value) {
+ case 1: return LEGACY_CONTROLLER;
+ case 2: return LEGACY_MOTOR;
+ case 3: return LEGACY_SENSOR;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public Modules findValueByNumber(int number) {
+ return Modules.valueOf(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.Data.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final Modules[] VALUES = values();
+
+ public static Modules valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int index;
+ private final int value;
+
+ private Modules(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:org.ftccommunity.simulator.net.protocol.Data.Modules)
+ }
+
+ private int bitField0_;
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+
+ public static final int MODULE_FIELD_NUMBER = 2;
+ private int module_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public boolean hasModule() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules getModule() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules result = org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules.valueOf(module_);
+ return result == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules.LEGACY_CONTROLLER : result;
+ }
+
+ public static final int INFO_FIELD_NUMBER = 3;
+ private com.google.protobuf.LazyStringList info_;
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getInfoList() {
+ return info_;
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public int getInfoCount() {
+ return info_.size();
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public java.lang.String getInfo(int index) {
+ return info_.get(index);
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ByteString
+ getInfoBytes(int index) {
+ return info_.getByteString(index);
+ }
+
+ public static final int PORT_FIELD_NUMBER = 4;
+ private int port_;
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public boolean hasPort() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public int getPort() {
+ return port_;
+ }
+
+ public static final int DATANAME_FIELD_NUMBER = 5;
+ private volatile java.lang.Object dataName_;
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public boolean hasDataName() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public java.lang.String getDataName() {
+ java.lang.Object ref = dataName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ dataName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public com.google.protobuf.ByteString
+ getDataNameBytes() {
+ java.lang.Object ref = dataName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ dataName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasModule()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeEnum(2, module_);
+ }
+ for (int i = 0; i < info_.size(); i++) {
+ output.writeBytes(3, info_.getByteString(i));
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeInt32(4, port_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(5, getDataNameBytes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, module_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < info_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(info_.getByteString(i));
+ }
+ size += dataSize;
+ size += 1 * getInfoList().size();
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(4, port_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5, getDataNameBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.ftccommunity.simulator.net.protocol.SimulatorData.Data prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Data}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.Data)
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DataOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data.class, org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Builder.class);
+ }
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.Data.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ module_ = 1;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ port_ = 1;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ dataName_ = "";
+ bitField0_ = (bitField0_ & ~0x00000010);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Data getDefaultInstanceForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.Data.getDefaultInstance();
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Data build() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Data buildPartial() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data result = new org.ftccommunity.simulator.net.protocol.SimulatorData.Data(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.module_ = module_;
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = info_.getUnmodifiableView();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.info_ = info_;
+ if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.port_ = port_;
+ if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+ to_bitField0_ |= 0x00000008;
+ }
+ result.dataName_ = dataName_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.ftccommunity.simulator.net.protocol.SimulatorData.Data) {
+ return mergeFrom((org.ftccommunity.simulator.net.protocol.SimulatorData.Data)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.ftccommunity.simulator.net.protocol.SimulatorData.Data other) {
+ if (other == org.ftccommunity.simulator.net.protocol.SimulatorData.Data.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasModule()) {
+ setModule(other.getModule());
+ }
+ if (!other.info_.isEmpty()) {
+ if (info_.isEmpty()) {
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureInfoIsMutable();
+ info_.addAll(other.info_);
+ }
+ onChanged();
+ }
+ if (other.hasPort()) {
+ setPort(other.getPort());
+ }
+ if (other.hasDataName()) {
+ bitField0_ |= 0x00000010;
+ dataName_ = other.dataName_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!hasModule()) {
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.ftccommunity.simulator.net.protocol.SimulatorData.Data) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder> typeBuilder_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance()) {
+ type_ =
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private int module_ = 1;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public boolean hasModule() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules getModule() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules result = org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules.valueOf(module_);
+ return result == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules.LEGACY_CONTROLLER : result;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public Builder setModule(org.ftccommunity.simulator.net.protocol.SimulatorData.Data.Modules value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ module_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Data.Modules module = 2;
+ */
+ public Builder clearModule() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ module_ = 1;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private void ensureInfoIsMutable() {
+ if (!((bitField0_ & 0x00000004) == 0x00000004)) {
+ info_ = new com.google.protobuf.LazyStringArrayList(info_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getInfoList() {
+ return info_.getUnmodifiableView();
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public int getInfoCount() {
+ return info_.size();
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public java.lang.String getInfo(int index) {
+ return info_.get(index);
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public com.google.protobuf.ByteString
+ getInfoBytes(int index) {
+ return info_.getByteString(index);
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public Builder setInfo(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public Builder addInfo(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public Builder addAllInfo(
+ java.lang.Iterable values) {
+ ensureInfoIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, info_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public Builder clearInfo() {
+ info_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string info = 3;
+ */
+ public Builder addInfoBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private int port_ = 1;
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public boolean hasPort() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public int getPort() {
+ return port_;
+ }
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public Builder setPort(int value) {
+ bitField0_ |= 0x00000008;
+ port_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int32 port = 4 [default = 1];
+ */
+ public Builder clearPort() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ port_ = 1;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object dataName_ = "";
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public boolean hasDataName() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public java.lang.String getDataName() {
+ java.lang.Object ref = dataName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ dataName_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public com.google.protobuf.ByteString
+ getDataNameBytes() {
+ java.lang.Object ref = dataName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ dataName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public Builder setDataName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ dataName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public Builder clearDataName() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ dataName_ = getDefaultInstance().getDataName();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string dataName = 5 [default = ""];
+ */
+ public Builder setDataNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ dataName_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.Data)
+ }
+
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.Data)
+ private static final org.ftccommunity.simulator.net.protocol.SimulatorData.Data DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.ftccommunity.simulator.net.protocol.SimulatorData.Data();
+ }
+
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Data getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public Data parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Data(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Data getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface DeviceListOldOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * required string serialized = 2;
+ */
+ boolean hasSerialized();
+ /**
+ * required string serialized = 2;
+ */
+ java.lang.String getSerialized();
+ /**
+ * required string serialized = 2;
+ */
+ com.google.protobuf.ByteString
+ getSerializedBytes();
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceListOld}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class DeviceListOld extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ DeviceListOldOrBuilder {
+ // Use DeviceListOld.newBuilder() to construct.
+ private DeviceListOld(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private DeviceListOld() {
+ serialized_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private DeviceListOld(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(org.ftccommunity.simulator.net.protocol.SimulatorData.Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ serialized_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.class, org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+
+ public static final int SERIALIZED_FIELD_NUMBER = 2;
+ private volatile java.lang.Object serialized_;
+ /**
+ * required string serialized = 2;
+ */
+ public boolean hasSerialized() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public java.lang.String getSerialized() {
+ java.lang.Object ref = serialized_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serialized_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public com.google.protobuf.ByteString
+ getSerializedBytes() {
+ java.lang.Object ref = serialized_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serialized_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasSerialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getSerializedBytes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getSerializedBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceListOld}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOldOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.class, org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.Builder.class);
+ }
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ serialized_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld getDefaultInstanceForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.getDefaultInstance();
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld build() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld buildPartial() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld result = new org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.serialized_ = serialized_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld) {
+ return mergeFrom((org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld other) {
+ if (other == org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasSerialized()) {
+ bitField0_ |= 0x00000002;
+ serialized_ = other.serialized_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!hasSerialized()) {
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder> typeBuilder_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance()) {
+ type_ =
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private java.lang.Object serialized_ = "";
+ /**
+ * required string serialized = 2;
+ */
+ public boolean hasSerialized() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public java.lang.String getSerialized() {
+ java.lang.Object ref = serialized_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serialized_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public com.google.protobuf.ByteString
+ getSerializedBytes() {
+ java.lang.Object ref = serialized_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serialized_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public Builder setSerialized(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ serialized_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public Builder clearSerialized() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ serialized_ = getDefaultInstance().getSerialized();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string serialized = 2;
+ */
+ public Builder setSerializedBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ serialized_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ }
+
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.DeviceListOld)
+ private static final org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld();
+ }
+
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public DeviceListOld parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new DeviceListOld(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOld getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface DeviceListOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.DeviceList)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ java.util.List
+ getBricksList();
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo getBricks(int index);
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ int getBricksCount();
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ java.util.List extends org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder>
+ getBricksOrBuilderList();
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder getBricksOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceList}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class DeviceList extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.DeviceList)
+ DeviceListOrBuilder {
+ // Use DeviceList.newBuilder() to construct.
+ private DeviceList(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private DeviceList() {
+ bricks_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private DeviceList(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(org.ftccommunity.simulator.net.protocol.SimulatorData.Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ bricks_.add(input.readMessage(org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.PARSER, extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = java.util.Collections.unmodifiableList(bricks_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.class, org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+
+ public static final int BRICKS_FIELD_NUMBER = 2;
+ private java.util.List bricks_;
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List getBricksList() {
+ return bricks_;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List extends org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder>
+ getBricksOrBuilderList() {
+ return bricks_;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public int getBricksCount() {
+ return bricks_.size();
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo getBricks(int index) {
+ return bricks_.get(index);
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder getBricksOrBuilder(
+ int index) {
+ return bricks_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ for (int i = 0; i < getBricksCount(); i++) {
+ if (!getBricks(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ for (int i = 0; i < bricks_.size(); i++) {
+ output.writeMessage(2, bricks_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ for (int i = 0; i < bricks_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, bricks_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.DeviceList}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.DeviceList)
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceListOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.class, org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.Builder.class);
+ }
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ getBricksFieldBuilder();
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (bricksBuilder_ == null) {
+ bricks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ bricksBuilder_.clear();
+ }
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList getDefaultInstanceForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.getDefaultInstance();
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList build() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList buildPartial() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList result = new org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (bricksBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = java.util.Collections.unmodifiableList(bricks_);
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.bricks_ = bricks_;
+ } else {
+ result.bricks_ = bricksBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList) {
+ return mergeFrom((org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList other) {
+ if (other == org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (bricksBuilder_ == null) {
+ if (!other.bricks_.isEmpty()) {
+ if (bricks_.isEmpty()) {
+ bricks_ = other.bricks_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureBricksIsMutable();
+ bricks_.addAll(other.bricks_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.bricks_.isEmpty()) {
+ if (bricksBuilder_.isEmpty()) {
+ bricksBuilder_.dispose();
+ bricksBuilder_ = null;
+ bricks_ = other.bricks_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ bricksBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getBricksFieldBuilder() : null;
+ } else {
+ bricksBuilder_.addAllMessages(other.bricks_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ return false;
+ }
+ for (int i = 0; i < getBricksCount(); i++) {
+ if (!getBricks(i).isInitialized()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder> typeBuilder_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance()) {
+ type_ =
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private java.util.List bricks_ =
+ java.util.Collections.emptyList();
+ private void ensureBricksIsMutable() {
+ if (!((bitField0_ & 0x00000002) == 0x00000002)) {
+ bricks_ = new java.util.ArrayList(bricks_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder> bricksBuilder_;
+
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List getBricksList() {
+ if (bricksBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(bricks_);
+ } else {
+ return bricksBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public int getBricksCount() {
+ if (bricksBuilder_ == null) {
+ return bricks_.size();
+ } else {
+ return bricksBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo getBricks(int index) {
+ if (bricksBuilder_ == null) {
+ return bricks_.get(index);
+ } else {
+ return bricksBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder setBricks(
+ int index, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo value) {
+ if (bricksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBricksIsMutable();
+ bricks_.set(index, value);
+ onChanged();
+ } else {
+ bricksBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder setBricks(
+ int index, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder builderForValue) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ bricksBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo value) {
+ if (bricksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBricksIsMutable();
+ bricks_.add(value);
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(
+ int index, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo value) {
+ if (bricksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBricksIsMutable();
+ bricks_.add(index, value);
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder builderForValue) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.add(builderForValue.build());
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addBricks(
+ int index, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder builderForValue) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ bricksBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder addAllBricks(
+ java.lang.Iterable extends org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo> values) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, bricks_);
+ onChanged();
+ } else {
+ bricksBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder clearBricks() {
+ if (bricksBuilder_ == null) {
+ bricks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ bricksBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public Builder removeBricks(int index) {
+ if (bricksBuilder_ == null) {
+ ensureBricksIsMutable();
+ bricks_.remove(index);
+ onChanged();
+ } else {
+ bricksBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder getBricksBuilder(
+ int index) {
+ return getBricksFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder getBricksOrBuilder(
+ int index) {
+ if (bricksBuilder_ == null) {
+ return bricks_.get(index); } else {
+ return bricksBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List extends org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder>
+ getBricksOrBuilderList() {
+ if (bricksBuilder_ != null) {
+ return bricksBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(bricks_);
+ }
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder addBricksBuilder() {
+ return getBricksFieldBuilder().addBuilder(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.getDefaultInstance());
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder addBricksBuilder(
+ int index) {
+ return getBricksFieldBuilder().addBuilder(
+ index, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.getDefaultInstance());
+ }
+ /**
+ * repeated .org.ftccommunity.simulator.net.protocol.BrickInfo bricks = 2;
+ */
+ public java.util.List
+ getBricksBuilderList() {
+ return getBricksFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder>
+ getBricksFieldBuilder() {
+ if (bricksBuilder_ == null) {
+ bricksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder>(
+ bricks_,
+ ((bitField0_ & 0x00000002) == 0x00000002),
+ getParentForChildren(),
+ isClean());
+ bricks_ = null;
+ }
+ return bricksBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.DeviceList)
+ }
+
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.DeviceList)
+ private static final org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList();
+ }
+
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public DeviceList parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new DeviceList(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.DeviceList getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface BrickInfoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * optional string alias = 2;
+ */
+ boolean hasAlias();
+ /**
+ * optional string alias = 2;
+ */
+ java.lang.String getAlias();
+ /**
+ * optional string alias = 2;
+ */
+ com.google.protobuf.ByteString
+ getAliasBytes();
+
+ /**
+ * optional string serial = 3;
+ */
+ boolean hasSerial();
+ /**
+ * optional string serial = 3;
+ */
+ java.lang.String getSerial();
+ /**
+ * optional string serial = 3;
+ */
+ com.google.protobuf.ByteString
+ getSerialBytes();
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.BrickInfo}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class BrickInfo extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ BrickInfoOrBuilder {
+ // Use BrickInfo.newBuilder() to construct.
+ private BrickInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private BrickInfo() {
+ alias_ = "";
+ serial_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BrickInfo(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(org.ftccommunity.simulator.net.protocol.SimulatorData.Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ alias_ = bs;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000004;
+ serial_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.class, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+
+ public static final int ALIAS_FIELD_NUMBER = 2;
+ private volatile java.lang.Object alias_;
+ /**
+ * optional string alias = 2;
+ */
+ public boolean hasAlias() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public java.lang.String getAlias() {
+ java.lang.Object ref = alias_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ alias_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public com.google.protobuf.ByteString
+ getAliasBytes() {
+ java.lang.Object ref = alias_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ alias_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIAL_FIELD_NUMBER = 3;
+ private volatile java.lang.Object serial_;
+ /**
+ * optional string serial = 3;
+ */
+ public boolean hasSerial() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public java.lang.String getSerial() {
+ java.lang.Object ref = serial_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serial_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSerialBytes() {
+ java.lang.Object ref = serial_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serial_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getAliasBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, getSerialBytes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getType());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getAliasBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, getSerialBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.BrickInfo}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.class, org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.Builder.class);
+ }
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ if (typeBuilder_ == null) {
+ type_ = null;
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ alias_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ serial_ = "";
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo getDefaultInstanceForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.getDefaultInstance();
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo build() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo buildPartial() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo result = new org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.alias_ = alias_;
+ if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.serial_ = serial_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo) {
+ return mergeFrom((org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo other) {
+ if (other == org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasAlias()) {
+ bitField0_ |= 0x00000002;
+ alias_ = other.alias_;
+ onChanged();
+ }
+ if (other.hasSerial()) {
+ bitField0_ |= 0x00000004;
+ serial_ = other.serial_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!getType().isInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private org.ftccommunity.simulator.net.protocol.SimulatorData.Type type_ = null;
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder> typeBuilder_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder setType(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder mergeType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ type_ != null &&
+ type_ != org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance()) {
+ type_ =
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = null;
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ?
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance() : type_;
+ }
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type type = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder, org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private java.lang.Object alias_ = "";
+ /**
+ * optional string alias = 2;
+ */
+ public boolean hasAlias() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public java.lang.String getAlias() {
+ java.lang.Object ref = alias_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ alias_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public com.google.protobuf.ByteString
+ getAliasBytes() {
+ java.lang.Object ref = alias_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ alias_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public Builder setAlias(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ alias_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public Builder clearAlias() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ alias_ = getDefaultInstance().getAlias();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string alias = 2;
+ */
+ public Builder setAliasBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ alias_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object serial_ = "";
+ /**
+ * optional string serial = 3;
+ */
+ public boolean hasSerial() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public java.lang.String getSerial() {
+ java.lang.Object ref = serial_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serial_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSerialBytes() {
+ java.lang.Object ref = serial_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serial_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public Builder setSerial(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ serial_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public Builder clearSerial() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ serial_ = getDefaultInstance().getSerial();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string serial = 3;
+ */
+ public Builder setSerialBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ serial_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ }
+
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.BrickInfo)
+ private static final org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo();
+ }
+
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public BrickInfo parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new BrickInfo(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.BrickInfo getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface TypeOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.ftccommunity.simulator.net.protocol.Type)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ boolean hasType();
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types getType();
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Type}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Type extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.ftccommunity.simulator.net.protocol.Type)
+ TypeOrBuilder {
+ // Use Type.newBuilder() to construct.
+ private Type(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private Type() {
+ type_ = 1;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Type(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types value = org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types.valueOf(rawValue);
+ if (value == null) {
+ unknownFields.mergeVarintField(1, rawValue);
+ } else {
+ bitField0_ |= 0x00000001;
+ type_ = rawValue;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.class, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code org.ftccommunity.simulator.net.protocol.Type.Types}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public enum Types
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * NONE = 1;
+ *
+ *
+ * Pritory values take the range 1-16
+ *
+ */
+ NONE(0, 1),
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ LEGACY_MOTOR(1, 2),
+ /**
+ * LEGACY_SERVO = 3;
+ */
+ LEGACY_SERVO(2, 3),
+ /**
+ * LEGACY_LIGHT = 4;
+ */
+ LEGACY_LIGHT(3, 4),
+ /**
+ * LEGACY_TOUCH = 5;
+ */
+ LEGACY_TOUCH(4, 5),
+ /**
+ * LEGACY_IR = 6;
+ */
+ LEGACY_IR(5, 6),
+ /**
+ * USB_MOTOR = 7;
+ */
+ USB_MOTOR(6, 7),
+ /**
+ * USB_SERVO = 8;
+ */
+ USB_SERVO(7, 8),
+ /**
+ * SENSOR_IR = 9;
+ */
+ SENSOR_IR(8, 9),
+ /**
+ * SENSOR_OPT_DIST = 10;
+ */
+ SENSOR_OPT_DIST(9, 10),
+ /**
+ * SENSOR_TOUCH = 11;
+ */
+ SENSOR_TOUCH(10, 11),
+ /**
+ * DEVICE_LIST = 12;
+ */
+ DEVICE_LIST(11, 12),
+ /**
+ * BRICK_INFO = 13;
+ */
+ BRICK_INFO(12, 13),
+ /**
+ * HEARTBEAT = 14;
+ */
+ HEARTBEAT(13, 14),
+ /**
+ * LEGACY_TILT_ACCL = 15;
+ */
+ LEGACY_TILT_ACCL(14, 15),
+ /**
+ * LEGACY_COLOR = 16;
+ */
+ LEGACY_COLOR(15, 16),
+ /**
+ * LEGACY_EOPD = 17;
+ */
+ LEGACY_EOPD(16, 17),
+ /**
+ * LEGACY_FORCE = 18;
+ */
+ LEGACY_FORCE(17, 18),
+ /**
+ * LEGACY_GYRO = 19;
+ */
+ LEGACY_GYRO(18, 19),
+ /**
+ * SIM_DATA = 20;
+ */
+ SIM_DATA(19, 20),
+ /**
+ * OPT_DATA1 = 21;
+ */
+ OPT_DATA1(20, 21),
+ /**
+ * OPT_DATA2 = 22;
+ */
+ OPT_DATA2(21, 22),
+ /**
+ * OPT_DATA3 = 23;
+ */
+ OPT_DATA3(22, 23),
+ /**
+ * OPT_DATA4 = 24;
+ */
+ OPT_DATA4(23, 24),
+ ;
+
+ /**
+ * NONE = 1;
+ *
+ *
+ * Pritory values take the range 1-16
+ *
+ */
+ public static final int NONE_VALUE = 1;
+ /**
+ * LEGACY_MOTOR = 2;
+ */
+ public static final int LEGACY_MOTOR_VALUE = 2;
+ /**
+ * LEGACY_SERVO = 3;
+ */
+ public static final int LEGACY_SERVO_VALUE = 3;
+ /**
+ * LEGACY_LIGHT = 4;
+ */
+ public static final int LEGACY_LIGHT_VALUE = 4;
+ /**
+ * LEGACY_TOUCH = 5;
+ */
+ public static final int LEGACY_TOUCH_VALUE = 5;
+ /**
+ * LEGACY_IR = 6;
+ */
+ public static final int LEGACY_IR_VALUE = 6;
+ /**
+ * USB_MOTOR = 7;
+ */
+ public static final int USB_MOTOR_VALUE = 7;
+ /**
+ * USB_SERVO = 8;
+ */
+ public static final int USB_SERVO_VALUE = 8;
+ /**
+ * SENSOR_IR = 9;
+ */
+ public static final int SENSOR_IR_VALUE = 9;
+ /**
+ * SENSOR_OPT_DIST = 10;
+ */
+ public static final int SENSOR_OPT_DIST_VALUE = 10;
+ /**
+ * SENSOR_TOUCH = 11;
+ */
+ public static final int SENSOR_TOUCH_VALUE = 11;
+ /**
+ * DEVICE_LIST = 12;
+ */
+ public static final int DEVICE_LIST_VALUE = 12;
+ /**
+ * BRICK_INFO = 13;
+ */
+ public static final int BRICK_INFO_VALUE = 13;
+ /**
+ * HEARTBEAT = 14;
+ */
+ public static final int HEARTBEAT_VALUE = 14;
+ /**
+ * LEGACY_TILT_ACCL = 15;
+ */
+ public static final int LEGACY_TILT_ACCL_VALUE = 15;
+ /**
+ * LEGACY_COLOR = 16;
+ */
+ public static final int LEGACY_COLOR_VALUE = 16;
+ /**
+ * LEGACY_EOPD = 17;
+ */
+ public static final int LEGACY_EOPD_VALUE = 17;
+ /**
+ * LEGACY_FORCE = 18;
+ */
+ public static final int LEGACY_FORCE_VALUE = 18;
+ /**
+ * LEGACY_GYRO = 19;
+ */
+ public static final int LEGACY_GYRO_VALUE = 19;
+ /**
+ * SIM_DATA = 20;
+ */
+ public static final int SIM_DATA_VALUE = 20;
+ /**
+ * OPT_DATA1 = 21;
+ */
+ public static final int OPT_DATA1_VALUE = 21;
+ /**
+ * OPT_DATA2 = 22;
+ */
+ public static final int OPT_DATA2_VALUE = 22;
+ /**
+ * OPT_DATA3 = 23;
+ */
+ public static final int OPT_DATA3_VALUE = 23;
+ /**
+ * OPT_DATA4 = 24;
+ */
+ public static final int OPT_DATA4_VALUE = 24;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ public static Types valueOf(int value) {
+ switch (value) {
+ case 1: return NONE;
+ case 2: return LEGACY_MOTOR;
+ case 3: return LEGACY_SERVO;
+ case 4: return LEGACY_LIGHT;
+ case 5: return LEGACY_TOUCH;
+ case 6: return LEGACY_IR;
+ case 7: return USB_MOTOR;
+ case 8: return USB_SERVO;
+ case 9: return SENSOR_IR;
+ case 10: return SENSOR_OPT_DIST;
+ case 11: return SENSOR_TOUCH;
+ case 12: return DEVICE_LIST;
+ case 13: return BRICK_INFO;
+ case 14: return HEARTBEAT;
+ case 15: return LEGACY_TILT_ACCL;
+ case 16: return LEGACY_COLOR;
+ case 17: return LEGACY_EOPD;
+ case 18: return LEGACY_FORCE;
+ case 19: return LEGACY_GYRO;
+ case 20: return SIM_DATA;
+ case 21: return OPT_DATA1;
+ case 22: return OPT_DATA2;
+ case 23: return OPT_DATA3;
+ case 24: return OPT_DATA4;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public Types findValueByNumber(int number) {
+ return Types.valueOf(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final Types[] VALUES = values();
+
+ public static Types valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int index;
+ private final int value;
+
+ private Types(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:org.ftccommunity.simulator.net.protocol.Type.Types)
+ }
+
+ private int bitField0_;
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private int type_;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types getType() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types result = org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types.valueOf(type_);
+ return result == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types.NONE : result;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeEnum(1, type_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, type_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.ftccommunity.simulator.net.protocol.SimulatorData.Type prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.ftccommunity.simulator.net.protocol.Type}
+ */
+ @SuppressWarnings("FinalStaticMethod")
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.ftccommunity.simulator.net.protocol.Type)
+ org.ftccommunity.simulator.net.protocol.SimulatorData.TypeOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.class, org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Builder.class);
+ }
+
+ // Construct using org.ftccommunity.simulator.net.protocol.SimulatorData.Type.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ type_ = 1;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getDefaultInstanceForType() {
+ return org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance();
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type build() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type buildPartial() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type result = new org.ftccommunity.simulator.net.protocol.SimulatorData.Type(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.type_ = type_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.ftccommunity.simulator.net.protocol.SimulatorData.Type) {
+ return mergeFrom((org.ftccommunity.simulator.net.protocol.SimulatorData.Type)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.ftccommunity.simulator.net.protocol.SimulatorData.Type other) {
+ if (other == org.ftccommunity.simulator.net.protocol.SimulatorData.Type.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ setType(other.getType());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.ftccommunity.simulator.net.protocol.SimulatorData.Type) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private int type_ = 1;
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types getType() {
+ org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types result = org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types.valueOf(type_);
+ return result == null ? org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types.NONE : result;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public Builder setType(org.ftccommunity.simulator.net.protocol.SimulatorData.Type.Types value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * required .org.ftccommunity.simulator.net.protocol.Type.Types type = 1;
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = 1;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.ftccommunity.simulator.net.protocol.Type)
+ }
+
+ // @@protoc_insertion_point(class_scope:org.ftccommunity.simulator.net.protocol.Type)
+ private static final org.ftccommunity.simulator.net.protocol.SimulatorData.Type DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.ftccommunity.simulator.net.protocol.SimulatorData.Type();
+ }
+
+ public static org.ftccommunity.simulator.net.protocol.SimulatorData.Type getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ public Type parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Type(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public org.ftccommunity.simulator.net.protocol.SimulatorData.Type getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\nData.proto\022\'org.ftccommunity.simulator" +
+ ".net.protocol\"\204\002\n\004Data\022;\n\004type\030\001 \002(\0132-.o" +
+ "rg.ftccommunity.simulator.net.protocol.T" +
+ "ype\022E\n\006module\030\002 \002(\01625.org.ftccommunity.s" +
+ "imulator.net.protocol.Data.Modules\022\014\n\004in" +
+ "fo\030\003 \003(\t\022\017\n\004port\030\004 \001(\005:\0011\022\022\n\010dataName\030\005 " +
+ "\001(\t:\000\"E\n\007Modules\022\025\n\021LEGACY_CONTROLLER\020\001\022" +
+ "\020\n\014LEGACY_MOTOR\020\002\022\021\n\rLEGACY_SENSOR\020\003\"`\n\r" +
+ "DeviceListOld\022;\n\004type\030\001 \002(\0132-.org.ftccom" +
+ "munity.simulator.net.protocol.Type\022\022\n\nse",
+ "rialized\030\002 \002(\t\"\215\001\n\nDeviceList\022;\n\004type\030\001 " +
+ "\002(\0132-.org.ftccommunity.simulator.net.pro" +
+ "tocol.Type\022B\n\006bricks\030\002 \003(\01322.org.ftccomm" +
+ "unity.simulator.net.protocol.BrickInfo\"g" +
+ "\n\tBrickInfo\022;\n\004type\030\001 \002(\0132-.org.ftccommu" +
+ "nity.simulator.net.protocol.Type\022\r\n\005alia" +
+ "s\030\002 \001(\t\022\016\n\006serial\030\003 \001(\t\"\336\003\n\004Type\022A\n\004type" +
+ "\030\001 \002(\01623.org.ftccommunity.simulator.net." +
+ "protocol.Type.Types\"\222\003\n\005Types\022\010\n\004NONE\020\001\022" +
+ "\020\n\014LEGACY_MOTOR\020\002\022\020\n\014LEGACY_SERVO\020\003\022\020\n\014L",
+ "EGACY_LIGHT\020\004\022\020\n\014LEGACY_TOUCH\020\005\022\r\n\tLEGAC" +
+ "Y_IR\020\006\022\r\n\tUSB_MOTOR\020\007\022\r\n\tUSB_SERVO\020\010\022\r\n\t" +
+ "SENSOR_IR\020\t\022\023\n\017SENSOR_OPT_DIST\020\n\022\020\n\014SENS" +
+ "OR_TOUCH\020\013\022\017\n\013DEVICE_LIST\020\014\022\016\n\nBRICK_INF" +
+ "O\020\r\022\r\n\tHEARTBEAT\020\016\022\024\n\020LEGACY_TILT_ACCL\020\017" +
+ "\022\020\n\014LEGACY_COLOR\020\020\022\017\n\013LEGACY_EOPD\020\021\022\020\n\014L" +
+ "EGACY_FORCE\020\022\022\017\n\013LEGACY_GYRO\020\023\022\014\n\010SIM_DA" +
+ "TA\020\024\022\r\n\tOPT_DATA1\020\025\022\r\n\tOPT_DATA2\020\026\022\r\n\tOP" +
+ "T_DATA3\020\027\022\r\n\tOPT_DATA4\020\030B8\n\'org.ftccommu" +
+ "nity.simulator.net.protocolB\rSimulatorDa",
+ "ta"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_Data_descriptor,
+ new java.lang.String[] { "Type", "Module", "Info", "Port", "DataName", });
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceListOld_descriptor,
+ new java.lang.String[] { "Type", "Serialized", });
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_DeviceList_descriptor,
+ new java.lang.String[] { "Type", "Bricks", });
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_BrickInfo_descriptor,
+ new java.lang.String[] { "Type", "Alias", "Serial", });
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_ftccommunity_simulator_net_protocol_Type_descriptor,
+ new java.lang.String[] { "Type", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/tasks/HeartbeatTask.java b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/tasks/HeartbeatTask.java
new file mode 100644
index 0000000..465e06a
--- /dev/null
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/simulator/net/tasks/HeartbeatTask.java
@@ -0,0 +1,72 @@
+package org.ftccommunity.simulator.net.tasks;
+
+import com.google.common.base.Charsets;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.EmptyByteBuf;
+import io.netty.buffer.PooledByteBufAllocator;
+import io.netty.channel.Channel;
+import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
+import org.ftccommunity.simulator.net.protocol.SimulatorData;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class HeartbeatTask implements Runnable {
+ private final Channel chl;
+ private static int port = 0;
+
+ public HeartbeatTask(Channel channel, int bondedPort) {
+ this.chl = channel;
+ }
+
+ public static synchronized void setPort(int bondedPort) {
+ port = bondedPort;
+ }
+
+ /**
+ * This generates and sends a Ping request to the server; the data layout in the ping request is: the IP
+ * address of the client (encoded in byte form via US_ASCII), the seen IP address (or hostname) of the server,
+ * the port we are listening on, and a size of the previous data
+ */
+ @Override
+ public void run() {
+ ByteBuf info = new EmptyByteBuf(new PooledByteBufAllocator(false));
+ String infoString = "";
+ try {
+ infoString = InetAddress.getLocalHost().getHostAddress() + "%20" + "null" + "%20" + port +
+ "%20";
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ }
+ byte[] dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+ infoString += dataEncoded.length;
+ dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+
+ info.writeBytes(dataEncoded);
+ SimulatorData.Data.Builder dataBuilder = SimulatorData.Data.newBuilder()
+ .setType(SimulatorData.Type.newBuilder()
+ .setType(SimulatorData.Type.Types.HEARTBEAT))
+ .setModule(SimulatorData.Data.Modules.LEGACY_CONTROLLER)
+ .addInfo((new PingWebSocketFrame(info)).toString());
+ chl.writeAndFlush(dataBuilder.build());
+ }
+
+ public static SimulatorData.Data buildMessage() {
+ /* String infoString = "";
+ try {
+ infoString = InetAddress.getLocalHost().getHostAddress() + "%20" + "null" + "%20" + port +
+ "%20";
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ }
+ byte[] dataEncoded = infoString.getBytes(Charsets.US_ASCII);
+ infoString += dataEncoded.length;
+ dataEncoded = infoString.getBytes(Charsets.US_ASCII);*/
+ SimulatorData.Data.Builder dataBuilded = SimulatorData.Data.newBuilder()
+ .setType(SimulatorData.Type.newBuilder()
+ .setType(SimulatorData.Type.Types.HEARTBEAT))
+ .setModule(SimulatorData.Data.Modules.LEGACY_CONTROLLER)
+ .addInfo((new PingWebSocketFrame()).toString());
+ return dataBuilded.build();
+ }
+}
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/utils/ClientLogger.java b/PC/Java/RobotSimulator/src/org/ftccommunity/utils/ClientLogger.java
index 95dcb22..af1bc06 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/utils/ClientLogger.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/utils/ClientLogger.java
@@ -14,8 +14,8 @@ static public void setup() throws IOException {
Logger rootLogger = Logger.getLogger("");
Handler[] handlers = rootLogger.getHandlers();
- if (handlers[0] instanceof ConsoleHandler) {
- rootLogger.removeHandler(handlers[0]);
+ if (handlers.length > 0 && handlers[0] instanceof ConsoleHandler) {
+ handlers[0].setLevel(Level.SEVERE);
}
logger.setLevel(Level.INFO);
diff --git a/PC/Java/RobotSimulator/src/org/ftccommunity/utils/Utils.java b/PC/Java/RobotSimulator/src/org/ftccommunity/utils/Utils.java
index eafb6f9..4c9f578 100644
--- a/PC/Java/RobotSimulator/src/org/ftccommunity/utils/Utils.java
+++ b/PC/Java/RobotSimulator/src/org/ftccommunity/utils/Utils.java
@@ -30,12 +30,11 @@ public final class Utils {
private static final Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
public static String bufferToHexString(byte[] data, int start, int length) {
- int i;
int myStop;
StringBuilder sb = new StringBuilder();
//byte [] subArray = Arrays.copyOfRange(a, 4, 6);
myStop = (length > data.length) ? data.length : length;
- for (i=start; i \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/PC/Java/RobotSimulatorLibrary/gradlew.bat b/PC/Java/RobotSimulatorLibrary/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/PC/Java/RobotSimulatorLibrary/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/PC/Java/RobotSimulatorLibrary/settings.gradle b/PC/Java/RobotSimulatorLibrary/settings.gradle
new file mode 100644
index 0000000..36f79b8
--- /dev/null
+++ b/PC/Java/RobotSimulatorLibrary/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'RobotSimulatorLibrary'
+
diff --git a/PROTOCOL.md b/PROTOCOL.md
new file mode 100644
index 0000000..edfd6e2
--- /dev/null
+++ b/PROTOCOL.md
@@ -0,0 +1,34 @@
+# Protocol
+FTC Networked Simulator
+
+## Main Data Communication
+The protocol does the following:
+- Tells the Robot Controller what devices the simulator has,
+ the ports they use, and their serial numbers
+- Allows the data exchange to take place
+- Allows the data to be sorted by what it affects (or "*type*"),
+ and depending on the implementation further subdivided by what
+ module the data is directed at
+- Ulitizes the design of Google's Protobuf
+- The program is delimited by the size of the next packets
+ * An example of is to consider the following stream:
+ > 9 (size) 34 64 33 200 234 245 45 22 64 (data) 34 (size) 31 67 243 53 75...
+ - The size of the data uses 4 bytes
+ - Any string within the data uses the ASCII character encoding (later versions, may switch to UTF-8
+ for the payload encoding, but still mantain that for non-payload strings be in ASCII)
+ - A single heartbeat is sent if the connection is idle for more than 1 second (not implemented correctly)
+ - That the request to send data, first waits to until the connection channel is writable
+
+ ### Main Data Protocol Implementation
+ To be added...
+
+## Multicast Protcol
+This protocol does the following:
+ - Communicates the IP address, and verfies that the sender IP is the same as
+ the data in the protocol
+ - Communicates what the port the main data is lisenting on (optionally if the port is 7002);
+ - Uses the UDP port 7003
+
+ ### Multicast Implementation
+ To be added...
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 7659405..5910a43 100644
--- a/README.md
+++ b/README.md
@@ -6,17 +6,20 @@ The goal of this project is to create a standalone app that will replace the USB
## Software Used
* Android Studio
- * Version: 1.2.1.1
+ * Version: 1.2.1.1 - 1.3.1
* Eclipse
* Version: Mars Release (4.5.0)
* Need JavaFX; use http://efxclipse.bestsolution.at/install.html#all-in-one for pre-packaged install.
+* IntelliJ IDEA
+ * Version: 14 - 15
+ * Optional: JavaFX Scene Builder
* V-Rep Pro EDU
* Version: 3.2.1
* Vendor: Coppelia Robotics
* Java JDK
- * Version: jdk1.8.0_45
-* TCPView (Used to kill process holding port 6500 when pc java program doesn't release it. TODO: fix)
- * Vendor: www.sysinternals.com
+ * Version: jdk1.8.0_51
+* ~~TCPView (Used to kill process holding port 6500 when pc java program doesn't release it. TODO: fix)
+ Vendor: www.sysinternals.com~~
## Getting Started
@@ -55,10 +58,11 @@ In the repo you'll find the following directories and files.
* Compile and run the app
* Setup the newly found legacy controller with two motors "motor_1" and "motor_2"
* Save configuration
-* Open PC Path editor and add following directory to PATH variable:
+* Open PC Path editor and add following directory to PATH variable, or copy the contents to the directory
+ where the program is ran:
* C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\java\lib\64Bit
-* Open V-Rep simulator and open scene file PC/V-rep/FTCRobot.ttt
-* Open Eclipse and import PC/Java/RobotSimulator
+* Open V-Rep simulator and open scene file PC/V-rep/FTCRobot.ttt, start the simulation
+* Open Eclipse or IntelliJ IDEA and import PC/Java/RobotSimulator
* Compile and Run RobotSimulator
* Robot Simulator will listen on the socket selected in the GUI for incoming packets from the Phone and forward motor commands to the V-Rep simulator
* Press the "Start Simulator" button to start the simulation.