Skip to main content
Version: 1.1.1

ecdev::IProfileFactory

Builds the device-class profile for one slave. More...

#include <profile_registry.hpp>

Public Functions​

Name
virtual~IProfileFactory() =default
virtual const char *name() const =0
Stable diagnostic name for this factory (e.g.
virtual std::unique_ptr< IDeviceProfile >create(const ProfileSelectionInput & in) const =0
Construct and return the profile for the given slave.
virtual intclaim(const eni::SlaveConfig & slave) const =0
Determine whether this factory handles the given slave and how strongly it claims it.

Detailed Description​

class ecdev::IProfileFactory;

Builds the device-class profile for one slave.

A new device class is supported by adding a new factory (typically via [makeIdentityProfileFactory] + LXMASTER_REGISTER_DEVICE); the generic device and orchestration layer never change.

Public Functions Documentation​

function ~IProfileFactory​

virtual ~IProfileFactory() =default

function name​

virtual const char * name() const =0

Stable diagnostic name for this factory (e.g.

Return: A null-terminated string literal identifying this factory.

"cia402:vendor-model"). Used in log messages and error strings; must outlive the factory object (a string literal in practice).

function create​

virtual std::unique_ptr< IDeviceProfile > create(
const ProfileSelectionInput & in
) const =0

Construct and return the profile for the given slave.

Parameters:

  • in Selection inputs including the ENI slave descriptor and default drive settings.

Return: The constructed profile, or null to pin the slave as passive (no facade handle).

Called only when [claim()](/lxmaster/api/classes/IProfileFactory#function-claim) returned a positive score for this slave.

function claim​

virtual int claim(
const eni::SlaveConfig & slave
) const =0

Determine whether this factory handles the given slave and how strongly it claims it.

Parameters:

  • slave ENI slave descriptor to inspect (identity, PDO objects, CANopen profile number).

Return: claim_score::kNone (0) if this factory does not handle this slave; a positive claim_score value if it does — higher scores win over lower ones.

The registry picks the highest-claiming factory (deterministic by registration order on ties).


Updated on 2026-07-13 at 20:44:41 +0000