data library

The data library.

This library defines any data types needed by the rest of the app. While the data classes may have methods, the logic within should be simple, and any broad logic that changes state should happen in the models library.

This library should be the bottom of the dependency graph, meaning that no file included in this library should import any other library.

Classes

AntennaControlMode
/ How the antenna is being controller.
AntennaFirmwareCommand
AntennaFirmwareData
ArmCommand
ArmData
ArmMetrics
Metrics reported by the HREI subsystem about the arm. Does not include the gripper.
ArmSettings
Settings relating to the arm.
AutonomyCommand
AutonomyData
AutonomyState
AutonomyTask
BaseStationCommand
/ Command to control the movement of the MARS antenna. / / This command has two modes: manual operation or rover tracking. / - When tracking the rover, any GPS signals received by the rover or the base station's internal / GPS will cause it to re-calculate an orientation that ideally faces the rover. In this mode, / manual commands are ignored. / - When in manual mode, all GPS data is ignored and the motor is only moved when the Dashboard / sends a command with a manualCommand payload. / / When tracking the rover, the Dashboard can override either the base station or rover's position / for testing and debugging. When a new position override is received, the base station will: / - calculate the antenna orientation as if the rover were at this position / - send an AntennaFirmwareCommand for this position / - immediately set the mode to AntennaControlMode.MANUAL_CONTROL to hold the position
BaseStationData
BoolState
BurtLog
BurtLogLevel
CameraDetails
/ Details about a specific camera.
CameraName
CameraStatus
CarouselCommand
/ A command for the carousel and funnel to follow.
Connect
Used for a simple handshake between devices.
Coordinates
DashboardSettings
Settings related to the dashboard itself, not the rover.
Device
Disconnect
Notifies the recipient that the sender will no longer be connected.
DriveCommand
DriveData
DriveMetrics
Metrics reported by the drive subsystem.
EasterEggsSettings
Settings relating to easter eggs.
GpsCoordinates
GripperCommand
GripperData
GripperMetrics
Metrics about the gripper on the HREI subsystem.
MetricLine
Class to construct a Metric
Metrics<T extends Message>
A readout of metrics reported by one of the rover's subsystems.
MotorCommand
MotorData
MotorDirection
NetworkSettings
Settings related to network configuration.
Orientation
PositionMetrics
Metrics about the rover's position and orientation.
ProtoColor
PumpState
/ The state of a pump. If undefined: don't do anything. If fill: turn on, wait, then turn off.
RoverPosition
RoverStatus
/ Changes the way the rover listens to incoming commands. / / - When IDLE, all subsystems will ignore all commands / - When MANUAL, all subsystems will accept all commands / - When AUTONOMOUS, the rover will ignore commands from the dashboard
SampleData
Stores all the readings of one sensor for one sample.
ScienceCommand
/ A command to the science subsystem.
ScienceData
/ Data coming from the science subsystem.
ScienceMetrics
Metrics reported by the science subsystem.
ScienceSensor
A sensor in the science subsystem.
ScienceSettings
Settings relating to science.
ScienceState
/ The state of the science subsystem. If not COLLECT_DATA, don't stream data at all.
SensorReading
A sensor reading with a timestamp.
ServoState
/ The state of a servo. If undefined, don't open or close.
Settings
Contains the settings for running the dashboard and the rover.
SocketInfo
Information about a socket.
TaskbarMessage
A message to show on the taskbar, with an associated severity.
Timestamp
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
UpdateSetting
/ Update a sensitive setting, such as the rover's status. / / This message must be triggered manually and the recipient (usually the subsystems Pi) / must respond with the exact same message to confirm its receipt.
Version
VideoCommand
/ Make changes to a camera feed.
VideoData
/ Reports data about a camera.
ViewPreset
Preset for the dashboard.
VitalsMetrics
Metrics about the vitals of the rover.
WrappedMessage

Enums

OperatingMode
A mode for operating the rover.
RoverType
Which rover-like system to communicate with.
ScienceResult
The result of a science test.
Severity
The level of danger a message represents.
SplitMode
Controls the way the Dashboard views split.

Extensions

AutonomyStateUtils on AutonomyState
Utilities for AutonomyStates.
AutonomyTaskUtils on AutonomyTask
Utilities for AutonomyTasks.
BoolUtils on BoolState
Helpful methods on BoolStates.
CameraNameUtils on CameraName
Extensions for CameraName values.
CameraStatusUtils on CameraStatus
Extensions for CameraStatus values.
CoordinatesUtils on Coordinates
Extensions for Coordinates messages.
DateTimeTimestamp on DateTime
Helpful extensions on DateTimes.
DeviceUtils on Device
Extensions for Device values.
EnumUtils on List<T>
Helpful methods on lists of Protobuf enums.
GeneratedMessageGenericExtensions on T
Extensions on GeneratedMessages.
GpsUtils on GpsCoordinates
Utilities for Gps Coordinates Data
LimitedList on DoubleLinkedQueue<E>
A list that can manage its own length.
LogFormat on BurtLog
Formats BurtLog messages in plain-text. For the UI, use widgets.
LogLevelUtils on BurtLogLevel
More human-friendly fields for BurtLogLevels.
MapRecords on Map<K, V>
Helpful extensions on maps.
MessageUtils on Message
Defines a friendlier method for getting the name of a message.
MotorDirectionUtils on MotorDirection
Utilities for MotorDirections.
NumUtils on double
Helpful utils on doubles.
RoverStatusHumanName on RoverStatus
Gets a user-friendly name for a RoverStatus.
ScienceStateUtils on ScienceState
Utilities for ScienceStates.
SettingsParser on Json
A collection of functions for parsing Settings.
ThemeModeUtils on ThemeMode
Helpful methods on ThemeModes.
TimestampUtils on Timestamp
Utilities for Timestamps.
Unwrapper on WrappedMessage
Decodes a wrapped Protobuf message.
VersionUtils on Version
Helpful methods on Versions.
VideoDataUtils on VideoData
Extensions for VideoData.

Constants

co2 → const ScienceSensor
The co2 sensor.
humidity → const ScienceSensor
The humidity sensor.
sensors → const List<ScienceSensor>
A list of all the sensors on the Science subsystem.
temperature → const ScienceSensor
The temperature sensor.

Functions

co2Test(SampleData data) ScienceResult
The test to determine the presence of life based on CO2 data. The max has to be greater than 10% greater than min for life to exist
getCommandName(Device device) → String
Gets the name of the command message for the given device.
getDataName(Device device) → String
Gets the name of the data message for the given device.
humidityTest(SampleData data) ScienceResult
The test to determine the presence of life based on humidity data.
temperatureTest(SampleData data) ScienceResult
The test to determine the presence of life based on temperature data.

Typedefs

Json = Map<String, dynamic>
JSON data as a map.
Message = GeneratedMessage
A cleaner name for any message generated by Protobuf.
MessageDecoder<T extends Message> = T Function(List<int> data)
A function that decodes a Protobuf messages serialized form.
ScienceTest = ScienceResult Function(SampleData)
A function that determines the presence of life based on sensor data.