System

API Documentation: [cpp] [python] [.NET] [LabVIEW]

Every BrainStem module includes a single system entity. The system entity allows the retrieval and manipulation of configuration settings like the module address and input voltage, control over the user LED, as well as other functionality.


Serial Number

Every MTM-ETHERSTEM is assigned a unique serial number at the factory. This facilitates an arbitrary number of MTM-ETHERSTEM devices attached to a host computer. The following method call can retrieve the unique serial number for each device.

stem.system.getSerialNumber(serialNumber) [cpp] [python] [NET] [LabVIEW]

Module Default Base Address

BrainStems are designed to be able to form a reactive, extensible network. All BrainStem modules come with a default network base address for identification on the BrainStem network bus. The default module base address for MTM-ETHERSTEM is factory-set as 6, and can be accessed with.

stem.system.getModule(module) [cpp] [python] [NET] [LabVIEW]

Saved Settings

Some entities can be configured and saved to non-volatile memory. This allows a user to modify the startup and operational behavior for the MTM-ETHERSTEM away from the factory default settings. Saving system settings preserves the settings as the new default. Most changes to system settings require a save and reboot before taking effect. For example, upstream and downstream USB Boost settings will not take effect unless a system save operation is completed, followed by a reset or power cycle. Use the following command to save changes to system settings before reboot:

stem.system.save() [cpp] [python] [NET] [LabVIEW]

Saved Configurations

Module Software Offset

I2C Rate

Router Address

I2C Pullup State

Heartbeat Rate

Boot Slot

Reset

Reset the system.

stem.system.reset() [cpp] [python] [NET] [LabVIEW]

Get/Set LED

Set the system LED state. Most modules have a blue system LED. Refer to the module datasheet for details on the system LED location and color.

stem.system.getLED(value) [cpp] [python] [NET] [LabVIEW]
stem.system.setLED(value) [cpp] [python] [NET] [LabVIEW]

Get/Set Boot Slot

Get the store slot which is mapped when the module boots. Set a store slot to be mapped when the module boots.

The boot slot will be mapped after the module boots from powers up, receives a reset signal on its reset input, or is issued a software reset command. Set the slot to 255 to disable mapping on boot.

stem.system.getBootSlot() [cpp] [python] [NET] [LabVIEW]
stem.system.setBootSlot(value) [cpp] [python] [NET] [LabVIEW]

Get Input Voltage

Get the module’s input voltage.

stem.system.getInputVoltage() [cpp] [python] [NET] [LabVIEW]

Get Version

Get the modules firmware version number.

The version number is packed into the return value. Utility functions in the Version module can unpack the major, minor and patch numbers from the version number which looks like M.m.p.

stem.system.getVersion() [cpp] [python] [NET] [LabVIEW]

Get/Set Module Software Offset

Set the software address offset.

The module software offset is added to the base module address, and potentially a hardware offset to determine the final calculated address the module uses on the BrainStem network. You must save and reset the module for this change to become effective.

stem.system.getModuleSoftwareOffset() [cpp] [python] [NET] [LabVIEW]
stem.system.setModuleSoftwareOffset(value) [cpp] [python] [NET] [LabVIEW]

Get/Set HB Interval

Get the delay between heartbeat packets. Set the delay between heartbeat packets.

For link modules, these heartbeat are sent to the host. For non-link modules, these heartbeats are sent to the router address. Interval values are in 25.6 millisecond increments. Increments valid values are 1-255; default is 10 (256 milliseconds).

stem.system.getHBInterval() [cpp] [python] [NET] [LabVIEW]
stem.system.setHBInterval(value) [cpp] [python] [NET] [LabVIEW]

Get/Set Router

Get the router address the module uses to communicate with the host. Set the router address the module uses to communicate with the host.

stem.system.getRouter() [cpp] [python] [NET] [LabVIEW]
stem.system.setRouter(value) [cpp] [python] [NET] [LabVIEW]

Get Router Address Setting

Get the router address setting saved in the module. This setting may be different from the effective router if the router has been set and saved but no reset has been made.

stem.system.getRouterAddressSetting() [cpp] [python] [NET] [LabVIEW]

Get Module

Get the address the module uses on the BrainStem network.

stem.system.getModule() [cpp] [python] [NET] [LabVIEW]

Get Model

Get the module’s model enumeration.

A subset of the possible model enumerations is defined in aProtocolDefs.h under “BrainStem model codes”. Other codes are be used by Acroname for proprietary module types.

stem.system.getModel() [cpp] [python] [NET] [LabVIEW]

Route to Me

Enables/Disables the route to me function.

This function allows for easy networking of BrainStem modules. Enabling (1) this function will send an I2C General Call to all devices on the network and request that they change their router address to the of the calling device. Disabling (0) will cause all devices on the BrainStem network to revert to their default address.

stem.system.routeToMe(value) [cpp] [python] [NET] [LabVIEW]