SSP21-CPP
LinkConstants.h
1 #ifndef SSP21_LINKCONSTANTS_H
2 #define SSP21_LINKCONSTANTS_H
3 
4 #include <cstdint>
5 
6 namespace ssp21
7 {
8  /**
9  * @brief Useful constants
10  */
11  namespace consts
12  {
13  /**
14  * @brief Link-layer constants.
15  */
16  namespace link
17  {
18  /**
19  * Link-layer first sync byte value.
20  */
21  const uint8_t sync1 = 0x07;
22  /**
23  * Link-layer second sync byte value.
24  */
25  const uint8_t sync2 = 0xAA;
26  /**
27  * Link-layer maximum payload size.
28  */
29  const uint16_t max_config_payload_size = 4092;
30  /**
31  * Length of CRCs.
32  */
33  const uint16_t crc_size = 4;
34  /**
35  * Link-layer header length (with sync bytes, without CRC).
36  */
37  const uint16_t header_fields_size = 8;
38  /**
39  * Link-layer header total length.
40  */
42  /**
43  * Link-layer minimum frame length.
44  */
46  /**
47  * Link-layer maximum frame length.
48  */
50 
51  /**
52  * Default link-layer local address.
53  */
54  const uint16_t default_responder_local_address = 1;
55  /**
56  * Default link-layer remote address.
57  */
58  const uint16_t default_responder_remote_address = 10;
59  }
60  }
61 }
62 
63 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12