001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) FIRST 2016-2017. All Rights Reserved. */ 003/* Open Source Software - may be modified and shared by FRC teams. The code */ 004/* must be accompanied by the FIRST BSD license file in the root directory of */ 005/* the project. */ 006/*----------------------------------------------------------------------------*/ 007 008package edu.wpi.first.wpilibj.hal; 009 010/** 011 * JNI wrapper for library <b>FRC_NetworkCommunication</b><br>. 012 */ 013@SuppressWarnings("MethodName") 014public class FRCNetComm extends JNIWrapper { 015 /** 016 * Module type from LoadOut.h 017 */ 018 @SuppressWarnings("TypeName") 019 public interface tModuleType { 020 int kModuleType_Unknown = 0x00; 021 int kModuleType_Analog = 0x01; 022 int kModuleType_Digital = 0x02; 023 int kModuleType_Solenoid = 0x03; 024 } 025 026 /** 027 * Target class from LoadOut.h 028 */ 029 @SuppressWarnings("TypeName") 030 public interface tTargetClass { 031 int kTargetClass_Unknown = 0x00; 032 int kTargetClass_FRC1 = 0x10; 033 int kTargetClass_FRC2 = 0x20; 034 int kTargetClass_FRC3 = 0x30; 035 int kTargetClass_RoboRIO = 0x40; 036 int kTargetClass_FRC2_Analog = kTargetClass_FRC2 | tModuleType.kModuleType_Analog; 037 int kTargetClass_FRC2_Digital = kTargetClass_FRC2 | tModuleType.kModuleType_Digital; 038 int kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | tModuleType.kModuleType_Solenoid; 039 int kTargetClass_FamilyMask = 0xF0; 040 int kTargetClass_ModuleMask = 0x0F; 041 } 042 043 /** 044 * Resource type from UsageReporting.h 045 */ 046 @SuppressWarnings("TypeName") 047 public interface tResourceType { 048 int kResourceType_Controller = 0; 049 int kResourceType_Module = 1; 050 int kResourceType_Language = 2; 051 int kResourceType_CANPlugin = 3; 052 int kResourceType_Accelerometer = 4; 053 int kResourceType_ADXL345 = 5; 054 int kResourceType_AnalogChannel = 6; 055 int kResourceType_AnalogTrigger = 7; 056 int kResourceType_AnalogTriggerOutput = 8; 057 int kResourceType_CANJaguar = 9; 058 int kResourceType_Compressor = 10; 059 int kResourceType_Counter = 11; 060 int kResourceType_Dashboard = 12; 061 int kResourceType_DigitalInput = 13; 062 int kResourceType_DigitalOutput = 14; 063 int kResourceType_DriverStationCIO = 15; 064 int kResourceType_DriverStationEIO = 16; 065 int kResourceType_DriverStationLCD = 17; 066 int kResourceType_Encoder = 18; 067 int kResourceType_GearTooth = 19; 068 int kResourceType_Gyro = 20; 069 int kResourceType_I2C = 21; 070 int kResourceType_Framework = 22; 071 int kResourceType_Jaguar = 23; 072 int kResourceType_Joystick = 24; 073 int kResourceType_Kinect = 25; 074 int kResourceType_KinectStick = 26; 075 int kResourceType_PIDController = 27; 076 int kResourceType_Preferences = 28; 077 int kResourceType_PWM = 29; 078 int kResourceType_Relay = 30; 079 int kResourceType_RobotDrive = 31; 080 int kResourceType_SerialPort = 32; 081 int kResourceType_Servo = 33; 082 int kResourceType_Solenoid = 34; 083 int kResourceType_SPI = 35; 084 int kResourceType_Task = 36; 085 int kResourceType_Ultrasonic = 37; 086 int kResourceType_Victor = 38; 087 int kResourceType_Button = 39; 088 int kResourceType_Command = 40; 089 int kResourceType_AxisCamera = 41; 090 int kResourceType_PCVideoServer = 42; 091 int kResourceType_SmartDashboard = 43; 092 int kResourceType_Talon = 44; 093 int kResourceType_HiTechnicColorSensor = 45; 094 int kResourceType_HiTechnicAccel = 46; 095 int kResourceType_HiTechnicCompass = 47; 096 int kResourceType_SRF08 = 48; 097 int kResourceType_AnalogOutput = 49; 098 int kResourceType_VictorSP = 50; 099 int kResourceType_TalonSRX = 51; 100 int kResourceType_CANTalonSRX = 52; 101 int kResourceType_ADXL362 = 53; 102 int kResourceType_ADXRS450 = 54; 103 int kResourceType_RevSPARK = 55; 104 int kResourceType_MindsensorsSD540 = 56; 105 int kResourceType_DigitalFilter = 57; 106 } 107 108 /** 109 * Instances from UsageReporting.h 110 */ 111 @SuppressWarnings("TypeName") 112 public interface tInstances { 113 int kLanguage_LabVIEW = 1; 114 int kLanguage_CPlusPlus = 2; 115 int kLanguage_Java = 3; 116 int kLanguage_Python = 4; 117 118 int kCANPlugin_BlackJagBridge = 1; 119 int kCANPlugin_2CAN = 2; 120 121 int kFramework_Iterative = 1; 122 int kFramework_Simple = 2; 123 int kFramework_CommandControl = 3; 124 125 int kRobotDrive_ArcadeStandard = 1; 126 int kRobotDrive_ArcadeButtonSpin = 2; 127 int kRobotDrive_ArcadeRatioCurve = 3; 128 int kRobotDrive_Tank = 4; 129 int kRobotDrive_MecanumPolar = 5; 130 int kRobotDrive_MecanumCartesian = 6; 131 132 int kDriverStationCIO_Analog = 1; 133 int kDriverStationCIO_DigitalIn = 2; 134 int kDriverStationCIO_DigitalOut = 3; 135 136 int kDriverStationEIO_Acceleration = 1; 137 int kDriverStationEIO_AnalogIn = 2; 138 int kDriverStationEIO_AnalogOut = 3; 139 int kDriverStationEIO_Button = 4; 140 int kDriverStationEIO_LED = 5; 141 int kDriverStationEIO_DigitalIn = 6; 142 int kDriverStationEIO_DigitalOut = 7; 143 int kDriverStationEIO_FixedDigitalOut = 8; 144 int kDriverStationEIO_PWM = 9; 145 int kDriverStationEIO_Encoder = 10; 146 int kDriverStationEIO_TouchSlider = 11; 147 148 int kADXL345_SPI = 1; 149 int kADXL345_I2C = 2; 150 151 int kCommand_Scheduler = 1; 152 153 int kSmartDashboard_Instance = 1; 154 } 155}