Skip to content

FRC Object Parsing #20

Description

@theNerd247

OK, so now we are on to phase 2 of the project!

Now, we are on to creating, the API for FRC Robots!

Some problems I would like to discuss are the formatting of how we are going to store data for FRC devices in the JavaCSV file.
My idea is to put all devices under one header, and create a list of parsing objects that determine how to read the rows of data and create devices from them. In each row the first two items will determine how to parse the data and store it. For example we have a row as follows:
;FrontLeftMotor,Jaguar,1,1,2

A controller will look at the second item in the list, and select a parser based upon it, to create an frc object. Example code would be :

CSVDataHeader devs = getDevices();
Vector row = devs.getRow(0);
DeviceParser parser = parserList.getParser((String)row.elementAt(1));
RobotDevice newDevice = parser.createDevice(row);
Jaguar jag = (Jaguar)newDevice.getDevice();

Just a thought. Any other ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions