|
CANTram Framework 1.0.1
Dieses Framework ermöglicht die Nutzung der CANTram Hardware, einer Mikrocontroller basierten mdoularen Steuerung.
|


Public Member Functions | |
| String | getHWType () const override |
| Get the hardware type string. | |
| String | getHWVersion () const override |
| Get the hardware version string. | |
| String | getFWVersion () const override |
| Get the firmware version string. | |
| uint8_t | getGPIODemand () const override |
| Get the GPIO demand of the module. | |
| uint8_t | getGPIOSupply () const override |
| Get the GPIO supply capacity of the module. | |
| bool | attachModule (uint8_t slot, uint8_t gpioStart) override |
| Attach this module to a slot and GPIO start index. | |
| bool | provideGPIOs () override |
| Provide GPIO definitions to the core. | |
| bool | requestGPIOs () override |
| Request GPIO definitions from CANTramCore and validate pins for module interfaces. | |
| bool | provideHardwareResources () override |
| Provide hardware resources to CANTramCore. | |
| bool | requestHardwareResources () override |
| Request hardware resources required by the BusModule. | |
| bool | addInterfaces () override |
| Add interfaces provided by the BusModule to the module interface list. | |
| bool | addSPIDevice (SPIChip *spiDevice, bool allowOverride=false) |
| bool | setLoopFunction (std::function< void(uint8_t *response)> loopFunction) |
| bool | initialize () override |
| Initialize the module after attachment and provisioning. | |
| bool | preInitialize () override |
| Pre-initialize the module after attachment and provisioning. | |
| void | cycle (uint8_t *response) override |
| Periodic cycle callback for the BusModule. | |
| bool | reset () override |
| Reset the module to a known default state. | |
| Interface ** | getInterfaces () override |
| Get pointer to module's interface array. | |
| size_t | getInterfaceCount () override |
| Get number of interfaces provided by the module. | |
| bool | addUARTInterface () |
| Add and configure the UART interface for this module. | |
| bool | addI2CInterface () |
| Add and configure the I2C interface for this module. | |
| Public Member Functions inherited from CANTramModule | |
| CANTramModule ()=default | |
| Default constructor. | |
| virtual | ~CANTramModule ()=default |
| Destructor. | |
| uint8_t | getSlot () const |
| Get assigned slot index. | |
| uint8_t | getGPIOStart () const |
| Get starting GPIO index assigned to the module. | |
Additional Inherited Members | |
| Protected Attributes inherited from CANTramModule | |
| uint8_t | SLOT = 0 |
| uint8_t | GPIO_START = 0 |
| bool BusModuleV1_0::addI2CInterface | ( | ) |
Add and configure the I2C interface for this module.
Inserts the I2C interface into the module interface array.

|
overridevirtual |
Add interfaces provided by the BusModule to the module interface list.
Adds UART and I2C interfaces (I2C stubbed) and logs the operation.
Implements CANTramModule.

| bool BusModuleV1_0::addUARTInterface | ( | ) |
Add and configure the UART interface for this module.
Inserts the UART interface into the module interface array, validates associated pins and configures UART core pins.

|
overridevirtual |
Attach this module to a slot and GPIO start index.
Calls the base CANTramModule attach implementation and performs any module-specific attach logic.
| slot | Slot index to attach the module to. |
| gpioStart | Starting GPIO index assigned to this module. |
Reimplemented from CANTramModule.

|
overridevirtual |
Periodic cycle callback for the BusModule.
Called by the core to perform periodic tasks. Implement module-specific cyclic behavior here.
| response | Optional pointer to a response buffer where the module may write response bytes. May be nullptr if unused. |
Reimplemented from CANTramModule.
|
inlineoverridevirtual |
Get the firmware version string.
Returns the firmware version string implemented by the module.
Implements CANTramModule.
|
inlineoverridevirtual |
Get the GPIO demand of the module.
Returns how many GPIOs this module requires from the core.
Implements CANTramModule.
|
inlineoverridevirtual |
Get the GPIO supply capacity of the module.
Returns how many GPIOs this module provides/supplies to the system.
Implements CANTramModule.
|
inlineoverridevirtual |
Get the hardware type string.
Returns a human readable hardware type identifier for the concrete module implementation.
Implements CANTramModule.
|
inlineoverridevirtual |
Get the hardware version string.
Returns the hardware revision/version string for the module.
Implements CANTramModule.
|
inlineoverridevirtual |
Get number of interfaces provided by the module.
Return the number of entries in the interfaces array returned by getInterfaces().
Implements CANTramModule.
|
inlineoverridevirtual |
Get pointer to module's interface array.
Returns a pointer to the internal Interface* array used by the core to enumerate interfaces.
Implements CANTramModule.
|
overridevirtual |
Initialize the module after attachment and provisioning.
Perform runtime initialization (start drivers, begin peripherals) once all modules have been attached.
Implements CANTramModule.
|
overridevirtual |
Pre-initialize the module after attachment and provisioning.
Perform any pre-initialization steps before the main initialize() call. May be used to establish e.g. i2c communication needed for initialization.
Reimplemented from CANTramModule.
|
overridevirtual |
Provide GPIO definitions to the core.
Placeholder for BusModule-specific GPIO provisioning. Currently does not register additional GPIOs.
Implements CANTramModule.
|
overridevirtual |
Provide hardware resources to CANTramCore.
Placeholder for attaching hardware resources (UART, I2C, SPI, etc.) that BusModule may provide.
Implements CANTramModule.
|
overridevirtual |
Request GPIO definitions from CANTramCore and validate pins for module interfaces.
Retrieves UART RX/TX and SPI CS output definitions from the core, validates they are not on shift registers and logs the assigned pins. Invalid pins will cause related interfaces to be invalidated.
Implements CANTramModule.

|
overridevirtual |
Request hardware resources required by the BusModule.
Attempts to acquire a UART hardware resource from CANTramCore and assigns it to the module's UART interface. If no UART resource is available the UART interface is invalidated.
Implements CANTramModule.
|
overridevirtual |
Reset the module to a known default state.
Optional override for module-specific reset logic. Base implementation should be safe to call.
Default implementation performs module reset actions. It logs the reset operation and returns true. Derived classes may override to perform additional hardware or state reset behavior.
Reimplemented from CANTramModule.
