Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Status codes

A non-zero status byte in a reply becomes Error::Brick { status, .. }, with status a nxt_rs::Status. Status::from_code and Status::code convert between the two forms.

Direct commands

CodeStatusMeaning
0x20PendingCommunicationTransaction still in progress (I²C); retry
0x40MailboxEmptyThe mailbox has no message
0xBDRequestFailedRequest failed, e.g. the file was not found
0xBEUnknownOpcodeUnknown command opcode
0xBFInsanePacketMalformed telegram
0xC0OutOfRangeData contains out-of-range values
0xDDBusErrorCommunication bus error (no I²C answer)
0xDECommBufferFullNo free memory in the communication buffer
0xDFInvalidChannelChannel/connection not valid
0xE0ChannelBusyChannel/connection not configured or busy
0xECNoActiveProgramNo program is running
0xEDIllegalSizeIllegal size
0xEEIllegalMailboxIllegal mailbox number
0xEFInvalidFieldInvalid field of a structure
0xF0BadInputOutputBad input or output port
0xFBInsufficientMemoryNot enough memory
0xFFBadArgumentsBad arguments

System commands

CodeStatusMeaning
0x81NoMoreHandlesNo more handles
0x82NoSpaceNo space
0x83NoMoreFilesNo more files (end of a search)
0x84EndOfFileExpectedEnd of file expected
0x85EndOfFileEnd of file
0x86NotALinearFileNot a linear file
0x87FileNotFoundFile not found
0x88HandleAlreadyClosedHandle already closed
0x89NoLinearSpaceNo contiguous space for a linear file
0x8AUndefinedUndefined error
0x8BFileBusyFile is busy
0x8CNoWriteBuffersNo write buffers
0x8DAppendNotPossibleAppend not possible
0x8EFileFullFile is full
0x8FFileExistsFile exists
0x90ModuleNotFoundModule not found
0x91OutOfBoundaryOut of boundary
0x92IllegalFileNameIllegal file name
0x93IllegalHandleIllegal handle

Any other code becomes Status::Unknown(code).

Status::is_retryable() is true for PendingCommunication, CommBufferFull, ChannelBusy and BusError.