mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
32 lines
739 B
C++
32 lines
739 B
C++
#ifndef CAN_TRANSCEIVE_H
|
|
#define CAN_TRANSCEIVE_H
|
|
|
|
#include <QWidget>
|
|
#include "hex_spinbox.h"
|
|
|
|
namespace Ui {
|
|
class Can_Transceive;
|
|
}
|
|
|
|
class Can_Transceive : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Can_Transceive(QWidget* parent = nullptr);
|
|
~Can_Transceive();
|
|
void enable_can_send_data();
|
|
void clear();
|
|
void add_send_item(uint32_t id, uint8_t dlc, std::array<uint8_t, 8> payload);
|
|
void add_receive_item(uint32_t id, uint8_t dlc, std::array<uint8_t, 8> payload);
|
|
|
|
signals:
|
|
void send_can_message(uint32_t id, uint8_t dlc, std::array<uint8_t, 8> payload);
|
|
void can_clear();
|
|
|
|
private:
|
|
Ui::Can_Transceive* ui;
|
|
std::vector<HexSpinBox*> can_send_hexspinboxes;
|
|
};
|
|
|
|
#endif // CAN_TRANSCEIVE_H
|