E-Sharp Helpcenter
Breadcrumbs

Module command

Module Management

Description

The module command manages hardware modules in the Accordion system. It allows you to load, unload, configure, and inspect modules and their settings.

Syntax

Bash
module [options]

Optional Options

Option

Short

Description

--module

-m

The module name to activate/deactivate

--file

-f

Path to the file containing module definitions

--rename

-r

Clone and rename the module before loading

--key

-k

Key for initial data to change (must be paired with value)

--value

-v

Value for initial data to change (must be paired with key)

--deactivate

-d

Flag to deactivate (unload) the module

Examples

List Available and Loaded Modules

Bash
module

Load a Module

Bash
module --module "PMBus_Engine"

Load Module from Custom File

Bash
module --module "PMBus_Engine" --file "C:\configs\modules.xml"

Clone and Rename Module

Bash
module --module "I2C_Device" --rename "I2C_Device_Clone"

Load Module with Custom Setting

Bash
module --module "ADC_Module" --key "SampleRate" --value "1000"

Unload a Module

Bash
module --module "PMBus_Engine" --deactivate

Output Format

Available Modules Section

Available Modules:
PMBus_Engine
    AssemblyPath         : additional/PmbusEngine/PMBusEngine.dll
    ClassName            : Pmbus
    Namespace            : PmbusEngine
    ImageName            : pmbus.png
    InitialData          :
        I2CAddress       : 0x50
        DeviceType       : LTC3880

Loaded Modules Section

Loaded Modules:
PMBus_Engine
GPIO_Controller
ADC_Module

Affected Channels Section

Affected channels:
PMBus_Engine.VOUT_COMMAND
PMBus_Engine.IOUT_MEASURED
PMBus_Engine.STATUS_WORD

Output Colors

  • Dark Green: Available module names

  • Gray: Module property details

  • Blue: InitialData section header

  • White: InitialData key-value pairs

  • Dark Yellow: Loaded module names

  • Green: Affected channel names

Module Properties

Each module has the following properties:

Property

Description

Name

Module identifier

AssemblyPath

Path to the DLL file

ClassName

Class name within the assembly

Namespace

Namespace of the module class

ImageName

Associated icon/image file

InitialData

Dictionary of configuration parameters

Loading Behavior

When loading a module:

  1. If no file specified, uses existing module definitions

  2. If file specified, reads module definitions from file

  3. If rename specified, creates a clone with new name

  4. If key/value specified, overrides InitialData settings

  5. Enables the module

  6. Loads into hardware manager

  7. Refreshes channel list

  8. Displays affected channels

Cloning Modules

Cloning allows multiple instances of the same module:

Bash
# Create two instances of I2C device driver
module -m "I2C_Device" -r "I2C_Dev_0x50" -k "Address" -v "0x50"
module -m "I2C_Device" -r "I2C_Dev_0x51" -k "Address" -v "0x51"

InitialData Configuration

Modules can have configurable initial data:

Bash
# Configure sample rate
module -m "ADC_Module" -k "SampleRate" -v "1000"

# Configure I2C address
module -m "I2C_Driver" -k "DeviceAddress" -v "0x48"

Note: Key and value must be provided together.

Unloading Modules

Unloading removes a module and its channels:

Bash
module --module "PMBus_Engine" --deactivate

After unloading:

  • Module is removed from loaded list

  • Associated channels are removed

  • Resources are freed

Use Cases

List All Modules

Bash
# See what's available and what's loaded
module

Standard Module Loading

Bash
# Load PMBus engine
init --host 192.168.1.100
module --module "PMBus_Engine"
list --filter "PMBus.*"

Multiple Device Instances

Bash
# Load multiple temperature sensors
module -m "TempSensor" -r "TempSensor_CPU" -k "I2CAddr" -v "0x48"
module -m "TempSensor" -r "TempSensor_GPU" -k "I2CAddr" -v "0x49"

Custom Configuration

Bash
# Load module from specific config file
module -m "CustomDevice" -f "D:\configs\custom_modules.xml"

Cleanup

Bash
# Unload unused modules
module -m "TestModule" -d
module -m "DebugModule" -d

Module Files

Module definition files are typically XML format containing:

  • Module name and description

  • Assembly path and class information

  • Default InitialData values

  • Channel definitions

Error Handling

Common errors:

  • Module not found: Module doesn't exist in available modules list

  • Key without value: Key and value must be provided together

  • File not found: Module definition file doesn't exist

  • Module already loaded: Cannot load duplicate module (use rename)

  • Unload failed: Module may be in use or dependencies exist

Performance Considerations

  • Loading modules refreshes the channel list

  • Large modules may take several seconds to load

  • Unloading is typically fast

  • Channel queries are faster with fewer loaded modules

Best Practices

  1. List before loading: Check available modules first

  2. Use meaningful names: When cloning, use descriptive names

  3. Unload unused modules: Free resources when modules not needed

  4. Verify channels: Check affected channels after loading

  5. Document settings: Keep track of InitialData customizations

Notes

  • Requires an active connection (use init first)

  • Some modules have dependencies

  • Module order may matter for some configurations

  • Changes persist until reset or manual unload