Usage Reporting

Format

Not quite sure what happens if the “feature” has a parentheses in it.

BNF

(..ish. Too lazy to make it actually proper)

<extended> ::= ">" | ""
<type> ::= <letter>
<instance> ::= <integer>
<context> ::= <integer>
<feature> ::= <text>

<opt-context> ::= "" | ":" <integer>
<opt-feature> :: "" | "(" <feature> ")"

<entry> ::= <extended> <type> <instance> <opt-context> <opt-feature>
<entry-list> ::= <entry> | <entry> <entry-list>
<report> ::= "V1" <entry-list>

PCRE

(?'extended'>)?(?'type'[A-Za-z])(?'instance'\d+)(?::(?'context'\d+))?(?:\((?'feature'.*?)\))

Entries

Entries with blank instances are either unused, or reported by an external library

Letter Resource Instance Context Feature Comments
A Controller        
B Module        
C Language Language Type      
D CANPlugin        
E Accelerometer Channel   Built-in accelerometer if using the built-in one  
F ADXL345 1: SPI, 2: I2C      
G AnalogChannel Channel      
H AnalogTrigger Channel      
I AnalogTriggerOutput Trigger Index Trigger Type    
J CANJaguar        
K Compressor PCM ID      
L Counter Index Counter Mode    
M Dashboard        
N DigitalInput Channel      
O DigitalOutput Channel      
P DriverStationCIO        
Q DriverStationEIO        
R DriverStationLCD        
S Encoder FPGA Index 0: 1X, 1: 2X, 2: 4X    
T GearTooth Channel   D if direction sensitive. Not used in C++, is just a counter  
U Gyro Channel      
V I2C Device Address      
W Framework Framework Type      
X Jaguar Channel      
Y Joystick Port      
Z Kinect        
a KinectStick        
b PIDController Instance num (starting at 1)      
c Preferences 0      
d PWM Channel      
e Relay Channel, (+128 if reversable)      
f RobotDrive Num Motors Drive Type    
g SerialPort 0      
h Servo Channel      
i Solenoid Channel      
j SPI Instance num (starting at 1)      
k Task        
l Ultrasonic Channel      
m Victor Channel      
n Button        
o Command 1 (kCommandScheduler)      
p AxisCamera Handle      
q PCVideoServer Handle      
r SmartDashboard 0      
s Talon Channel      
t HiTechnicColorSensor        
u HiTechnicAccel        
v HiTechnicCompass        
w x SRF08 AnalogOutput Channel      
y z VictorSP PWMTalonSRX Channel Channel      
>A CANTalonSRX Device ID + 1      
>B ADXL362 SPI Port      
>C ADXRS450 SPI Port      
>D RevSPARK Channel      
>E MindsensorsSD540 Channel      
>F DigitalFilter Channel      
>G ADIS16448        
>H PDP        
>I PCM        
>J PigeonIMU Device ID + 1      
>K NidecBrushless Channel      
>L CANifier Device ID + 1      
>M CTRE_future0 Talon device ID + 1     Pigeon IMU via Talon SRX
>N CTRE_future1 Device ID + 1     Victor SPX
>O CTRE_future2 Device ID + 1     WPI_TalonSRX
>P CTRE_future3 Device ID + 1     WPI_VictorSPX
>Q CTRE_future4        
>R CTRE_future5        
>S CTRE_future6        

Language

ID Language
1 LabVIEW
2 CPlusPlus
3 Java
4 Python
5 DotNet

Trigger Type

ID Type
0 InWindow
1 State
2 RisingPulse
3 FallingPulse

Counter Mode

ID Mode
0 TwoPulse
1 Semiperiod
2 PulseLength
3 ExternalDirection

Framework

ID Framework
1 Iterative
2 Simple
3 CommandControl

Robot Drive Type

ID Type
1 ArcadeStandard
2 ArcadeButtonSpin
3 ArcadeRatioCurve
4 Tank
5 MecanumPolar
6 MecanumCartesian

SPI Port

ID Port
0 OnboardCS0
1 OnboardCS1
2 OnboardCS2
3 OnboardCS3
4 MXP

Example

V1K0N0Y0c0i0q0r0N1W1Y1b1i1j1o1q1C2i2i3A4>A31>O31>A32>O32>A33>O33>A34>O34>A35>O35>A36>O36f2:1S0:2

Entry Description
V1 Magic String? (Not an I2C at least)
K0 Compressor (PCM 0)
N0 Digital Input (Channel 0)
Y0 Joystick (Port 0)
c0 Preferences
i0 Solenoid (Channel 0)
q0 PCVideoServer (Handle 0)
r0 SmartDashboard
N1 Digital Input (Channel 1)
W1 Framework (Iterative)
Y1 Joystick (Port 1)
b1 PID Controller (#1)
i1 Solenoid (Channel 1)
j1 SPI (#1)
o1 Command
q1 PCVideoServer (Handle 1)
C2 Language (C++)
i2 Solenoid (Channel 2)
i3 Solenoid (Channel 3)
A4 Controller (RoboRIO probably)
>A31 CANTalonSRX (ID 31)
>O31 CTRE_future2 (ID 31)
>A32 CANTalonSRX (ID 32)
>O32 CTRE_future2 (ID 32)
>A33 CANTalonSRX (ID 33)
>O33 CTRE_future2 (ID 33)
>A34 CANTalonSRX (ID 34)
>O34 CTRE_future2 (ID 34)
>A35 CANTalonSRX (ID 35)
>O35 CTRE_future2 (ID 35)
>A36 CANTalonSRX (ID 36)
>O36 CTRE_future2 (ID 36)
f2:1 Robot Drive (2 motors, ArcadeStandard)
S0:2 Encoder (FPGA Index 0, 4X)