|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Go to the source code of this file.
Enumerations | |
| enum class | BoardState { inactive , active , disconnected , abort , abortDone } |
Functions | |
| void | sendHeartbeat (int boardID, BoardState boardState, std::string destination) |
| bool | serverHeartbeatReceived () |
| bool | configPacketReceived () |
| void | storeAddress () |
| void | delay (int ms) |
| bool | heartbeatTimedOut (int currTime, int lastHeartbeatTime) |
| bool | testConnection () |
| void | streamPackets () |
| void | provideAbortData (BoardState boardState, int boardID, int IPAddress, std::string destination) |
| void | abortFinish (BoardState myBoardState, int boardID) |
| void | broadcastConnectionLoss () |
| void | ping () |
| bool | responseReceived () |
| bool | abortDonePacketReceived () |
| void | executeCommands () |
| bool | connectionResume () |
| std::string | serverPacket () |
| int | main (int argc, char **argv) |
| void | setup () |
| void | mainloop (BoardState myBoardState, int boardID) |
| void | connectionLoss (BoardState myBoardState, int boardID) |
| void | standardAbort (BoardState myBoardState, int boardID) |
| void | noConnectionAbort (BoardState myBoardState, int boardID) |
Variables | |
| static bool | serverHeartbeat = true |
| static bool | configPacket = true |
| int | boardID = 1234 |
| static const std::string | SERVER_ADDRESS = "SERVER_ADDRESS" |
| static const std::string | ACTUATOR_CONTROLLER_ADDRESS |
| const int | IPAddress = 0 |
| const bool | necessaryForAbort = true |
| const std::string | ABORT = "ABORT" |
| BoardState | myBoardState = BoardState::inactive |
|
strong |
| Enumerator | |
|---|---|
| inactive | |
| active | |
| disconnected | |
| abort | |
| abortDone | |
Definition at line 14 of file actuator_nc.cpp.
| bool abortDonePacketReceived | ( | ) |
Definition at line 65 of file actuator_nc.cpp.
Referenced by noConnectionAbort(), and standardAbort().
| void abortFinish | ( | BoardState | myBoardState, |
| int | boardID ) |
Definition at line 47 of file actuator_nc.cpp.
References abortDone, boardID, mainloop(), myBoardState, sendHeartbeat(), and SERVER_ADDRESS.
Referenced by connectionLoss(), noConnectionAbort(), and standardAbort().
| void broadcastConnectionLoss | ( | ) |
Definition at line 53 of file actuator_nc.cpp.
Referenced by connectionLoss().
| bool configPacketReceived | ( | ) |
| void connectionLoss | ( | BoardState | myBoardState, |
| int | boardID ) |
Definition at line 132 of file actuator_nc.cpp.
References abort, abortFinish(), ACTUATOR_CONTROLLER_ADDRESS, boardID, broadcastConnectionLoss(), CONNECTION_LOSS_GRACE_MS, connectionResume(), disconnected, mainloop(), MAINLOOP_POLL_INTERVAL_MS, myBoardState, noConnectionAbort(), ping(), provideAbortData(), and responseReceived().
Referenced by mainloop(), and standardAbort().
| bool connectionResume | ( | ) |
Definition at line 74 of file actuator_nc.cpp.
Referenced by connectionLoss().
| void delay | ( | int | ms | ) |
Definition at line 30 of file actuator_nc.cpp.
Referenced by solenoids::Abort(), autoPolarityCal(), QwDevISM330DHCX::calibrateBiases(), checkMagnetPresence(), checkMagnetPresence(), configureADC(), StarOTA::Server::handleClient(), init_adc_cb(), loop(), SensorHotfire::loop(), noConnectionAbort(), osDelayUntil(), solenoids::pulseBlocking(), SensorSelfTest::read_sensor_bias(), StarOTA::Server::readSize(), run_NoConnectionAbort(), SensorSelfTest::sensor_bias_enable(), Adafruit_LIS3DH::setPerformanceMode(), Adafruit_LIS3DH::setRange(), SensorHotfire::setup(), setup(), setup(), standardAbort(), startHeartbeatLoop(), StarOTA::Server::transfer(), solenoids::ventAll(), solenoids::ventTanks(), sequencer::AbortBroadcaster::waitAndSendAbortDone(), and writeControlBit().
| void executeCommands | ( | ) |
Definition at line 71 of file actuator_nc.cpp.
Referenced by noConnectionAbort().
| bool heartbeatTimedOut | ( | int | currTime, |
| int | lastHeartbeatTime ) |
Definition at line 33 of file actuator_nc.cpp.
References HEARTBEAT_TIMEOUT_MS.
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 83 of file actuator_nc.cpp.
References boardID, mainloop(), myBoardState, and setup().
| void mainloop | ( | BoardState | myBoardState, |
| int | boardID ) |
Definition at line 118 of file actuator_nc.cpp.
References ABORT, boardID, connectionLoss(), heartbeatTimedOut(), myBoardState, sendHeartbeat(), SERVER_ADDRESS, serverPacket(), standardAbort(), storeAddress(), and streamPackets().
Referenced by abortFinish(), connectionLoss(), main(), and smart_calibration_gui.SmartCalibrationGUI::run().
| void noConnectionAbort | ( | BoardState | myBoardState, |
| int | boardID ) |
Definition at line 181 of file actuator_nc.cpp.
References abort, abortDonePacketReceived(), abortFinish(), boardID, delay(), executeCommands(), HEARTBEAT_SEND_INTERVAL_MS, myBoardState, and responseReceived().
Referenced by connectionLoss().
| void ping | ( | ) |
Definition at line 57 of file actuator_nc.cpp.
Referenced by connectionLoss().
| void provideAbortData | ( | BoardState | boardState, |
| int | boardID, | ||
| int | IPAddress, | ||
| std::string | destination ) |
Definition at line 43 of file actuator_nc.cpp.
References boardID, and boardState.
Referenced by connectionLoss().
| bool responseReceived | ( | ) |
Definition at line 60 of file actuator_nc.cpp.
Referenced by connectionLoss(), and noConnectionAbort().
| void sendHeartbeat | ( | int | boardID, |
| BoardState | boardState, | ||
| std::string | destination ) |
Definition at line 17 of file actuator_nc.cpp.
References boardID, and boardState.
| bool serverHeartbeatReceived | ( | ) |
| std::string serverPacket | ( | ) |
| void setup | ( | void | ) |
Definition at line 96 of file actuator_nc.cpp.
References active, boardID, configPacketReceived(), delay(), HEARTBEAT_SEND_INTERVAL_MS, inactive, MAINLOOP_POLL_INTERVAL_MS, myBoardState, sendHeartbeat(), SERVER_ADDRESS, serverHeartbeatReceived(), and storeAddress().
Referenced by main().
| void standardAbort | ( | BoardState | myBoardState, |
| int | boardID ) |
Definition at line 163 of file actuator_nc.cpp.
References abort, abortDonePacketReceived(), abortFinish(), boardID, connectionLoss(), delay(), HEARTBEAT_SEND_INTERVAL_MS, heartbeatTimedOut(), myBoardState, sendHeartbeat(), and SERVER_ADDRESS.
Referenced by mainloop().
| void storeAddress | ( | ) |
Definition at line 27 of file actuator_nc.cpp.
Referenced by mainloop(), and setup().
| void streamPackets | ( | ) |
Definition at line 40 of file actuator_nc.cpp.
Referenced by mainloop().
| bool testConnection | ( | ) |
Definition at line 36 of file actuator_nc.cpp.
| const std::string ABORT = "ABORT" |
Definition at line 13 of file actuator_nc.cpp.
Referenced by mainloop(), and serverPacket().
|
static |
Definition at line 9 of file actuator_nc.cpp.
Referenced by connectionLoss().
| int boardID = 1234 |
Definition at line 7 of file actuator_nc.cpp.
Referenced by abortFinish(), connectionLoss(), main(), mainloop(), noConnectionAbort(), provideAbortData(), sendHeartbeat(), setup(), and standardAbort().
|
static |
Definition at line 6 of file actuator_nc.cpp.
Referenced by configPacketReceived().
| const int IPAddress = 0 |
Definition at line 11 of file actuator_nc.cpp.
Referenced by EthernetClass::begin(), loop(), SensorHotfire::loop(), pollNetwork(), BoardNet::recoveryAddress(), BoardNet::recoverySubnet(), EthernetClass::reset(), SensorHotfire::setup(), setup(), test_board_id_is_the_assigned_address(), test_learning_a_server_never_moves_our_address(), test_recovery_address_formula(), test_retry_that_gets_a_lease_moves_the_board(), test_server_is_learned_from_its_packets(), and uint32ToIPAddress().
| BoardState myBoardState = BoardState::inactive |
Definition at line 15 of file actuator_nc.cpp.
Referenced by abortFinish(), connectionLoss(), main(), mainloop(), noConnectionAbort(), setup(), and standardAbort().
| const bool necessaryForAbort = true |
Definition at line 12 of file actuator_nc.cpp.
|
static |
Definition at line 8 of file actuator_nc.cpp.
Referenced by abortFinish(), mainloop(), setup(), and standardAbort().
|
static |
Definition at line 5 of file actuator_nc.cpp.
Referenced by serverHeartbeatReceived().