AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Classes | Namespaces
isobus_diagnostic_protocol.hpp File Reference

A protocol that handles the ISO 11783-12 Diagnostic Protocol and some J1939 DMs. More...

#include "isobus/isobus/can_internal_control_function.hpp"
#include "isobus/isobus/isobus_functionalities.hpp"
#include "isobus/utility/processing_flags.hpp"
#include <array>
#include <list>
#include <memory>
#include <string>
Include dependency graph for isobus_diagnostic_protocol.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  isobus::DiagnosticProtocol
 Manages the DM1, DM2, and DM3 messages for ISO11783 or J1939. More...
 
class  isobus::DiagnosticProtocol::DiagnosticTroubleCode
 A storage class for describing a complete DTC. More...
 
struct  isobus::DiagnosticProtocol::DM22Data
 A structure to hold data about DM22 responses we need to send. More...
 

Namespaces

namespace  isobus
 This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollution.
 

Detailed Description

A protocol that handles the ISO 11783-12 Diagnostic Protocol and some J1939 DMs.

This protocol manages many of the messages defined in ISO 11783-12 and a subset of the messages defined in SAE J1939-73 and SAE J1939-71. The ISO-11783 definition of some of these is based on the J1939 definition with some tweaks. You can select if you want the protocol to behave like J1939 by calling set_j1939_mode. One of the messages this protocol supports is the DM1 message. The DM1 is sent via BAM, which has some implications to your application, as only 1 BAM can be active at a time. This message is sent at 1 Hz. In ISOBUS mode, unlike in J1939, the message is discontinued when no DTCs are active to minimize bus load. Also, ISO-11783 does not utilize or support lamp status. Other messages this protocol supports include: DM2, DM3, DM11, DM13, DM22, software ID, and Product ID.

Note
DM13 has two primary functions. It may be used as a command, from either a tool or an ECU, directed to a single controller or to all controllers to request the receiving controller(s) to stop or start broadcast messages. Additionally, it may be used by an ECU to inform other nodes that the sender is about to suspend its normal broadcast due to commands other than a SAE J1939 DM13 command received on that same network segment. The broadcast messages stopped, started, or suspended may be on networks other than SAE J1939. This is not a message to ignore all communications. It is a message to minimize network traffic.
Attention
It is recognized that some network messages may be required to continue even during the "stop broadcast" condition. You MUST handle this in your application, as the stack cannot decide what messages are required without context. In other words, you must opt-in to make your application layer messages adhere to DM13 requests by explicitly calling the functions on this protocol (using get_diagnostic_protocol_by_internal_control_function) to check if you should send it.
Author
Adrian Del Grosso

Definition in file isobus_diagnostic_protocol.hpp.