LibDS
Qt-based library for controlling FRC robots
Signals | List of all members
DS_Base Class Reference

Defines the base signals of the DriverStation and DS_Config classes. More...

#include <DS_Base.h>

Inheritance diagram for DS_Base:
DS DriverStation DS_Config

Signals

void elapsedTimeChanged (int msecs)
 
void elapsedTimeChanged (const QString &string)
 
void statusChanged (const QString &status)
 
void simulatedChanged (const bool isSimulation)
 
void enabledChanged (const EnableStatus status)
 
void allianceChanged (const Alliance alliance)
 
void positionChanged (const Position position)
 
void codeStatusChanged (const CodeStatus statusChanged)
 
void controlModeChanged (const ControlMode mode)
 
void robotAddressChanged (const QString &address)
 
void radioAddressChanged (const QString &address)
 
void fmsCommStatusChanged (const CommStatus statusChanged)
 
void robotCommStatusChanged (const CommStatus statusChanged)
 
void radioCommStatusChanged (const CommStatus statusChanged)
 
void voltageStatusChanged (const VoltageStatus statusChanged)
 
void operationStatusChanged (const OperationStatus statusChanged)
 
void pdpVersionChanged (const QString &version)
 
void pcmVersionChanged (const QString &version)
 
void libVersionChanged (const QString &version)
 
void voltageChanged (const qreal voltage)
 
void voltageChanged (const QString &voltageString)
 
void teamChanged (const int team)
 
void cpuUsageChanged (const int usage)
 
void ramUsageChanged (const int usage)
 
void diskUsageChanged (const int usage)
 

Additional Inherited Members

- Public Types inherited from DS
enum  ControlMode { kControlTest, kControlAutonomous, kControlTeleoperated }
 Represents the available control modes of the robot. More...
 
enum  Alliance { kAllianceRed, kAllianceBlue }
 Represents the team alliance. More...
 
enum  Position { kPosition1, kPosition2, kPosition3 }
 Represents the different team positions for each alliance. More...
 
enum  CommStatus { kCommsWorking, kCommsFailing }
 Represents the communication status between the client and a target. More...
 
enum  CodeStatus { kCodeRunning, kCodeFailing }
 Represents the status of the robot code. More...
 
enum  EnableStatus { kEnabled, kDisabled }
 Represents the enabled state of the robot. More...
 
enum  OperationStatus { kNormal, kEmergencyStop }
 Represents the operation status of the robot. More...
 
enum  VoltageStatus { kVoltageNormal, kVoltageBrownout }
 Represents the status of the robot power supply. When the battery level is low or there are too many power spikes, the robot may report a voltage brownout. More...
 
enum  SocketType { kSocketTypeUDP, kSocketTypeTCP }
 Represents the socket types that can be used by the DS modules. More...
 
- Static Public Member Functions inherited from DS
static QString getStaticIP (int net, int team, int host)
 Returns a calculated IP address based on the team address. More...
 
static QString timezone ()
 Returns the current timezone as a string.
 
static QByteArray readSocket (QUdpSocket *socket)
 Reads the datagrams received by the given UDP socket.
 
static QByteArray readSocket (QTcpSocket *socket)
 Reads the data received by the given TCP socket.
 

Detailed Description

Defines the base signals of the DriverStation and DS_Config classes.

Member Function Documentation

void DS_Base::allianceChanged ( const Alliance  alliance)
signal

Emitted when the team alliance is changed (be it by client or FMS)

Referenced by DS_Config::updateAlliance().

void DS_Base::codeStatusChanged ( const CodeStatus  statusChanged)
signal

Emitted when the robot code availability is changed

Referenced by DS_Config::updateRobotCodeStatus().

void DS_Base::controlModeChanged ( const ControlMode  mode)
signal

Emitted when the control mode of the robot is changed

Referenced by DS_Config::updateControlMode().

void DS_Base::cpuUsageChanged ( const int  usage)
signal

Emitted when the robot reports a change in the CPU usage of the primary robot controller.

Referenced by DS_Config::updateCpuUsage().

void DS_Base::diskUsageChanged ( const int  usage)
signal

Emitted when the robot reports a change in the disk usage of the primary robot controller.

Referenced by DS_Config::updateDiskUsage().

void DS_Base::elapsedTimeChanged ( int  msecs)
signal

Emitted when the elapsed time since the robot has been enabled is changed.

Note
This signal is emitted periodically
If you want to use this information in the UI, we recommend you to bind to the elapsedTimeChanged(QString) signal, since it already contains a pre-formatted time string with the appropriate time value(s).

Referenced by DS_Config::updateElapsedTime().

void DS_Base::elapsedTimeChanged ( const QString &  string)
signal

Emitted when the elapsed time is calculated again

Note
This signal is emitted periodically
void DS_Base::enabledChanged ( const EnableStatus  status)
signal

Emitted when the robot is enabled or disabled

Referenced by DS_Config::updateEnabled().

void DS_Base::fmsCommStatusChanged ( const CommStatus  statusChanged)
signal

Emitted when the communication status with the FMS (Field Management System) is changed.

Referenced by DS_Config::updateFMSCommStatus().

void DS_Base::libVersionChanged ( const QString &  version)
signal

Emitted when the software version of the robot controller is detected.

Referenced by DS_Config::updateLibVersion().

void DS_Base::operationStatusChanged ( const OperationStatus  statusChanged)
signal

Emitted when the operation status of the robot is changed, for example, when we connect to the robot (changed from kDisconnected to kNormal), or when the robot is emergency stopped (kEmergencyStop).

Referenced by DS_Config::updateOperationStatus().

void DS_Base::pcmVersionChanged ( const QString &  version)
signal

Emitted when the PCM (Pneumatics Control Module) firmware version is detected.

Referenced by DS_Config::updatePcmVersion().

void DS_Base::pdpVersionChanged ( const QString &  version)
signal

Emitted when the PDP (Power Distribution Panel) firmware version is detected.

Referenced by DS_Config::updatePdpVersion().

void DS_Base::positionChanged ( const Position  position)
signal

Emitted when the team position (be it by client or FMS)

Referenced by DS_Config::updatePosition().

void DS_Base::radioAddressChanged ( const QString &  address)
signal

Emitted when the radio address is changed (normally by the user/client).

void DS_Base::radioCommStatusChanged ( const CommStatus  statusChanged)
signal

Emitted when the communication status with the radio is changed

Referenced by DS_Config::updateRadioCommStatus().

void DS_Base::ramUsageChanged ( const int  usage)
signal

Emitted when the robot reports a change in the RAM usage of the primary robot controller.

Referenced by DS_Config::updateRamUsage().

void DS_Base::robotAddressChanged ( const QString &  address)
signal

Emitted when the robot address is changed (be it by the user/client or the library when it discovers the IP address of the robot).

void DS_Base::robotCommStatusChanged ( const CommStatus  statusChanged)
signal

Emitted when the communication status with the robot is changed

Referenced by DS_Config::updateRobotCommStatus().

void DS_Base::simulatedChanged ( const bool  isSimulation)
signal

Emitted when protocol knows if the target robot is simulated or not

Referenced by DS_Config::updateSimulated().

void DS_Base::statusChanged ( const QString &  status)
signal
void DS_Base::teamChanged ( const int  team)
signal

Emitted when the team number is changed

Referenced by DS_Config::updateTeam().

void DS_Base::voltageChanged ( const qreal  voltage)
signal

Emitted when the voltage of the robot is changed

Referenced by DS_Config::updateVoltage().

void DS_Base::voltageChanged ( const QString &  voltageString)
signal

Emitted when the voltage of the robot is changed, the QString is already formatted by the library

void DS_Base::voltageStatusChanged ( const VoltageStatus  statusChanged)
signal

Emitted when the voltage status of the robot is changed, for example, when the robot reports a brownout.

Referenced by DS_Config::updateVoltageStatus().


The documentation for this class was generated from the following file: