message type updates

This commit is contained in:
2026-02-01 16:02:18 -08:00
parent f6e1f13bb5
commit 330c1e5d54
10 changed files with 202 additions and 498 deletions

View File

@@ -1,34 +1,28 @@
#ifndef CONTROLLER_IMPL_H
#define CONTROLLER_IMPL_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
// Server lifecycle
void initServer();
void acceptClient(int clientId);
void sendMessage(int clientId);
int receiveAck(int clientId);
void closeServer();
// Target location protocol functions
// Configuration
int loadTargets(const char* filename, double* targets, int maxClients);
void sendTarget(int clientId, const double* target);
int receiveTargetAck(int clientId);
int waitForReady(int clientId);
void sendFinished(int clientId);
// Parallel wait functions (using select() for simultaneous processing)
int waitForAllTargetAck(int numClients);
int waitForAllReady(int numClients);
int waitForAllRTLComplete(int numClients);
int waitForAllLANDComplete(int numClients);
// RTL and LAND protocol functions
void sendRTL(int clientId);
void sendLAND(int clientId);
// User interaction
void waitForUserInput();
// Binary protocol operations
int sendMessageType(int clientId, int msgType);
int sendTarget(int clientId, const double* coords);
int waitForAllMessageType(int numClients, int expectedType);
#ifdef __cplusplus
}
#endif