terminal-web-server/src/terminal_api_driver.h

38 lines
993 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef TERMINAL_API_DRIVER_H
#define TERMINAL_API_DRIVER_H
#include <string>
#include <terminal_api/ControlProtoCInterface.h>
namespace api_driver {
/**
* Это ApiDriver. Все ответы он будет возвращать в виде json.
*/
class ApiDriver {
public:
explicit ApiDriver();
/**
* Запросить общее состояние терминала
* @return {"txState":false,"rxState":false,"rx.sym_sync_lock":false,"rx.freq_search_lock":false,"rx.afc_lock":false,"rx.pkt_sync":false}
*/
std::string loadTerminalState();
/**
* Запросить статистику модулятора, демодулятора, CicC и температурные датчики
* @return
*/
std::string loadDeviceStatistics();
~ApiDriver();
private:
TSID sid{0};
unsigned int access{0};
};
}
#endif //TERMINAL_API_DRIVER_H