AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
isobus::CANNetworkConfiguration Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ get_max_number_of_network_manager_protocol_frames_per_update()

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.

Returns
The max number of frames to use in transport protocols in each network manager update

Definition at line 56 of file can_network_configuration.cpp.

Here is the caller graph for this function:

◆ get_max_number_transport_protocol_sessions()

std::uint32_t isobus::CANNetworkConfiguration::get_max_number_transport_protocol_sessions ( ) const

Returns the max number of concurrent TP sessions.

Returns
The max number of concurrent TP sessions

Definition at line 19 of file can_network_configuration.cpp.

Here is the caller graph for this function:

◆ get_minimum_time_between_transport_protocol_bam_frames()

std::uint32_t isobus::CANNetworkConfiguration::get_minimum_time_between_transport_protocol_bam_frames ( ) const

Returns the minimum time to wait between sending BAM frames.

Returns
The minimum time to wait between sending BAM frames

Definition at line 36 of file can_network_configuration.cpp.

Here is the caller graph for this function:

◆ get_number_of_packets_per_cts_message()

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.

Returns
The number of packets per CTS packet for TP sessions.

Definition at line 66 of file can_network_configuration.cpp.

Here is the caller graph for this function:

◆ get_number_of_packets_per_dpo_message()

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.

Returns
The number of data frames the stack will use when sending ETP messages between EDPOs

Definition at line 46 of file can_network_configuration.cpp.

Here is the caller graph for this function:

◆ set_max_number_of_network_manager_protocol_frames_per_update()

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.

Parameters
[in]numberFramesThe max number of frames to use

Definition at line 51 of file can_network_configuration.cpp.

◆ set_max_number_transport_protocol_sessions()

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.

Parameters
[in]valueThe max allowable number of TP sessions

Definition at line 14 of file can_network_configuration.cpp.

◆ set_minimum_time_between_transport_protocol_bam_frames()

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.

Parameters
[in]valueThe minimum time to wait between sending BAM frames

Definition at line 24 of file can_network_configuration.cpp.

◆ set_number_of_packets_per_cts_message()

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.

Parameters
[in]numberPacketsThe number of packets per CTS packet for TP sessions.

Definition at line 61 of file can_network_configuration.cpp.

◆ set_number_of_packets_per_dpo_message()

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.

Parameters
[in]numberFramesThe max number of data frames to use

Definition at line 41 of file can_network_configuration.cpp.

Member Data Documentation

◆ DEFAULT_BAM_PACKET_DELAY_TIME_MS

constexpr std::uint8_t isobus::CANNetworkConfiguration::DEFAULT_BAM_PACKET_DELAY_TIME_MS = 50
staticconstexprprivate

The default time between BAM frames, as defined by J1939.

Definition at line 88 of file can_network_configuration.hpp.

◆ maxNumberTransportProtocolSessions

std::uint32_t isobus::CANNetworkConfiguration::maxNumberTransportProtocolSessions = 4
private

The max number of TP sessions allowed.

Definition at line 90 of file can_network_configuration.hpp.

◆ minimumTimeBetweenTransportProtocolBAMFrames

std::uint32_t isobus::CANNetworkConfiguration::minimumTimeBetweenTransportProtocolBAMFrames = DEFAULT_BAM_PACKET_DELAY_TIME_MS
private

The configurable time between BAM frames.

Definition at line 91 of file can_network_configuration.hpp.

◆ networkManagerMaxFramesToSendPerUpdate

std::uint8_t isobus::CANNetworkConfiguration::networkManagerMaxFramesToSendPerUpdate = 0xFF
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.

◆ numberOfPacketsPerCTSMessage

std::uint8_t isobus::CANNetworkConfiguration::numberOfPacketsPerCTSMessage = 16
private

The number of packets per CTS message for TP sessions.

Definition at line 94 of file can_network_configuration.hpp.

◆ numberOfPacketsPerDPOMessage

std::uint8_t isobus::CANNetworkConfiguration::numberOfPacketsPerDPOMessage = 16
private

The number of packets per DPO message for ETP sessions.

Definition at line 93 of file can_network_configuration.hpp.


The documentation for this class was generated from the following files: