AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
can_internal_control_function.hpp
Go to the documentation of this file.
1//================================================================================================
10//================================================================================================
11
12#ifndef CAN_INTERNAL_CONTROL_FUNCTION_HPP
13#define CAN_INTERNAL_CONTROL_FUNCTION_HPP
14
18
19#include <vector>
20
21namespace isobus
22{
23 class CANNetworkManager;
24 class ParameterGroupNumberRequestProtocol;
25
26 //================================================================================================
33 //================================================================================================
35 {
36 public:
42 static std::shared_ptr<InternalControlFunction> create(NAME desiredName, std::uint8_t preferredAddress, std::uint8_t CANPort);
43
50 static std::shared_ptr<InternalControlFunction> create(NAME desiredName, std::uint8_t CANPort);
51
55 bool destroy(std::uint32_t expectedRefCount = 1) override;
56
61 InternalControlFunction(NAME desiredName, std::uint8_t preferredAddress, std::uint8_t CANPort, CANLibBadge<InternalControlFunction>);
62
66
70 void process_commanded_address(std::uint8_t commandedAddress, CANLibBadge<CANNetworkManager>);
71
75
78 std::weak_ptr<ParameterGroupNumberRequestProtocol> get_pgn_request_protocol() const;
79
80 private:
82 std::shared_ptr<ParameterGroupNumberRequestProtocol> pgnRequestProtocol;
83 };
84
85} // namespace isobus
86
87#endif // CAN_INTERNAL_CONTROL_FUNCTION_HPP
Defines a class for managing the address claiming process.
A way to only allow certain object types to access certain functions that is enforced at compile time...
Defines a base class to represent a generic ISOBUS control function.
This is a way to protect functions on public interfaces from being accessed by objects that shouldn't...
A class that describes an ISO11783 control function, which includes a NAME and address.
Describes an internal ECU's NAME and address data. Used to send CAN messages.
static std::shared_ptr< InternalControlFunction > create(NAME desiredName, std::uint8_t preferredAddress, std::uint8_t CANPort)
The factory function to construct an internal control function.
AddressClaimStateMachine stateMachine
The address claimer for this ICF.
void on_address_violation(CANLibBadge< CANNetworkManager >)
Used to inform the member address claim state machine that two CFs are using the same source address.
bool destroy(std::uint32_t expectedRefCount=1) override
Destroys this control function, by removing it from the network manager.
std::weak_ptr< ParameterGroupNumberRequestProtocol > get_pgn_request_protocol() const
Gets the PGN request protocol for this ICF.
void process_commanded_address(std::uint8_t commandedAddress, CANLibBadge< CANNetworkManager >)
Used by the network manager to tell the ICF that the address claim state machine needs to process a J...
bool update_address_claiming(CANLibBadge< CANNetworkManager >)
Updates the internal control function together with it's associated address claim state machine.
std::shared_ptr< ParameterGroupNumberRequestProtocol > pgnRequestProtocol
The PGN request protocol for this ICF.
InternalControlFunction(NAME desiredName, std::uint8_t preferredAddress, std::uint8_t CANPort, CANLibBadge< InternalControlFunction >)
The protected constructor for the internal control function, which is called by the (inherited) facto...
A class that represents an ISO11783 control function NAME from an address claim.
Definition can_NAME.hpp:24
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...