23 stateMachine(preferredAddress, desiredName, CANPort)
31 auto controlFunction = std::shared_ptr<InternalControlFunction>(
new InternalControlFunction(desiredName, preferredAddress, CANPort, badge));
34 return controlFunction;
62 std::uint8_t previousAddress =
address;
66 return previousAddress !=
address;
General constants used throughout this library.
A representation of an ISOBUS ECU that we can send from. Use this class when defining your own contro...
The main class that manages the ISOBUS stack including: callbacks, Name to Address management,...
A protocol that handles PGN requests.
This is a way to protect functions on public interfaces from being accessed by objects that shouldn't...
void process_commanded_address(std::uint8_t commandedAddress)
Attempts to process a commanded address.
void update()
Updates the state machine, should be called periodically.
std::uint8_t get_claimed_address() const
Returns the address claimed by the state machine or 0xFE if none claimed.
void on_address_violation()
Used to inform the address claim state machine that two CFs are using the same source address....
static CANNetworkManager CANNetwork
Static singleton of the one network manager. Use this to access stack functionality.
void on_control_function_created(std::shared_ptr< ControlFunction > controlFunction, CANLibBadge< ControlFunction >)
Informs the network manager that a control function object has been created, so that it can be added ...
A class that describes an ISO11783 control function, which includes a NAME and address.
std::uint8_t address
The address of the control function.
Type
The type of the control function.
virtual bool destroy(std::uint32_t expectedRefCount=1)
Destroys this control function, by removing it from the network manager.
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.
A protocol that handles PGN requests.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...
constexpr std::uint8_t NULL_CAN_ADDRESS
The NULL CAN address defined by J1939 and ISO11783.