EtherCAT.Simulator.DriverAdapter behaviour (ethercat v0.4.2)

Copy Markdown View Source

Optional simulator-side companion for a real EtherCAT.Slave.Driver.

The adapter returns authored simulator configuration as keyword options for EtherCAT.Simulator.Slave.Definition.build/2. It must include :profile. EtherCAT.Simulator.Slave.from_driver/2 merges those options with the real driver's declared identity so simulator hydration stays aligned with the runtime-facing driver.

Summary

Types

definition_options()

@type definition_options() :: keyword()

Callbacks

definition_options(config)

@callback definition_options(config :: map()) :: definition_options()

Functions

definition_options(adapter, config)

@spec definition_options(module(), map()) :: definition_options()

resolve(driver, simulator)

@spec resolve(module(), module() | nil) :: module() | nil