ardupilot/libraries/AP_HAL_SITL/CAN_Multicast.h
Andrew Tridgell b6e79d05fd HAL_SITL: support multicast UDP for CAN in SITL
this will work on windows and in WSL
2023-08-29 15:09:48 +10:00

25 lines
469 B
C++

/*
multicast UDP transport for SITL CAN
*/
#pragma once
#include "CAN_Transport.h"
#if HAL_NUM_CAN_IFACES
class CAN_Multicast : public CAN_Transport {
public:
bool init(uint8_t instance) override;
bool send(const AP_HAL::CANFrame &frame) override;
bool receive(AP_HAL::CANFrame &frame) override;
int get_read_fd(void) const override {
return fd_in;
}
private:
int fd_in = -1;
int fd_out = -1;
};
#endif // HAL_NUM_CAN_IFACES