mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-05 13:47:05 -04:00
42 lines
932 B
C++
42 lines
932 B
C++
/*
|
|
* @file CommunicationMuxChannel.hpp
|
|
* @author Mateusz Piesta (mateusz.piesta@mudita.com)
|
|
* @date 28.06.19
|
|
* @brief
|
|
* @copyright Copyright (C) 2019 mudita.com
|
|
* @details
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PUREPHONE_COMMUNICATIONMUXCHANNEL_HPP
|
|
#define PUREPHONE_COMMUNICATIONMUXCHANNEL_HPP
|
|
|
|
#include "MuxChannel.hpp"
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
#include "mutex.hpp"
|
|
|
|
class InOutSerialWorker;
|
|
|
|
class CommunicationMuxChannel : public MuxChannel {
|
|
public:
|
|
|
|
CommunicationMuxChannel(InOutSerialWorker* inout);
|
|
~CommunicationMuxChannel();
|
|
|
|
|
|
|
|
int ParseInputData(uint8_t* data, size_t size) override final;
|
|
std::vector<std::string> SendCommandReponse(const char* cmd,size_t rxCount,uint32_t timeout = 1000);
|
|
|
|
private:
|
|
std::string responseBuffer;
|
|
TaskHandle_t blockedTaskHandle = nullptr;
|
|
cpp_freertos::MutexStandard mutex;
|
|
InOutSerialWorker* inout;
|
|
};
|
|
|
|
|
|
#endif //PUREPHONE_COMMUNICATIONMUXCHANNEL_HPP
|