WebServerWorker
-
class WebServerWorker : public Worker
The threaded webserver which serves a simple MJPEG stream of all annotated camera images to clients. Runs on t he host machine at 0.0.0.0:8080.
Public Functions
-
WebServerWorker(WebServerWorker const&) = delete
No copy constructor.
-
explicit WebServerWorker(unsigned short port)
Setup the worker thread and instantiate the Mongoose server manager.
- Parameters:
port – The port that the webserver binds to.
-
bool RegisterMatFunc(const std::function<cv::Mat()> &mat_func)
Register the callback function which grabs the latest annotated camera image. All registered functions will be called once an Execute cycle to acquire new camera data.
- Parameters:
mat_func – The callback function to execute to acquire fresh camera images.
- Returns:
true if registration succeeds, false otherwise.
-
bool RegisterRobotPoseFunc(const std::function<RobotPose()> &pose_func)
Register the callback function which grabs the latest robot pose. This function will be called once an Execute cycle to acquire new pose data.
- Parameters:
mat_func – The callback function to execute to acquire the latest robot pose.
- Returns:
true if registration succeeds, false otherwise.
-
WebServerWorker(WebServerWorker const&) = delete