Add Socket Support
This commit is contained in:
31
ImageManager.hpp
Normal file
31
ImageManager.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef ImageManager_H
|
||||
#define ImageManager_H
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include <QUdpSocket>
|
||||
#include "FaultManager.hpp"
|
||||
|
||||
#define THROTTLE_AMOUNT 1
|
||||
|
||||
class ImageManager
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
bool ProcessImage(uint32_t width, uint32_t height, uint8_t *imgPointer, FaultManager fault_mgr, bool test);
|
||||
void SendImage(cv::Mat image);
|
||||
|
||||
QUdpSocket *socket;
|
||||
|
||||
ImageManager() {
|
||||
socket = new QUdpSocket();
|
||||
socket->connectToHost(QHostAddress::LocalHost, 40000, QIODevice::ReadWrite);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
int throttle_count = 1;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user