Difference between revisions of "Java: NetTables Client"

From Deep Blue Robotics Wiki
Jump to: navigation, search
(=Running the Eclipse Project)
 
(9 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
==Getting the Client==
 
==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.
+
   Last updated on 3/9/2015.<nowiki>
  The Arm subsystem is unused as of 3/9/2015.
+
 
  unused SUBSYSTEM Arm
+
</nowiki>The Arm subsystem is unused as of 3/9/2015. <nowiki>
 +
 
 +
</nowiki>unused SUBSYSTEM Arm
 
   unused GETBOOL Arm/Grabbing
 
   unused GETBOOL Arm/Grabbing
 
   unused GETBOOL Arm/Container Sensor
 
   unused GETBOOL Arm/Container Sensor
Line 26: Line 29:
 
   unused GETBOOL Arm/Back Limit
 
   unused GETBOOL Arm/Back Limit
 
   unused GETNUM Arm/Potentiometer
 
   unused GETNUM Arm/Potentiometer
   unused NEWLINE
+
   unused NEWLINE<nowiki>
  
  SUBSYSTEM Vision
+
</nowiki>SUBSYSTEM Vision
 
   GETNUM CameraVision/First Edge
 
   GETNUM CameraVision/First Edge
 
   GETNUM CameraVision/Second Edge
 
   GETNUM CameraVision/Second Edge
 
   GETNUM CameraVision/Offset
 
   GETNUM CameraVision/Offset
 
   GETNUM CameraVision/Vision Proc Time
 
   GETNUM CameraVision/Vision Proc Time
   NEWLINE
+
   NEWLINE<nowiki>
  
  SUBSYSTEM Claw
+
</nowiki>SUBSYSTEM Claw
 
   GETBOOL Claw/Closed
 
   GETBOOL Claw/Closed
   NEWLINE
+
   NEWLINE<nowiki>
  
  SUBSYSTEM Drivetrain
+
</nowiki>SUBSYSTEM Drivetrain
 
   GETBOOL Drivetrain/High Gear
 
   GETBOOL Drivetrain/High Gear
 
   GETNUM Drivetrain/LeftEncoder Raw
 
   GETNUM Drivetrain/LeftEncoder Raw
Line 51: Line 54:
 
   GETBOOL Drivetrain/Right LineReader OnWhite
 
   GETBOOL Drivetrain/Right LineReader OnWhite
 
   GETNUM Drivetrain/LineTrackerLimit
 
   GETNUM Drivetrain/LineTrackerLimit
   NEWLINE
+
   NEWLINE<nowiki>
  
  SUBSYSTEM Elevator
+
</nowiki>SUBSYSTEM Elevator
 
   GETBOOL Elevator/Upper Limit
 
   GETBOOL Elevator/Upper Limit
 
   GETBOOL Elevator/Lower Limit
 
   GETBOOL Elevator/Lower Limit

Latest revision as of 23:15, 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