AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
A class that defines stack-wide configuration data. You can set the values in there to suit your specific memory constraints. More...
#include <can_network_configuration.hpp>
Public Member Functions | |
CANNetworkConfiguration ()=default | |
The constructor for the configuration object. | |
~CANNetworkConfiguration ()=default | |
The destructor for the configuration object. | |
void | set_max_number_transport_protocol_sessions (std::uint32_t value) |
Configures the max number of concurrent TP sessions to provide a RAM limit for TP sessions. | |
std::uint32_t | get_max_number_transport_protocol_sessions () const |
Returns the max number of concurrent TP sessions. | |
void | set_minimum_time_between_transport_protocol_bam_frames (std::uint32_t value) |
Sets the minimum time to wait between sending BAM frames (default is 50 ms for maximum J1939 compatibility) | |
std::uint32_t | get_minimum_time_between_transport_protocol_bam_frames () const |
Returns the minimum time to wait between sending BAM frames. | |
void | set_number_of_packets_per_dpo_message (std::uint8_t numberFrames) |
Sets the max number of data frames the stack will use when in an ETP session, between EDPO phases. The default is 16. Note that the sending control function may choose to use a lower number of frames. | |
std::uint8_t | get_number_of_packets_per_dpo_message () const |
Returns the max number of data frames the stack will use when in an ETP session, between EDPO phases. The default is 16. Note that the sending control function may choose to use a lower number of frames. | |
void | set_max_number_of_network_manager_protocol_frames_per_update (std::uint8_t numberFrames) |
Sets the max number of data frames the stack will send from each transport layer protocol, per update. The default is 255, but decreasing it may reduce bus load at the expense of transfer time. | |
std::uint8_t | get_max_number_of_network_manager_protocol_frames_per_update () const |
Returns the max number of data frames the stack will send from each transport layer protocol, per update. The default is 255, but decreasing it may reduce bus load at the expense of transfer time. | |
void | set_number_of_packets_per_cts_message (std::uint8_t numberPackets) |
Set the the number of packets per CTS message for TP sessions. The default is 16. Note that the receiving control function may not support this limitation, or choose to ignore it and use a different number of packets per CTS packet. | |
std::uint8_t | get_number_of_packets_per_cts_message () const |
Get the the number of packets per CTS packet for TP sessions. | |
Private Attributes | |
std::uint32_t | maxNumberTransportProtocolSessions = 4 |
The max number of TP sessions allowed. | |
std::uint32_t | minimumTimeBetweenTransportProtocolBAMFrames = DEFAULT_BAM_PACKET_DELAY_TIME_MS |
The configurable time between BAM frames. | |
std::uint8_t | networkManagerMaxFramesToSendPerUpdate = 0xFF |
Used to control the max number of transport layer frames added to the driver queue per network manager update. | |
std::uint8_t | numberOfPacketsPerDPOMessage = 16 |
The number of packets per DPO message for ETP sessions. | |
std::uint8_t | numberOfPacketsPerCTSMessage = 16 |
The number of packets per CTS message for TP sessions. | |
Static Private Attributes | |
static constexpr std::uint8_t | DEFAULT_BAM_PACKET_DELAY_TIME_MS = 50 |
The default time between BAM frames, as defined by J1939. | |
A class that defines stack-wide configuration data. You can set the values in there to suit your specific memory constraints.
Definition at line 23 of file can_network_configuration.hpp.
std::uint8_t isobus::CANNetworkConfiguration::get_max_number_of_network_manager_protocol_frames_per_update | ( | ) | const |
Returns the max number of data frames the stack will send from each transport layer protocol, per update. The default is 255, but decreasing it may reduce bus load at the expense of transfer time.
Definition at line 56 of file can_network_configuration.cpp.
std::uint32_t isobus::CANNetworkConfiguration::get_max_number_transport_protocol_sessions | ( | ) | const |
Returns the max number of concurrent TP sessions.
Definition at line 19 of file can_network_configuration.cpp.
std::uint32_t isobus::CANNetworkConfiguration::get_minimum_time_between_transport_protocol_bam_frames | ( | ) | const |
Returns the minimum time to wait between sending BAM frames.
Definition at line 36 of file can_network_configuration.cpp.
std::uint8_t isobus::CANNetworkConfiguration::get_number_of_packets_per_cts_message | ( | ) | const |
Get the the number of packets per CTS packet for TP sessions.
Definition at line 66 of file can_network_configuration.cpp.
std::uint8_t isobus::CANNetworkConfiguration::get_number_of_packets_per_dpo_message | ( | ) | const |
Returns the max number of data frames the stack will use when in an ETP session, between EDPO phases. The default is 16. Note that the sending control function may choose to use a lower number of frames.
Definition at line 46 of file can_network_configuration.cpp.
void isobus::CANNetworkConfiguration::set_max_number_of_network_manager_protocol_frames_per_update | ( | std::uint8_t | numberFrames | ) |
Sets the max number of data frames the stack will send from each transport layer protocol, per update. The default is 255, but decreasing it may reduce bus load at the expense of transfer time.
[in] | numberFrames | The max number of frames to use |
Definition at line 51 of file can_network_configuration.cpp.
void isobus::CANNetworkConfiguration::set_max_number_transport_protocol_sessions | ( | std::uint32_t | value | ) |
Configures the max number of concurrent TP sessions to provide a RAM limit for TP sessions.
[in] | value | The max allowable number of TP sessions |
Definition at line 14 of file can_network_configuration.cpp.
void isobus::CANNetworkConfiguration::set_minimum_time_between_transport_protocol_bam_frames | ( | std::uint32_t | value | ) |
Sets the minimum time to wait between sending BAM frames (default is 50 ms for maximum J1939 compatibility)
The acceptable range as defined by ISO-11783 is 10 to 200 ms. This is a minumum time, so if you set it to some value, like 10 ms, the stack will attempt to transmit it as close to that time as it can, but it is not possible to 100% ensure it.
[in] | value | The minimum time to wait between sending BAM frames |
Definition at line 24 of file can_network_configuration.cpp.
void isobus::CANNetworkConfiguration::set_number_of_packets_per_cts_message | ( | std::uint8_t | numberPackets | ) |
Set the the number of packets per CTS message for TP sessions. The default is 16. Note that the receiving control function may not support this limitation, or choose to ignore it and use a different number of packets per CTS packet.
[in] | numberPackets | The number of packets per CTS packet for TP sessions. |
Definition at line 61 of file can_network_configuration.cpp.
void isobus::CANNetworkConfiguration::set_number_of_packets_per_dpo_message | ( | std::uint8_t | numberFrames | ) |
Sets the max number of data frames the stack will use when in an ETP session, between EDPO phases. The default is 16. Note that the sending control function may choose to use a lower number of frames.
[in] | numberFrames | The max number of data frames to use |
Definition at line 41 of file can_network_configuration.cpp.
|
staticconstexprprivate |
The default time between BAM frames, as defined by J1939.
Definition at line 88 of file can_network_configuration.hpp.
|
private |
The max number of TP sessions allowed.
Definition at line 90 of file can_network_configuration.hpp.
|
private |
The configurable time between BAM frames.
Definition at line 91 of file can_network_configuration.hpp.
|
private |
Used to control the max number of transport layer frames added to the driver queue per network manager update.
Definition at line 92 of file can_network_configuration.hpp.
|
private |
The number of packets per CTS message for TP sessions.
Definition at line 94 of file can_network_configuration.hpp.
|
private |
The number of packets per DPO message for ETP sessions.
Definition at line 93 of file can_network_configuration.hpp.