-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
This page goes into more detail on how to use BadgerLog
Make a field initialized in constructor or before
Non final
Can be either static or not
Instance keys
Publisher
Subscriber
Sendable
How configuration works
What it does
Unit conversion
Dashboard methods
BadgerLog is designed to use annotations to generate custom NetworkTables wrappers that support some additional functionality. Annotations are the preferred method of using BadgerLog.
Some Notes before starting.
- Fields need to be initialized after the constructor
- Fields can not be final
- Fields can have any access modifier (public, private, protected)
Given this, it is relatively easy to start creating entries.
The base annotation needed to mark a field to have an entry created is the @Entry annotation
Example base usage
@Entry(EntryType.Publisher)
public int basicInteger = 1;Without specifying the key using the @Key annotation, the default is Enclosing Class/Field Name.
In this example, if the class the field was defined in was named ArmSubsystem then the final NetworkTables key would
be ArmSubsystem/basicInteger
The / in the key for NetworkTables specifies that it should use the table underneath the BadgerLog table named
ArmSubsystem and the entry named basicInteger
Javadoc can be found on Jitpack