Files
github-actions[bot] 0e51ecbb7e sunnypilot v2026.09.09-4864
version: sunnypilot v2026.003.000 (dev)
date: 2026-09-09T15:43:49
master commit: b255314f5a
2026-09-09 15:43:49 +00:00

26 lines
566 B
C++

#pragma once
#include "tools/cabana/streams/livestream.h"
struct SocketCanStreamConfig {
std::string device = ""; // TODO: support multiple devices/buses at once
};
class SocketCanStream : public LiveStream {
public:
SocketCanStream(SocketCanStreamConfig config_ = {});
~SocketCanStream();
static bool available();
inline std::string routeName() const override {
return "Live Streaming From Socket CAN " + config.device;
}
protected:
void streamThread() override;
bool connect();
SocketCanStreamConfig config = {};
int sock_fd = -1;
};