Results

A module that provides a result class for returning results of UEI commands.

Results consist of an error attribute and a value attribute. If the error attribute is set to NO_ERROR, then the result value is the response to the UEI command that was sent.

For more information about return values for commands and UEI’s see the Acroname BrainStem Reference

class brainstem.result.Result(error, value)[source]

Result class for returning results of commands

Instances of Result represent the response to a command. The Result class also contains constants representing the possible errors that may be encountered during interaction with a BrainStem module.

property error

Return the error attribute

static getErrorDescription(error)[source]

Get the description of an error code.

Parameters:

error (int | Result) – The error to decode.

Return (string):

The error code description in human readable form.

static getErrorText(error)[source]

Get the string representation of an error code.

Parameters:

error (int | Result) – The error to decode.

Return (string):

The error code in human readable form.

property value

Return the value attribute