migrate fully to freeRTOS

This commit is contained in:
2025-02-15 22:21:19 +01:00
parent 4e94d7ad78
commit c13310d540
22 changed files with 226 additions and 410 deletions
+9 -17
View File
@@ -18,6 +18,9 @@
#include "SAD_DetectedServer.h"
#include <string>
#include <list>
#include "Mutex.hpp"
#include "Semaphore.hpp"
#include "Task.hpp"
static const string SERVERAUTODETECT_PRECODE = "#SAD#";
@@ -25,39 +28,28 @@ static const string SERVERAUTODETECT_SEPERATOR = "#,#";
static const string SERVERAUTODETECT_TASKID = "#spit#";
static const string SERVERAUTODETECT_PORT = "15110";
class SAD_Client {
//----- SAD Client Interface ------
private:
static recursive_mutex s_MutexClientInterface;
static SAD_ClientInterface* s_SADClientInterface;
//----- SAD_Client -----
public:
private:
static mutex s_MutexSAD;
static condition_variable s_ConditionStopSAD;
static fos::Mutex s_MutexSAD;
static fos::Semaphore s_ConditionStopSAD;
static bool s_StopSAD;
static thread* s_ThreadSend;
static thread* s_ThreadReceiveIP4;
static thread* s_ThreadReceiveIP6;
static fos::Task* s_ThreadSend;
static fos::Task* s_ThreadReceiveIP4;
static recursive_mutex s_MutexSocket;
static fos::Mutex s_MutexSocket;
static SPITSocket* s_SPITSocket;
static void sendAutoDetectServer();
static void cycleStart();
static void cycleEnd();
static void sendAutoDetectServer();
static void receiveAutoDetectServer_IP4();
static void receiveAutoDetectServer_IP6();
public:
static void startAutoDetectServer(SAD_ClientInterface* p_SADClientInterface, SPITSocket* p_SPITSocket);