ace_doip/payload/
generic_nack.rs1use crate::error::DoipError;
2use ace_macros::FrameCodec;
3
4#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, FrameCodec)]
5#[frame(error = DoipError)]
6pub struct GenericNack {
7 pub nack_code: NackCode,
8}
9
10#[repr(u8)]
11#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, FrameCodec)]
12#[frame(error = DoipError)]
13pub enum NackCode {
14 #[frame(id = 0x00)]
15 IncorrectPatternFormat,
16 #[frame(id = 0x01)]
17 UnknownPayloadType,
18 #[frame(id = 0x02)]
19 MessageTooLarge,
20 #[frame(id = 0x03)]
21 OutOfMemory,
22 #[frame(id = 0x04)]
23 InvalidPayloadLength,
24 #[frame(id_pat = "0x05..=0xFF")]
25 Reserved(u8),
26}