23 NAMEFilterList(NAMEFilters)
26 LOCK_GUARD(Mutex, processingMutex);
32 auto controlFunction = std::shared_ptr<PartneredControlFunction>(
new PartneredControlFunction(CANPort, NAMEFilters, {}));
34 return controlFunction;
77 std::size_t retVal = 0;
91 std::uint32_t currentFilterValue;
104 switch (currentFilterParameter)
General constants used throughout this library.
The main class that manages the ISOBUS stack including: callbacks, Name to Address management,...
A class that describes a control function on the bus that the stack should communicate with....
This is a way to protect functions on public interfaces from being accessed by objects that shouldn't...
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.
static Mutex controlFunctionProcessingMutex
Protects the control function tables.
Type
The type of the control function.
A class that represents an ISO11783 control function NAME from an address claim.
std::uint8_t get_ecu_instance() const
Gets the ecu instance encoded in the NAME.
bool get_arbitrary_address_capable() const
Returns if the ECU is capable of address arbitration.
std::uint8_t get_function_instance() const
Gets the function instance encoded in the NAME.
NAMEParameters
The encoded components that comprise a NAME.
@ IndustryGroup
The industry group associated with this ECU, such as "agricultural".
@ DeviceClass
Also known as the vehicle system from J1939, describes general ECU type.
@ DeviceClassInstance
The instance number of this device class.
@ ArbitraryAddressCapable
Defines if this ECU supports address arbitration.
@ FunctionCode
The function of the ECU, as defined by ISO11783.
@ EcuInstance
The ECU instance of the ECU with this NAME. Usually increments in NAME order with similar CFs.
@ FunctionInstance
The function instance of the ECU. Similar to Virtual Terminal number.
@ ManufacturerCode
The J1939/ISO11783 manufacturer code of the ECU with this NAME.
@ IdentityNumber
Usually the serial number of the ECU, unique for all similar control functions.
std::uint16_t get_manufacturer_code() const
Gets the manufacturer code encoded in the NAME.
std::uint8_t get_function_code() const
Gets the function code encoded in the NAME.
std::uint8_t get_device_class_instance() const
Returns the device class (vehicle system) encoded in the NAME.
std::uint8_t get_industry_group() const
Returns the industry group encoded in the NAME.
std::uint8_t get_device_class() const
Returns the device class (vehicle system) encoded in the NAME.
std::uint32_t get_identity_number() const
Gets the identity number encoded in the NAME.
A storage class to hold data about callbacks for a specific PGN.
bool check_matches_name(NAME NAMEToCheck) const
Checks to see if a NAME matches this CF's NAME filters.
std::size_t get_number_name_filters_with_parameter_type(NAME::NAMEParameters parameter)
Returns the number of NAME filters with a specific NAME parameter component, like manufacturer code.
std::size_t get_number_parameter_group_number_callbacks() const
Returns the number of parameter group number callbacks associated with this control function.
ParameterGroupNumberCallbackData & get_parameter_group_number_callback(std::size_t index)
Returns a parameter group number associated with this control function by index.
void remove_parameter_group_number_callback(std::uint32_t parameterGroupNumber, CANLibCallback callback, void *parent, std::shared_ptr< InternalControlFunction > internalControlFunction=nullptr)
Removes a callback matching exactly the parameters passed in.
void add_parameter_group_number_callback(std::uint32_t parameterGroupNumber, CANLibCallback callback, void *parent, std::shared_ptr< InternalControlFunction > internalControlFunction=nullptr)
This is how you get notified that this control function has sent you a destination specific message.
static std::shared_ptr< PartneredControlFunction > create(std::uint8_t CANPort, const std::vector< NAMEFilter > NAMEFilters)
The factory function to construct a partnered control function.
std::vector< ParameterGroupNumberCallbackData > parameterGroupNumberCallbacks
A list of all parameter group number callbacks associated with this control function.
const std::vector< NAMEFilter > NAMEFilterList
A list of NAME parameters that describe this control function's identity.
std::size_t get_number_name_filters() const
Returns the number of NAME filter objects that describe the identity of this control function.
bool get_name_filter_parameter(std::size_t index, NAME::NAMEParameters ¶meter, std::uint32_t &filterValue) const
Returns a NAME filter by index.
PartneredControlFunction(std::uint8_t CANPort, const std::vector< NAMEFilter > NAMEFilters, CANLibBadge< PartneredControlFunction >)
the constructor for a PartneredControlFunction, which is called by the factory function
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.
void(*)(const CANMessage &message, void *parentPointer) CANLibCallback
A callback for control functions to get CAN messages.