System Entity

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.

System save

system . save => (void)

BrainStem configuration settings are stored in volatile memory until the save command is executed. Settings such as the BootSlot, and changes to the Module or Router address will not persist across resets unless followed by a call to:

System reset (Set)

system . reset => (void)

Calling system.reset() will reset the BrainStem module just as if the reset button were pressed.

User LED

system . setLED => (unsigned char) state
system . getLED <= (unsigned char) state

Gets or Sets the state of the User LED. Setting LED with a value of 1 turns the User LED on and setting it to 0 turns it off.

Boot Slot (Get/Set)

system . setBootSlot => (unsigned char) slot
system . getBootSlot <= (unsigned char) slot

BrainStem modules can be configured to enable a reflex file at boot. The reflex file must be loaded into a slot in the internal store. Setting the boot slot to the value 255 will disable on boot functionality. For more information about stores and slots please see the store section of the reference manual. For more information about reflexes please see the Reflex section of the manual.

Input Voltage (Get)

system . getInputVoltage <= (unsigned int) inputVoltage

The input voltage system command is a read only command and will return the input supply voltage of the BrainStem module in micro volts.

Serial Number (Get)

system . getSerialNumber <= (unsigned int) serialNumber

Read only command that returns the unique module serial number. The returned value is an unsigned int. In Acroname UI applications the serial number is generally represented as an 8 character Hexadecimal number.

BrainStem Model (Get)

system . getModel <= (unsigned char) BrainStem model.

Read only command that returns the model of the BrainStem module.

Hardware Version (Get)

system . getHardwareVersion <= (unsigned int) Hardware Version.

Read only command that returns the hardware version of the module. The content of the hardware version is specific to each Acroname product and used to indicate behavioral differences between product revisions. The codes are not well defined and may change at any time.

Version (Get)

system . getVersion <= (unsigned int) version number.

Read only command that returns the version number of the BrainStem firmware. This is a packed format. The aVersion.h C API can represent this version in a human readable manner. The format of the version number is 3 digits separated by ..

major . minor . patch

Module Address (Get)

system . getModule <= (unsigned char) module

The module address is the number used to address the module on the BrainStem network and from the host. This is a combination of the module base address, any software offset that is applied and any hardware module offset.

Module Base Address (Get)

system . getModuleBaseAddress <= (unsigned char) module

The module base address is the default or base address of the module, before any offsets are applied.

Module Software Offset (Set/Get)

system . getModuleSoftwareOffset <= (unsigned char) software offset
system . setModuleSoftwareOffset => (unsigned char) software offset

The module software offset is added to the module’s base address and any hardware offsets to determine the final module address of the module. This setting is not applied until saved and the module has been reset.

Module Hardware Offset (Get)

system . getModuleHardwareOffset <= (unsigned char) module hardware offset

MTM BrainStems have a set of module offset pins which will adjust the module address via hardware. See the data sheet for your MTM module for more information about these hardware settings. The module offset command is a read only command that returns the offset that will be added to the base module address and any software offset to determine the operating address of the MTM BrainStem module. Changes to the hardware offset are applied when the Device is reset.

Router Address (Get/Set)

system . setRouter => (unsigned char) module
system . getRouter <= (unsigned char) module

The BrainStem router address refers to the BrainStem module address of the module that will coordinate communication with the host system. This setting is not applied until it is saved and the module has been reset.

Changing the router address can have negative consequences for communicating with the BrainStem network. Please see the appendix on the BrainStem Network setup for more information.

HeartBeat Interval (Get/Set)

system . setHBInterval => (unsigned char) interval
system . getHBInterval <= (unsigned char) interval

Gets or sets the heartbeat interval to control the amount of heartbeat traffic. This value is set at approximately 1/50th of a second resolution. Heartbeat packets are handled by the underlying system, and are indicated on the brainstem by the blinking green heartbeat LED. UI applications also have Heartbeat indicators. Default value is 12.

System Name (Get/Set)

system . getName <= (unsigned char[]) name
system . setName => (unsigned char[]) name

Allows for setting a friendly name to the device with a 32 character limit.

Code Examples

// Get requests fill the parameter with the current system value upon success.
// All commands return aErr values when errors are encountered and aErrNone on
// success.

stem.system.save();
stem.system.reset();
stem.system.setLED(1);
stem.system.getLED(state);
stem.system.setBootSlot(5);
stem.system.getBootSlot(slot);
stem.system.getInputVoltage(voltage);
stem.system.getModule(address);
stem.system.getRouter(address);
stem.system.setRouter(6);
stem.system.getModuleBaseAddress(address);
stem.system.setModuleSoftwareOffset(16);
stem.system.getModuleSoftwareOffset(offset);
stem.system.getModuleHardwareOffset(offset);
stem.system.getSerialNumber(serialNumber);
stem.system.getModel(model);
stem.system.getHardwareVersion(hardwareVersion);
stem.system.getVersion(version);
stem.system.getHBInterval(interval);
stem.system.setHBInterval(interval);