blob: c9880594cbe82ca81a977bead885cd1e3d345d70 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef ISO_TP_MESSAGE
#define ISO_TP_MESSAGE
#include <ostream>
#include "frame.h"
class Message {
unsigned int can_id;
unsigned int size;
unsigned int received;
unsigned char* msg;
public:
Message() = default;
Message(unsigned int can_id, const Frame& first_frame);
Message(const Message& rhs);
~Message() {
delete[] this->msg;
}
void receive_frame(const Frame& f);
bool expects_more_frames() const;
friend std::ostream& operator<<(std::ostream& os, const Message& m);
};
std::ostream& operator<<(std::ostream& os, const Message& m);
#endif /* ISO_TP_MESSAGE */
|