diff --git a/README.md b/README.md index 7d97e12..8743a74 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # WPIWebSockets This API provides a Java interface to the [WPILib HALSim WebSockets API](https://github.com/wpilibsuite/allwpilib/blob/master/simulation/halsim_ws_core/doc/hardware_ws_api.md) which mirrors the standard simulation API. # Building the API -To build the API, navigate to the root directory of this repository and run `./gradlew build`. This will use Gradle to build the API with Java 8. Note that the simulated device files (org.team199.wpiws.devices.*) are auto-generated using the [AsyncAPI Generator](https://github.com/asyncapi/generator) and [an extended version](./wpilib-ws.yaml) of [WPILib's machine readable WebSocket specification](https://github.com/wpilibsuite/allwpilib/blob/master/simulation/halsim_ws_core/doc/wpilib-ws.yaml). The AsyncAPI template used to generate these files is located at [./asyncapi-template](./asyncapi-template). These files are auto-generated during the `WPIWebSockets:build` task, however, they can be manually regenerated by running `./gradlew generateDeviceFiles`. +To build the API, navigate to the root directory of this repository and run `./gradlew build`. This will use Gradle to build the API with Java 8. Note that the simulated device files (org.carlmontrobotics.wpiws.devices.*) are auto-generated using the [AsyncAPI Generator](https://github.com/asyncapi/generator) and [an extended version](./wpilib-ws.yaml) of [WPILib's machine readable WebSocket specification](https://github.com/wpilibsuite/allwpilib/blob/master/simulation/halsim_ws_core/doc/wpilib-ws.yaml). The AsyncAPI template used to generate these files is located at [./asyncapi-template](./asyncapi-template). These files are auto-generated during the `WPIWebSockets:build` task, however, they can be manually regenerated by running `./gradlew generateDeviceFiles`. # Using the API -Connecting to the running HALSim client and server instances can be accomplished by using the `connectHALSim` and `startHALSimServer` methods of [`org.team199.wpiws.connection.WSConnection`](./src/main/java/org/team199/wpiws/connection/WSConnection.java). Code for connecting to simulated devices can be found in the `org.team199.wpiws.devices` package. These classes can be initialized by providing the constructor with the device id with which it should associate itself. The instance will then provide getter, setter, and callback methods for all of the values exposed by the WebSocket API. (ex. `new PWMSim("5").setSpeed(5)`, `new DIOSim("0").getValue()`). Note: `static` methods apply globaly to the device type. +Connecting to the running HALSim client and server instances can be accomplished by using the `connectHALSim` and `startHALSimServer` methods of [`org.carlmontrobotics.wpiws.connection.WSConnection`](./src/main/java/org/carlmontrobotics/wpiws/connection/WSConnection.java). Code for connecting to simulated devices can be found in the `org.carlmontrobotics.wpiws.devices` package. These classes can be initialized by providing the constructor with the device id with which it should associate itself. The instance will then provide getter, setter, and callback methods for all of the values exposed by the WebSocket API. (ex. `new PWMSim("5").setSpeed(5)`, `new DIOSim("0").getValue()`). Note: `static` methods apply globaly to the device type. For a more complete example, see [DeepBlueRobotics/DeepBlueSim](https://github.com/DeepBlueRobotics/DeepBlueSim) which uses this API to provide an interface to a [Webots](https://cyberbotics.com/) robot simulator. diff --git a/asyncapi-template/partials/SimDeviceSim.java b/asyncapi-template/partials/SimDeviceSim.java index 5745ffb..f847a71 100644 --- a/asyncapi-template/partials/SimDeviceSim.java +++ b/asyncapi-template/partials/SimDeviceSim.java @@ -2,7 +2,7 @@ // IT IS AUTOMATICALLY GENERATED BY THE 'generateDeviceFiles' GRADLE TASK // FROM THE TEMPLATE FILE 'asyncapi-template/partials/SimDeviceSim.java'. // EDIT THAT FILE INSTEAD. -package org.team199.wpiws.devices; +package org.carlmontrobotics.wpiws.devices; import java.math.BigDecimal; import java.util.Arrays; @@ -17,12 +17,12 @@ import java.util.function.Function; import java.util.function.Predicate; -import org.team199.wpiws.Pair; -import org.team199.wpiws.StateDevice; -import org.team199.wpiws.connection.ConnectionProcessor; -import org.team199.wpiws.connection.WSValue; -import org.team199.wpiws.interfaces.SimDeviceCallback; -import org.team199.wpiws.interfaces.ObjectCallback; +import org.carlmontrobotics.wpiws.Pair; +import org.carlmontrobotics.wpiws.StateDevice; +import org.carlmontrobotics.wpiws.connection.ConnectionProcessor; +import org.carlmontrobotics.wpiws.connection.WSValue; +import org.carlmontrobotics.wpiws.interfaces.SimDeviceCallback; +import org.carlmontrobotics.wpiws.interfaces.ObjectCallback; /** * Represents a miscellaneous simulated device @@ -252,7 +252,7 @@ public static void cancelDeviceCreatedCallback(Pair c } /** - * An implementation of {@link org.team199.wpiws.interfaces.DeviceMessageProcessor} which processes WPI HALSim messages for SimDeviceSims + * An implementation of {@link org.carlmontrobotics.wpiws.interfaces.DeviceMessageProcessor} which processes WPI HALSim messages for SimDeviceSims * @param device the device identifier of the device sending the message * @param data the data associated with the message */ diff --git a/asyncapi-template/template/$$schema$$.java b/asyncapi-template/template/$$schema$$.java index b4ec13c..43d2c4f 100644 --- a/asyncapi-template/template/$$schema$$.java +++ b/asyncapi-template/template/$$schema$$.java @@ -16,7 +16,7 @@ // IT IS AUTOMATICALLY GENERATED BY THE 'generateDeviceFiles' GRADLE TASK // FROM THE TEMPLATE FILE 'asyncapi-template/template/$$schema$$.java'. // EDIT THAT FILE INSTEAD. -package org.team199.wpiws.devices; +package org.carlmontrobotics.wpiws.devices; import java.util.List; {% if hasId -%} @@ -32,12 +32,12 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; -import org.team199.wpiws.StateDevice; -import org.team199.wpiws.connection.ConnectionProcessor; -import org.team199.wpiws.connection.WSValue; -import org.team199.wpiws.interfaces.*; +import org.carlmontrobotics.wpiws.StateDevice; +import org.carlmontrobotics.wpiws.connection.ConnectionProcessor; +import org.carlmontrobotics.wpiws.connection.WSValue; +import org.carlmontrobotics.wpiws.interfaces.*; {%- if (props | usesCustomTypes(name)) %} -import org.team199.wpiws.types.*; +import org.carlmontrobotics.wpiws.types.*; {%- endif %} /** @@ -254,7 +254,7 @@ protected State generateState() { {% endfor -%} /** - * An implementation of {@link org.team199.wpiws.interfaces.DeviceMessageProcessor} which processes WPI HALSim messages for {{ name }}Sims + * An implementation of {@link org.carlmontrobotics.wpiws.interfaces.DeviceMessageProcessor} which processes WPI HALSim messages for {{ name }}Sims * @param device the device identifier of the device sending the message * @param type the type of the device sending the message * @param data the data associated with the message diff --git a/build.gradle b/build.gradle index c59e9b5..66918d6 100644 --- a/build.gradle +++ b/build.gradle @@ -57,7 +57,7 @@ task generateDeviceFiles(type: NpxTask) { workingDir = buildDir // Because templateDir can't be under it command = '@asyncapi/generator@1.17.25' args = ['--force-write', - '-o', "${outputDir}/org/team199/wpiws/devices", + '-o', "${outputDir}/org/carlmontrobotics/wpiws/devices", "https://raw.githubusercontent.com/DeepBlueRobotics/allwpilib/c1fc86033a4b5ebda451de657fc2546eb3f431fb/simulation/halsim_ws_core/doc/wpilib-ws.yaml", file(archiveTemplate.archiveFile).toURI()] diff --git a/src/main/java/org/team199/wpiws/Pair.java b/src/main/java/org/carlmontrobotics/wpiws/Pair.java similarity index 95% rename from src/main/java/org/team199/wpiws/Pair.java rename to src/main/java/org/carlmontrobotics/wpiws/Pair.java index 0011382..c9777bd 100644 --- a/src/main/java/org/team199/wpiws/Pair.java +++ b/src/main/java/org/carlmontrobotics/wpiws/Pair.java @@ -1,4 +1,4 @@ -package org.team199.wpiws; +package org.carlmontrobotics.wpiws; import java.util.Objects; diff --git a/src/main/java/org/team199/wpiws/StateDevice.java b/src/main/java/org/carlmontrobotics/wpiws/StateDevice.java similarity index 99% rename from src/main/java/org/team199/wpiws/StateDevice.java rename to src/main/java/org/carlmontrobotics/wpiws/StateDevice.java index 0a7a421..c9e2c19 100644 --- a/src/main/java/org/team199/wpiws/StateDevice.java +++ b/src/main/java/org/carlmontrobotics/wpiws/StateDevice.java @@ -1,4 +1,4 @@ -package org.team199.wpiws; +package org.carlmontrobotics.wpiws; import java.math.BigDecimal; import java.util.Arrays; diff --git a/src/main/java/org/team199/wpiws/connection/ConnectionProcessor.java b/src/main/java/org/carlmontrobotics/wpiws/connection/ConnectionProcessor.java similarity index 99% rename from src/main/java/org/team199/wpiws/connection/ConnectionProcessor.java rename to src/main/java/org/carlmontrobotics/wpiws/connection/ConnectionProcessor.java index 001f1c7..1859739 100644 --- a/src/main/java/org/team199/wpiws/connection/ConnectionProcessor.java +++ b/src/main/java/org/carlmontrobotics/wpiws/connection/ConnectionProcessor.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.connection; +package org.carlmontrobotics.wpiws.connection; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/org/team199/wpiws/connection/MessageProcessor.java b/src/main/java/org/carlmontrobotics/wpiws/connection/MessageProcessor.java similarity index 72% rename from src/main/java/org/team199/wpiws/connection/MessageProcessor.java rename to src/main/java/org/carlmontrobotics/wpiws/connection/MessageProcessor.java index 7954f6b..3cebe13 100644 --- a/src/main/java/org/team199/wpiws/connection/MessageProcessor.java +++ b/src/main/java/org/carlmontrobotics/wpiws/connection/MessageProcessor.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.connection; +package org.carlmontrobotics.wpiws.connection; import java.util.List; import java.util.Map; @@ -6,32 +6,32 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentSkipListSet; -import org.team199.wpiws.devices.AccelerometerSim; -import org.team199.wpiws.devices.AddressableLEDSim; -import org.team199.wpiws.devices.AnalogInputSim; -import org.team199.wpiws.devices.AnalogOutputSim; -import org.team199.wpiws.devices.CANAccelerometerSim; -import org.team199.wpiws.devices.CANAnalogInputSim; -import org.team199.wpiws.devices.CANDIOSim; -import org.team199.wpiws.devices.CANDutyCycleSim; -import org.team199.wpiws.devices.CANEncoderSim; -import org.team199.wpiws.devices.CANGyroSim; -import org.team199.wpiws.devices.CANMotorSim; -import org.team199.wpiws.devices.DIOSim; -import org.team199.wpiws.devices.DriverStationSim; -import org.team199.wpiws.devices.DutyCycleSim; -import org.team199.wpiws.devices.EncoderSim; -import org.team199.wpiws.devices.GyroSim; -import org.team199.wpiws.devices.HALSim; -import org.team199.wpiws.devices.JoystickSim; -import org.team199.wpiws.devices.PCMSim; -import org.team199.wpiws.devices.PWMSim; -import org.team199.wpiws.devices.RelaySim; -import org.team199.wpiws.devices.RoboRIOSim; -import org.team199.wpiws.devices.SimDeviceSim; -import org.team199.wpiws.devices.SolenoidSim; -import org.team199.wpiws.devices.dPWMSim; -import org.team199.wpiws.interfaces.DeviceMessageProcessor; +import org.carlmontrobotics.wpiws.devices.AccelerometerSim; +import org.carlmontrobotics.wpiws.devices.AddressableLEDSim; +import org.carlmontrobotics.wpiws.devices.AnalogInputSim; +import org.carlmontrobotics.wpiws.devices.AnalogOutputSim; +import org.carlmontrobotics.wpiws.devices.CANAccelerometerSim; +import org.carlmontrobotics.wpiws.devices.CANAnalogInputSim; +import org.carlmontrobotics.wpiws.devices.CANDIOSim; +import org.carlmontrobotics.wpiws.devices.CANDutyCycleSim; +import org.carlmontrobotics.wpiws.devices.CANEncoderSim; +import org.carlmontrobotics.wpiws.devices.CANGyroSim; +import org.carlmontrobotics.wpiws.devices.CANMotorSim; +import org.carlmontrobotics.wpiws.devices.DIOSim; +import org.carlmontrobotics.wpiws.devices.DriverStationSim; +import org.carlmontrobotics.wpiws.devices.DutyCycleSim; +import org.carlmontrobotics.wpiws.devices.EncoderSim; +import org.carlmontrobotics.wpiws.devices.GyroSim; +import org.carlmontrobotics.wpiws.devices.HALSim; +import org.carlmontrobotics.wpiws.devices.JoystickSim; +import org.carlmontrobotics.wpiws.devices.PCMSim; +import org.carlmontrobotics.wpiws.devices.PWMSim; +import org.carlmontrobotics.wpiws.devices.RelaySim; +import org.carlmontrobotics.wpiws.devices.RoboRIOSim; +import org.carlmontrobotics.wpiws.devices.SimDeviceSim; +import org.carlmontrobotics.wpiws.devices.SolenoidSim; +import org.carlmontrobotics.wpiws.devices.dPWMSim; +import org.carlmontrobotics.wpiws.interfaces.DeviceMessageProcessor; /** * Manages a list of {@link DeviceMessageProcessor} objects which handle messages for different device types diff --git a/src/main/java/org/team199/wpiws/connection/RunningObject.java b/src/main/java/org/carlmontrobotics/wpiws/connection/RunningObject.java similarity index 96% rename from src/main/java/org/team199/wpiws/connection/RunningObject.java rename to src/main/java/org/carlmontrobotics/wpiws/connection/RunningObject.java index dbcff1e..8d73e04 100644 --- a/src/main/java/org/team199/wpiws/connection/RunningObject.java +++ b/src/main/java/org/carlmontrobotics/wpiws/connection/RunningObject.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.connection; +package org.carlmontrobotics.wpiws.connection; /** * Represents a Runnable which is being run in another {@link Thread} diff --git a/src/main/java/org/team199/wpiws/connection/WSConnection.java b/src/main/java/org/carlmontrobotics/wpiws/connection/WSConnection.java similarity index 99% rename from src/main/java/org/team199/wpiws/connection/WSConnection.java rename to src/main/java/org/carlmontrobotics/wpiws/connection/WSConnection.java index f673d17..8c47e51 100644 --- a/src/main/java/org/team199/wpiws/connection/WSConnection.java +++ b/src/main/java/org/carlmontrobotics/wpiws/connection/WSConnection.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.connection; +package org.carlmontrobotics.wpiws.connection; import java.net.ConnectException; import java.net.InetSocketAddress; diff --git a/src/main/java/org/team199/wpiws/connection/WSValue.java b/src/main/java/org/carlmontrobotics/wpiws/connection/WSValue.java similarity index 97% rename from src/main/java/org/team199/wpiws/connection/WSValue.java rename to src/main/java/org/carlmontrobotics/wpiws/connection/WSValue.java index a780738..a0fb718 100644 --- a/src/main/java/org/team199/wpiws/connection/WSValue.java +++ b/src/main/java/org/carlmontrobotics/wpiws/connection/WSValue.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.connection; +package org.carlmontrobotics.wpiws.connection; import java.util.Objects; diff --git a/src/main/java/org/team199/wpiws/connection/package-info.java b/src/main/java/org/carlmontrobotics/wpiws/connection/package-info.java similarity index 70% rename from src/main/java/org/team199/wpiws/connection/package-info.java rename to src/main/java/org/carlmontrobotics/wpiws/connection/package-info.java index 9b44848..faa2f9b 100644 --- a/src/main/java/org/team199/wpiws/connection/package-info.java +++ b/src/main/java/org/carlmontrobotics/wpiws/connection/package-info.java @@ -1,4 +1,4 @@ /** * Manages low level interfacing with WebSockets and basic WPI HALSim protocol processing and formatting */ -package org.team199.wpiws.connection; +package org.carlmontrobotics.wpiws.connection; diff --git a/src/main/java/org/team199/wpiws/interfaces/BooleanCallback.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/BooleanCallback.java similarity index 88% rename from src/main/java/org/team199/wpiws/interfaces/BooleanCallback.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/BooleanCallback.java index 6cc0302..cfcbc2d 100644 --- a/src/main/java/org/team199/wpiws/interfaces/BooleanCallback.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/BooleanCallback.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a device callback which accepts a boolean value as data diff --git a/src/main/java/org/team199/wpiws/interfaces/DeviceMessageProcessor.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/DeviceMessageProcessor.java similarity index 75% rename from src/main/java/org/team199/wpiws/interfaces/DeviceMessageProcessor.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/DeviceMessageProcessor.java index 3cc3258..d7659b7 100644 --- a/src/main/java/org/team199/wpiws/interfaces/DeviceMessageProcessor.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/DeviceMessageProcessor.java @@ -1,12 +1,12 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; import java.util.List; -import org.team199.wpiws.connection.WSValue; +import org.carlmontrobotics.wpiws.connection.WSValue; /** * Represents a function which processes WPI HALSim messages for a specific device type - * @see org.team199.wpiws.connection.MessageProcessor + * @see org.carlmontrobotics.wpiws.connection.MessageProcessor */ @FunctionalInterface public interface DeviceMessageProcessor { diff --git a/src/main/java/org/team199/wpiws/interfaces/DoubleCallback.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/DoubleCallback.java similarity index 88% rename from src/main/java/org/team199/wpiws/interfaces/DoubleCallback.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/DoubleCallback.java index 5e2df07..3f115b8 100644 --- a/src/main/java/org/team199/wpiws/interfaces/DoubleCallback.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/DoubleCallback.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a device callback which accepts a double value as data diff --git a/src/main/java/org/team199/wpiws/interfaces/ExceptionConsumer.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/ExceptionConsumer.java similarity index 84% rename from src/main/java/org/team199/wpiws/interfaces/ExceptionConsumer.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/ExceptionConsumer.java index b61217f..45f9293 100644 --- a/src/main/java/org/team199/wpiws/interfaces/ExceptionConsumer.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/ExceptionConsumer.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a function which is equivalent to {@link java.util.function.Consumer} with the ability to throw an {@link Exception} diff --git a/src/main/java/org/team199/wpiws/interfaces/IntegerCallback.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/IntegerCallback.java similarity index 88% rename from src/main/java/org/team199/wpiws/interfaces/IntegerCallback.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/IntegerCallback.java index e71d586..bcdca4c 100644 --- a/src/main/java/org/team199/wpiws/interfaces/IntegerCallback.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/IntegerCallback.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a device callback which accepts a integer value as data diff --git a/src/main/java/org/team199/wpiws/interfaces/LongCallback.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/LongCallback.java similarity index 88% rename from src/main/java/org/team199/wpiws/interfaces/LongCallback.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/LongCallback.java index 006337c..b2b5744 100644 --- a/src/main/java/org/team199/wpiws/interfaces/LongCallback.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/LongCallback.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a device callback which accepts a long value as data diff --git a/src/main/java/org/team199/wpiws/interfaces/ObjectCallback.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/ObjectCallback.java similarity index 88% rename from src/main/java/org/team199/wpiws/interfaces/ObjectCallback.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/ObjectCallback.java index 0736251..0967de7 100644 --- a/src/main/java/org/team199/wpiws/interfaces/ObjectCallback.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/ObjectCallback.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a device callback which accepts an object type as data diff --git a/src/main/java/org/team199/wpiws/interfaces/SimDeviceCallback.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/SimDeviceCallback.java similarity index 86% rename from src/main/java/org/team199/wpiws/interfaces/SimDeviceCallback.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/SimDeviceCallback.java index 866ea1a..1bb89dc 100644 --- a/src/main/java/org/team199/wpiws/interfaces/SimDeviceCallback.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/SimDeviceCallback.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a device callback which only accepts the name of a device diff --git a/src/main/java/org/team199/wpiws/interfaces/package-info.java b/src/main/java/org/carlmontrobotics/wpiws/interfaces/package-info.java similarity index 65% rename from src/main/java/org/team199/wpiws/interfaces/package-info.java rename to src/main/java/org/carlmontrobotics/wpiws/interfaces/package-info.java index 5b7aba1..2c03753 100644 --- a/src/main/java/org/team199/wpiws/interfaces/package-info.java +++ b/src/main/java/org/carlmontrobotics/wpiws/interfaces/package-info.java @@ -1,4 +1,4 @@ /** * All required {@link java.lang.FunctionalInterface} interfaces used in this API */ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; diff --git a/src/main/java/org/team199/wpiws/package-info.java b/src/main/java/org/carlmontrobotics/wpiws/package-info.java similarity index 63% rename from src/main/java/org/team199/wpiws/package-info.java rename to src/main/java/org/carlmontrobotics/wpiws/package-info.java index ba4d50e..08df1a4 100644 --- a/src/main/java/org/team199/wpiws/package-info.java +++ b/src/main/java/org/carlmontrobotics/wpiws/package-info.java @@ -1,4 +1,4 @@ /** * Code to interface with the WebSockets API of WPILib */ -package org.team199.wpiws; +package org.carlmontrobotics.wpiws; diff --git a/src/main/java/org/team199/wpiws/types/LEDColor.java b/src/main/java/org/carlmontrobotics/wpiws/types/LEDColor.java similarity index 97% rename from src/main/java/org/team199/wpiws/types/LEDColor.java rename to src/main/java/org/carlmontrobotics/wpiws/types/LEDColor.java index 7effb50..d7a0cc3 100644 --- a/src/main/java/org/team199/wpiws/types/LEDColor.java +++ b/src/main/java/org/carlmontrobotics/wpiws/types/LEDColor.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.types; +package org.carlmontrobotics.wpiws.types; import com.github.cliftonlabs.json_simple.JsonObject; import com.github.cliftonlabs.json_simple.Jsonable; diff --git a/src/test/java/org/team199/wpiws/TestUtils.java b/src/test/java/org/carlmontrobotics/wpiws/TestUtils.java similarity index 91% rename from src/test/java/org/team199/wpiws/TestUtils.java rename to src/test/java/org/carlmontrobotics/wpiws/TestUtils.java index 374150a..10f703e 100644 --- a/src/test/java/org/team199/wpiws/TestUtils.java +++ b/src/test/java/org/carlmontrobotics/wpiws/TestUtils.java @@ -1,11 +1,11 @@ -package org.team199.wpiws; +package org.carlmontrobotics.wpiws; import static org.junit.Assert.*; import java.util.Arrays; -import org.team199.wpiws.connection.MessageProcessor; -import org.team199.wpiws.connection.WSValue; +import org.carlmontrobotics.wpiws.connection.MessageProcessor; +import org.carlmontrobotics.wpiws.connection.WSValue; /** * Provides various utility functions for other test classes diff --git a/src/test/java/org/team199/wpiws/devices/DevicesTest.java b/src/test/java/org/carlmontrobotics/wpiws/devices/DevicesTest.java similarity index 97% rename from src/test/java/org/team199/wpiws/devices/DevicesTest.java rename to src/test/java/org/carlmontrobotics/wpiws/devices/DevicesTest.java index 6ec7412..198560d 100644 --- a/src/test/java/org/team199/wpiws/devices/DevicesTest.java +++ b/src/test/java/org/carlmontrobotics/wpiws/devices/DevicesTest.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.devices; +package org.carlmontrobotics.wpiws.devices; import static org.junit.Assert.*; import static org.junit.Assume.*; @@ -15,6 +15,20 @@ import java.util.function.Function; import java.util.function.Supplier; +import org.carlmontrobotics.wpiws.Pair; +import org.carlmontrobotics.wpiws.TestUtils; +import org.carlmontrobotics.wpiws.connection.ConnectionProcessor; +import org.carlmontrobotics.wpiws.connection.WSValue; +import org.carlmontrobotics.wpiws.devices.AccelerometerSim; +import org.carlmontrobotics.wpiws.devices.AddressableLEDSim; +import org.carlmontrobotics.wpiws.devices.AnalogInputSim; +import org.carlmontrobotics.wpiws.devices.DIOSim; +import org.carlmontrobotics.wpiws.devices.DriverStationSim; +import org.carlmontrobotics.wpiws.devices.JoystickSim; +import org.carlmontrobotics.wpiws.interfaces.BooleanCallback; +import org.carlmontrobotics.wpiws.interfaces.ObjectCallback; +import org.carlmontrobotics.wpiws.interfaces.TriFunction; +import org.carlmontrobotics.wpiws.types.LEDColor; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.runners.Enclosed; @@ -25,14 +39,6 @@ import org.mockito.ArgumentMatcher; import org.mockito.InOrder; import org.mockito.MockedStatic; -import org.team199.wpiws.Pair; -import org.team199.wpiws.TestUtils; -import org.team199.wpiws.connection.ConnectionProcessor; -import org.team199.wpiws.connection.WSValue; -import org.team199.wpiws.interfaces.BooleanCallback; -import org.team199.wpiws.interfaces.ObjectCallback; -import org.team199.wpiws.interfaces.TriFunction; -import org.team199.wpiws.types.LEDColor; import com.github.cliftonlabs.json_simple.JsonArray; import com.github.cliftonlabs.json_simple.JsonException; diff --git a/src/test/java/org/team199/wpiws/devices/SimDeviceSimTest.java b/src/test/java/org/carlmontrobotics/wpiws/devices/SimDeviceSimTest.java similarity index 97% rename from src/test/java/org/team199/wpiws/devices/SimDeviceSimTest.java rename to src/test/java/org/carlmontrobotics/wpiws/devices/SimDeviceSimTest.java index b6ac2f3..9ccdca3 100644 --- a/src/test/java/org/team199/wpiws/devices/SimDeviceSimTest.java +++ b/src/test/java/org/carlmontrobotics/wpiws/devices/SimDeviceSimTest.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.devices; +package org.carlmontrobotics.wpiws.devices; import static org.junit.Assert.*; import static org.junit.Assume.*; @@ -8,6 +8,14 @@ import java.util.ArrayList; import java.util.Arrays; +import org.carlmontrobotics.wpiws.Pair; +import org.carlmontrobotics.wpiws.TestUtils; +import org.carlmontrobotics.wpiws.connection.ConnectionProcessor; +import org.carlmontrobotics.wpiws.connection.WSValue; +import org.carlmontrobotics.wpiws.devices.SimDeviceSim; +import org.carlmontrobotics.wpiws.interfaces.ObjectCallback; +import org.carlmontrobotics.wpiws.interfaces.SimDeviceCallback; +import org.carlmontrobotics.wpiws.interfaces.TriConsumer; import org.junit.Before; import org.junit.Test; import org.junit.experimental.runners.Enclosed; @@ -18,13 +26,6 @@ import org.mockito.ArgumentMatcher; import org.mockito.InOrder; import org.mockito.MockedStatic; -import org.team199.wpiws.Pair; -import org.team199.wpiws.TestUtils; -import org.team199.wpiws.connection.ConnectionProcessor; -import org.team199.wpiws.connection.WSValue; -import org.team199.wpiws.interfaces.ObjectCallback; -import org.team199.wpiws.interfaces.SimDeviceCallback; -import org.team199.wpiws.interfaces.TriConsumer; @RunWith(Enclosed.class) public class SimDeviceSimTest { diff --git a/src/test/java/org/team199/wpiws/interfaces/TriConsumer.java b/src/test/java/org/carlmontrobotics/wpiws/interfaces/TriConsumer.java similarity index 92% rename from src/test/java/org/team199/wpiws/interfaces/TriConsumer.java rename to src/test/java/org/carlmontrobotics/wpiws/interfaces/TriConsumer.java index e3c1444..155b39b 100644 --- a/src/test/java/org/team199/wpiws/interfaces/TriConsumer.java +++ b/src/test/java/org/carlmontrobotics/wpiws/interfaces/TriConsumer.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a function that accepts three arguments and does not return a value. diff --git a/src/test/java/org/team199/wpiws/interfaces/TriFunction.java b/src/test/java/org/carlmontrobotics/wpiws/interfaces/TriFunction.java similarity index 93% rename from src/test/java/org/team199/wpiws/interfaces/TriFunction.java rename to src/test/java/org/carlmontrobotics/wpiws/interfaces/TriFunction.java index 2e1e07e..d67768e 100644 --- a/src/test/java/org/team199/wpiws/interfaces/TriFunction.java +++ b/src/test/java/org/carlmontrobotics/wpiws/interfaces/TriFunction.java @@ -1,4 +1,4 @@ -package org.team199.wpiws.interfaces; +package org.carlmontrobotics.wpiws.interfaces; /** * Represents a function that accepts three arguments and returns a value.