12#ifndef CAN_INTERNAL_CONTROL_FUNCTION_HPP
13#define CAN_INTERNAL_CONTROL_FUNCTION_HPP
23 class CANNetworkManager;
24 class ParameterGroupNumberRequestProtocol;
42 static std::shared_ptr<InternalControlFunction>
create(
NAME desiredName, std::uint8_t preferredAddress, std::uint8_t CANPort);
50 static std::shared_ptr<InternalControlFunction>
create(
NAME desiredName, std::uint8_t CANPort);
55 bool destroy(std::uint32_t expectedRefCount = 1)
override;
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...
Forward declare CANMessage.
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.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...