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.

LED Brightness (Get/Set)

system . setLEDMaxBrightness => (unsigned char) value
system . getLEDMaxBrightness <= (unsigned char) value

Gets or Sets the scaling factor for the brightness of all LEDs on the system. The brightness is set to the ratio of this value compared to 255 (maximum). The colors of each LED may be inconsistent at low brightness levels.

Note that if the brightness is set to zero and the settings are saved, then the LEDs will no longer indicate whether the system is powered on. When troubleshooting, the user configuration may need to be manually reset in order to view the LEDs again.

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.

System Build (Get)

system . getBuild <= (unsigned int) build

Returns the build number of the current firmware. This is a unique identifier for the specific firmware build.

System Errors (Get)

system . getErrors <= (unsigned int) errors

Returns the current system error status. The error value is a bitfield indicating various system-level error conditions.

Input Current (Get)

system . getInputCurrent <= (unsigned int) milliamps

Returns the current input current to the system in milliamps. This represents the current being drawn from the power source.

Input Power Behavior (Get/Set)

system . getInputPowerBehavior <= (unsigned char) behavior
system . setInputPowerBehavior => (unsigned char) behavior

Returns or sets the input power behavior configuration. This controls how the system responds to different power input conditions.

Input Power Behavior Config (Get/Set)

system . getInputPowerBehaviorConfig <= (unsigned int[]) config
system . setInputPowerBehaviorConfig => (unsigned int[]) config

Returns or sets the detailed input power behavior configuration. This provides fine-grained control over power input behavior.

Input Power Source (Get)

system . getInputPowerSource <= (unsigned char) source

Returns the current input power source. Indicates which power source is currently being used to power the system.

Maximum Temperature (Get)

system . getMaximumTemperature <= (unsigned int) microcelsius

Returns the maximum temperature recorded by the system in microcelsius. This represents the highest temperature the system has reached.

Minimum Temperature (Get)

system . getMinimumTemperature <= (unsigned int) microcelsius

Returns the minimum temperature recorded by the system in microcelsius. This represents the lowest temperature the system has reached.

System Power Limit (Get)

system . getPowerLimit <= (unsigned int) milliwatts

Returns the current system power limit in milliwatts. This represents the maximum power the system is configured to consume.

System Power Limit Max (Get/Set)

system . getPowerLimitMax <= (unsigned int) milliwatts
system . setPowerLimitMax => (unsigned int) milliwatts

Returns or sets the maximum system power limit in milliwatts. This sets the upper bound for system power consumption.

System Power Limit State (Get)

system . getPowerLimitState <= (unsigned int) state

Returns the current power limit state. This indicates whether the system is operating within, approaching, or exceeding power limits.

Protocol Features (Get)

system . getProtocolFeatures <= (unsigned int) features

Returns the protocol features supported by the system. This is a bitfield indicating which protocol features are available.

Router Address Setting (Get)

system . getRouterAddressSetting <= (unsigned char) address

Returns the router address setting. This indicates the configured router address for the system.

System Temperature (Get)

system . getTemperature <= (unsigned int) microcelsius

Returns the current system temperature in microcelsius. This represents the real-time temperature of the system.

Unregulated Current (Get)

system . getUnregulatedCurrent <= (unsigned int) milliamps

Returns the current unregulated current in milliamps. This represents the current being drawn from the unregulated power supply.

Unregulated Voltage (Get)

system . getUnregulatedVoltage <= (unsigned int) millivolts

Returns the current unregulated voltage in millivolts. This represents the voltage of the unregulated power supply.

System Uptime (Get)

system . getUptime <= (unsigned int) seconds

Returns the system uptime in seconds. This represents how long the system has been running since the last reset.

Log Events (Get)

system . logEvents => (void)

Initiates logging of system events to a designated slot. This command triggers the system to save event logs to memory.

Reset Device to Factory Defaults (Set)

system . resetDeviceToFactoryDefaults => (void)

Resets the device to its factory default configuration. This command restores all settings to their original factory state.

Route to Me (Get/Set)

system . routeToMe <= (unsigned char) enabled
system . routeToMe => (unsigned char) enabled

Returns or sets the “route to me” configuration. When enabled, this allows the system to receive routed packets.

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.setLEDMaxBrightness(255);
stem.system.getLEDMaxBrightness(value);
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);