Difference between revisions of "Java: NetTables Client"

From Deep Blue Robotics Wiki
Jump to: navigation, search
(Created page with "=NetTables Client= The NetTables Client is a custom piece of software designed to organize smart dashboard outputs into an easy to read .txt file or a .csv file that can easil...")
 
Line 2: Line 2:
 
The NetTables Client is a custom piece of software designed to organize smart dashboard outputs into an easy to read .txt file or a .csv file that can easily be turned into a spreadsheet.
 
The NetTables Client is a custom piece of software designed to organize smart dashboard outputs into an easy to read .txt file or a .csv file that can easily be turned into a spreadsheet.
  
 +
==Getting the Client==
 
To get the NetTables Client go to the directory where you have the 2015-roboRIO-repo. Then navigate to Ian>NetTables Clients. If you want a standalone version of the client, copy the most current NetTables Client folder (ex: NetTables Client V1.x) into another directory. If you want an eclipse version, import the latest eclipse project (ex: NetTables Client Eclipse V1.x).
 
To get the NetTables Client go to the directory where you have the 2015-roboRIO-repo. Then navigate to Ian>NetTables Clients. If you want a standalone version of the client, copy the most current NetTables Client folder (ex: NetTables Client V1.x) into another directory. If you want an eclipse version, import the latest eclipse project (ex: NetTables Client Eclipse V1.x).
Running the Client
+
===Running the Client===
  
 
The client is designed to be simple and easy to run. The client may take a while to start but when it does it will create a .txt and .csv log file. Closing the client window will terminate the program.
 
The client is designed to be simple and easy to run. The client may take a while to start but when it does it will create a .txt and .csv log file. Closing the client window will terminate the program.
Running the Standalone Client
+
==Running the Standalone Client==
  
 
To run the standalone client, navigate to the folder where it is stored and make sure that the folder contains an init-params.txt and run-params.txt. To start the client run the NetTables Client V1.1.jar.
 
To run the standalone client, navigate to the folder where it is stored and make sure that the folder contains an init-params.txt and run-params.txt. To start the client run the NetTables Client V1.1.jar.
Running the Eclipse Project
+
===Running the Eclipse Project===
  
 
To run the Eclipse project, open the project and make sure that the folder contains an init-params.txt and a run-params.txt. Click the Run button to start the client.
 
To run the Eclipse project, open the project and make sure that the folder contains an init-params.txt and a run-params.txt. Click the Run button to start the client.
Editing the Parameters
+
==Editing the Parameters==
  
 
The init-params.txt and run-params files contain instructions for the client. They are meant to be easily edited. The init-params.txt file is only run once when the program is initiated. The run-params.txt file is constantly looping. You can give the client instructions by using commands. This is an example of what a run-params file might look like:
 
The init-params.txt and run-params files contain instructions for the client. They are meant to be easily edited. The init-params.txt file is only run once when the program is initiated. The run-params.txt file is constantly looping. You can give the client instructions by using commands. This is an example of what a run-params file might look like:
Last updated on 3/9/2015.
 
  
  
The Arm subsystem is unused as of 3/9/2015.
+
  Last updated on 3/9/2015.
 +
  The Arm subsystem is unused as of 3/9/2015.
 +
  unused SUBSYSTEM Arm
 +
  unused GETBOOL Arm/Grabbing
 +
  unused GETBOOL Arm/Container Sensor
 +
  unused GETBOOL Arm/Forward Limit
 +
  unused GETBOOL Arm/Back Limit
 +
  unused GETNUM Arm/Potentiometer
 +
  unused NEWLINE
  
 +
  SUBSYSTEM Vision
 +
  GETNUM CameraVision/First Edge
 +
  GETNUM CameraVision/Second Edge
 +
  GETNUM CameraVision/Offset
 +
  GETNUM CameraVision/Vision Proc Time
 +
  NEWLINE
  
unused SUBSYSTEM Arm
+
  SUBSYSTEM Claw
unused GETBOOL Arm/Grabbing
+
  GETBOOL Claw/Closed
unused GETBOOL Arm/Container Sensor
+
  NEWLINE
unused GETBOOL Arm/Forward Limit
+
unused GETBOOL Arm/Back Limit
+
unused GETNUM Arm/Potentiometer
+
unused NEWLINE
+
  
SUBSYSTEM Vision
+
  SUBSYSTEM Drivetrain
GETNUM CameraVision/First Edge
+
  GETBOOL Drivetrain/High Gear
GETNUM CameraVision/Second Edge
+
  GETNUM Drivetrain/LeftEncoder Raw
GETNUM CameraVision/Offset
+
  GETNUM Drivetrain/RightEncoder Raw
GETNUM CameraVision/Vision Proc Time
+
  GETNUM Drivetrain/LeftEncoder
NEWLINE
+
  GETNUM Drivetrain/RightEncoder
 +
  GETNUM Drivetrain/Gyro
 +
  GETNUM Drivetrain/Left LineReader Value
 +
  GETNUM Drivetrain/Right LineReader Value
 +
  GETBOOL Drivetrain/Left LineReader OnWhite
 +
  GETBOOL Drivetrain/Right LineReader OnWhite
 +
  GETNUM Drivetrain/LineTrackerLimit
 +
  NEWLINE
  
SUBSYSTEM Claw
+
  SUBSYSTEM Elevator
GETBOOL Claw/Closed
+
  GETBOOL Elevator/Upper Limit
NEWLINE
+
  GETBOOL Elevator/Lower Limit
 
+
  GETBOOL Elevator/Top Triggered
SUBSYSTEM Drivetrain
+
  GETNUM Elevator/Encoder
GETBOOL Drivetrain/High Gear
+
GETNUM Drivetrain/LeftEncoder Raw
+
GETNUM Drivetrain/RightEncoder Raw
+
GETNUM Drivetrain/LeftEncoder
+
GETNUM Drivetrain/RightEncoder
+
GETNUM Drivetrain/Gyro
+
GETNUM Drivetrain/Left LineReader Value
+
GETNUM Drivetrain/Right LineReader Value
+
GETBOOL Drivetrain/Left LineReader OnWhite
+
GETBOOL Drivetrain/Right LineReader OnWhite
+
GETNUM Drivetrain/LineTrackerLimit
+
NEWLINE
+
 
+
SUBSYSTEM Elevator
+
GETBOOL Elevator/Upper Limit
+
GETBOOL Elevator/Lower Limit
+
GETBOOL Elevator/Top Triggered
+
GETNUM Elevator/Encoder
+
  
 
Any line that doesn't begin with a command is a ignored. All of the fully capitalized words are commands and the text after each is a parameter.
 
Any line that doesn't begin with a command is a ignored. All of the fully capitalized words are commands and the text after each is a parameter.
 
A Table of Commands and their Functions
 
A Table of Commands and their Functions

Revision as of 23:03, 10 November 2016

NetTables Client

The NetTables Client is a custom piece of software designed to organize smart dashboard outputs into an easy to read .txt file or a .csv file that can easily be turned into a spreadsheet.

Getting the Client

To get the NetTables Client go to the directory where you have the 2015-roboRIO-repo. Then navigate to Ian>NetTables Clients. If you want a standalone version of the client, copy the most current NetTables Client folder (ex: NetTables Client V1.x) into another directory. If you want an eclipse version, import the latest eclipse project (ex: NetTables Client Eclipse V1.x).

Running the Client

The client is designed to be simple and easy to run. The client may take a while to start but when it does it will create a .txt and .csv log file. Closing the client window will terminate the program.

Running the Standalone Client

To run the standalone client, navigate to the folder where it is stored and make sure that the folder contains an init-params.txt and run-params.txt. To start the client run the NetTables Client V1.1.jar.

Running the Eclipse Project

To run the Eclipse project, open the project and make sure that the folder contains an init-params.txt and a run-params.txt. Click the Run button to start the client.

Editing the Parameters

The init-params.txt and run-params files contain instructions for the client. They are meant to be easily edited. The init-params.txt file is only run once when the program is initiated. The run-params.txt file is constantly looping. You can give the client instructions by using commands. This is an example of what a run-params file might look like:


 Last updated on 3/9/2015.
 The Arm subsystem is unused as of 3/9/2015.
 unused SUBSYSTEM Arm
 unused GETBOOL Arm/Grabbing
 unused GETBOOL Arm/Container Sensor
 unused GETBOOL Arm/Forward Limit
 unused GETBOOL Arm/Back Limit
 unused GETNUM Arm/Potentiometer
 unused NEWLINE
 SUBSYSTEM Vision
 GETNUM CameraVision/First Edge
 GETNUM CameraVision/Second Edge
 GETNUM CameraVision/Offset
 GETNUM CameraVision/Vision Proc Time
 NEWLINE
 SUBSYSTEM Claw
 GETBOOL Claw/Closed
 NEWLINE
 SUBSYSTEM Drivetrain
 GETBOOL Drivetrain/High Gear
 GETNUM Drivetrain/LeftEncoder Raw
 GETNUM Drivetrain/RightEncoder Raw
 GETNUM Drivetrain/LeftEncoder
 GETNUM Drivetrain/RightEncoder
 GETNUM Drivetrain/Gyro
 GETNUM Drivetrain/Left LineReader Value
 GETNUM Drivetrain/Right LineReader Value
 GETBOOL Drivetrain/Left LineReader OnWhite
 GETBOOL Drivetrain/Right LineReader OnWhite
 GETNUM Drivetrain/LineTrackerLimit
 NEWLINE
 SUBSYSTEM Elevator
 GETBOOL Elevator/Upper Limit
 GETBOOL Elevator/Lower Limit
 GETBOOL Elevator/Top Triggered
 GETNUM Elevator/Encoder

Any line that doesn't begin with a command is a ignored. All of the fully capitalized words are commands and the text after each is a parameter. A Table of Commands and their Functions