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, buffer_length=256)[source]

Get the description of an error code.

Parameters:

error (int or Result object) – The error to decode.

Returns:

The error code in human readable form.

Return type:

string

static getErrorText(error)[source]

Get the string representation of an error code.

Parameters:

error (int or Result object) – The error to decode.

Returns:

The error code in human readable form.

Return type:

string

property value

Return the value attribute