2025-12-23 17:21:44 -06:00
|
|
|
#ifndef SOCKETIO_HPP
|
|
|
|
|
#define SOCKETIO_HPP
|
|
|
|
|
#include <atomic>
|
|
|
|
|
|
2026-01-08 18:14:36 -06:00
|
|
|
extern std::atomic<bool> statusResolved;
|
2025-12-23 17:21:44 -06:00
|
|
|
extern std::atomic<bool> connected;
|
|
|
|
|
|
|
|
|
|
// Initialize Socket.IO client and connect to server
|
|
|
|
|
void initSocketIO();
|
|
|
|
|
|
2025-12-24 18:39:21 -06:00
|
|
|
// Stop and destroy Socket.IO client
|
|
|
|
|
void stopSocketIO();
|
|
|
|
|
|
2025-12-28 20:52:11 -06:00
|
|
|
// Emit calibration stage events to server
|
2025-12-31 15:44:48 -06:00
|
|
|
void emitCalibStatus(bool calibrated, int port = 1);
|
2025-12-28 20:52:11 -06:00
|
|
|
void emitCalibStage1Ready(int port = 1);
|
|
|
|
|
void emitCalibStage2Ready(int port = 1);
|
|
|
|
|
void emitCalibDone(int port = 1);
|
2025-12-31 15:44:48 -06:00
|
|
|
void emitCalibError(const char* errorMessage, int port = 1);
|
|
|
|
|
void emitPosHit(int pos, int port = 1);
|
2025-12-23 17:21:44 -06:00
|
|
|
|
|
|
|
|
#endif // SOCKETIO_HPP
|