AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
isobus_task_controller_server_options.cpp
Go to the documentation of this file.
1//================================================================================================
8//================================================================================================
10
11namespace isobus
12{
14 {
15 TaskControllerOptions copy = *this;
16 copy.optionDocumentation = supported;
17 return copy;
18 }
19
26
33
35 {
36 TaskControllerOptions copy = *this;
37 copy.optionPeerControlAssignment = supported;
38 return copy;
39 }
40
42 {
43 TaskControllerOptions copy = *this;
44 copy.optionImplementSectionControl = supported;
45 return copy;
46 }
47
49 bool supportsDocumentation,
50 bool supportsTCGEOWithoutPositionBasedControl,
51 bool supportsTCGEOWithPositionBasedControl,
52 bool supportsPeerControlAssignment,
53 bool supportsImplementSectionControl)
54 {
55 optionDocumentation = supportsDocumentation;
56 optionTCGEOWithoutPositionBasedControl = supportsTCGEOWithoutPositionBasedControl;
57 optionTCGEOWithPositionBasedControl = supportsTCGEOWithPositionBasedControl;
58 optionPeerControlAssignment = supportsPeerControlAssignment;
59 optionImplementSectionControl = supportsImplementSectionControl;
60 }
61
63 {
64 return static_cast<std::uint8_t>(optionDocumentation) |
65 static_cast<std::uint8_t>(optionTCGEOWithoutPositionBasedControl << 1) |
66 static_cast<std::uint8_t>(optionTCGEOWithPositionBasedControl << 2) |
67 static_cast<std::uint8_t>(optionPeerControlAssignment << 3) |
68 static_cast<std::uint8_t>(optionImplementSectionControl << 4);
69 }
70} // namespace isobus
A helper class to assign TC server options. You can use this by doing something like this: TaskContro...
bool optionTCGEOWithPositionBasedControl
Bit 2, defines whether or not the TC supports tc-geo with position based control.
bool optionPeerControlAssignment
Bit 3, defines whether or not the TC supports peer control assignment.
bool optionDocumentation
Bit 0, defines whether or not the TC supports documentation.
void set_settings(bool supportsDocumentation, bool supportsTCGEOWithoutPositionBasedControl, bool supportsTCGEOWithPositionBasedControl, bool supportsPeerControlAssignment, bool supportsImplementSectionControl)
Sets the settings object to the provided options bitfield.
TaskControllerOptions with_implement_section_control(bool supported=true) const
Alters the settings object to indicate you want to support implement section control.
TaskControllerOptions with_tc_geo_without_position_based_control(bool supported=true) const
Alters the settings object to indicate you want to support tc-geo without position based control.
TaskControllerOptions with_peer_control_assignment(bool supported=true) const
Alters the settings object to indicate you want to support peer control assignment.
bool optionTCGEOWithoutPositionBasedControl
Bit 1, defines whether or not the TC supports tc-geo without position based control.
bool optionImplementSectionControl
Bit 4, defines whether or not the TC supports implement section control.
TaskControllerOptions with_documentation(bool supported=true)
Alters the settings object to indicate you want to support documentation.
TaskControllerOptions with_tc_geo_with_position_based_control(bool supported=true) const
Alters the settings object to indicate you want to support tc-geo with position based control.
std::uint8_t get_bitfield() const
Gets the options bitfield that was set by the user.
Defines a helper class to assign TC server options.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...