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
| Code | Status | Meaning |
|---|---|---|
0x20 | PendingCommunication | Transaction still in progress (I²C); retry |
0x40 | MailboxEmpty | The mailbox has no message |
0xBD | RequestFailed | Request failed, e.g. the file was not found |
0xBE | UnknownOpcode | Unknown command opcode |
0xBF | InsanePacket | Malformed telegram |
0xC0 | OutOfRange | Data contains out-of-range values |
0xDD | BusError | Communication bus error (no I²C answer) |
0xDE | CommBufferFull | No free memory in the communication buffer |
0xDF | InvalidChannel | Channel/connection not valid |
0xE0 | ChannelBusy | Channel/connection not configured or busy |
0xEC | NoActiveProgram | No program is running |
0xED | IllegalSize | Illegal size |
0xEE | IllegalMailbox | Illegal mailbox number |
0xEF | InvalidField | Invalid field of a structure |
0xF0 | BadInputOutput | Bad input or output port |
0xFB | InsufficientMemory | Not enough memory |
0xFF | BadArguments | Bad arguments |
System commands
| Code | Status | Meaning |
|---|---|---|
0x81 | NoMoreHandles | No more handles |
0x82 | NoSpace | No space |
0x83 | NoMoreFiles | No more files (end of a search) |
0x84 | EndOfFileExpected | End of file expected |
0x85 | EndOfFile | End of file |
0x86 | NotALinearFile | Not a linear file |
0x87 | FileNotFound | File not found |
0x88 | HandleAlreadyClosed | Handle already closed |
0x89 | NoLinearSpace | No contiguous space for a linear file |
0x8A | Undefined | Undefined error |
0x8B | FileBusy | File is busy |
0x8C | NoWriteBuffers | No write buffers |
0x8D | AppendNotPossible | Append not possible |
0x8E | FileFull | File is full |
0x8F | FileExists | File exists |
0x90 | ModuleNotFound | Module not found |
0x91 | OutOfBoundary | Out of boundary |
0x92 | IllegalFileName | Illegal file name |
0x93 | IllegalHandle | Illegal handle |
Any other code becomes Status::Unknown(code).
Status::is_retryable() is true for PendingCommunication,
CommBufferFull, ChannelBusy and BusError.