-
Notifications
You must be signed in to change notification settings - Fork 4
/
BusConfig.hpp
43 lines (36 loc) · 970 Bytes
/
BusConfig.hpp
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
32
33
34
35
36
37
38
39
40
41
42
43
namespace PjonHL
{
/// Struct representing a PJON bus configuration. All participants in a network
/// should have the same configuration.
/// You can optionally pass an instance of the BusConfig into the PjonHL constructor.
/// All config options will be forwarded to the PJON backend.
/// For detailed documentation please have a look at the PJON protocol spec.
struct BusConfig
{
enum class BusTopology
{
Local,
Shared
};
enum class AckType
{
AckEnabled,
AckDisabled
};
enum class CommunicationMode
{
Simplex,
HalfDuplex
};
enum class CrcType
{
Crc8,
Crc32
};
BusTopology busTopology = BusTopology::Local;
CommunicationMode communicationMode = CommunicationMode::HalfDuplex;
AckType ackType = AckType::AckEnabled;
CrcType crcType = CrcType::Crc8;
// Mac not yet suppored
};
}