Defines the base signals of the DriverStation
and DS_Config
classes.
More...
#include <DS_Base.h>
|
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 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.
|
|
Defines the base signals of the DriverStation
and DS_Config
classes.
void DS_Base::allianceChanged |
( |
const Alliance |
alliance | ) |
|
|
signal |
void DS_Base::codeStatusChanged |
( |
const CodeStatus |
statusChanged | ) |
|
|
signal |
void DS_Base::controlModeChanged |
( |
const ControlMode |
mode | ) |
|
|
signal |
void DS_Base::cpuUsageChanged |
( |
const int |
usage | ) |
|
|
signal |
void DS_Base::diskUsageChanged |
( |
const int |
usage | ) |
|
|
signal |
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::fmsCommStatusChanged |
( |
const CommStatus |
statusChanged | ) |
|
|
signal |
void DS_Base::libVersionChanged |
( |
const QString & |
version | ) |
|
|
signal |
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 |
void DS_Base::pdpVersionChanged |
( |
const QString & |
version | ) |
|
|
signal |
void DS_Base::positionChanged |
( |
const Position |
position | ) |
|
|
signal |
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 |
void DS_Base::ramUsageChanged |
( |
const int |
usage | ) |
|
|
signal |
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 |
void DS_Base::simulatedChanged |
( |
const bool |
isSimulation | ) |
|
|
signal |
void DS_Base::statusChanged |
( |
const QString & |
status | ) |
|
|
signal |
void DS_Base::teamChanged |
( |
const int |
team | ) |
|
|
signal |
void DS_Base::voltageChanged |
( |
const qreal |
voltage | ) |
|
|
signal |
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 |
The documentation for this class was generated from the following file: