# Messages

Each log messages has its own unique code, it starts with a letter which indicates the level:

| Letter | Level                 | Description                                         |
|--------|-----------------------|-----------------------------------------------------|
| **F**  | [Fatal](#fatal)       |                                                     |
| **C**  | [Critical](#critical) | Critical messages indicate that action is required. |
| **E**  | [Error](#error)       |                                                     |
| **W**  | [Warning](#warning)   |                                                     |
| **N**  | [Notice](#notice)     |                                                     |
| **I**  | [Info](#info)         |                                                     |
| **D**  | [Debug](#debug)       |                                                     |

And a four digit number which indicates the message, the numeric range is divided into different categories for quickly indentifing the source of the message, see below:

| Numbers     | Category                    |
|-------------|-----------------------------|
| 1000 … 1999 | Traintastic core components |
| 2000 … 2999 | Hardware interfacing        |
| 3000 … 3999 | Trains and rail vehicles    |
| 4000 … 8999 | *unused*                    |
| 9000 … 9999 | Lua scripting               |

## Fatal {#fatal}

TODO


### F1001: Opening TCP socket failed (*reason*) {#f1001}

TODO


### F1002: TCP socket address reuse failed (*reason*) {#f1002}

TODO


### F1003: Binding TCP socket failed (*reason*) {#f1003}

TODO


### F1004: TCP socket listen failed (*reason*) {#f1004}

TODO


### F1005: Opening UDP socket failed (*reason*) {#f1005}

TODO


### F1006: UDP socket address reuse failed (*reason*) {#f1006}

TODO


### F1007: Binding udp socket failed (*reason*) {#f1007}

TODO


### F9001: Creating Lua state failed {#f9001}

TODO


### F9002: Running script failed (*reason*) {#f9002}

TODO


### F9003: Calling function failed (*reason*) {#f9003}

TODO


### F9999: *message* {#f9999}

Custom fatal message generated by a [Lua script](../advanced/scripting-basics.md).


## Critical {#critical}

Critical messages indicate that action is required.


### C1001: Loading world failed (*reason*) {#c1001}

TODO


### C1002: Creating client failed (*reason*) {#c1002}

TODO


### C1003: Can't write to settings file (*reason*) {#c1003}

TODO


### C1004: Reading world failed (*reason*) (*filename*) {#c1004}

TODO


### C1005: Saving world failed (*reason*) {#c1005}

TODO


### C1006: Creating world backup failed (*reason*) {#c1006}

TODO


### C1007: Creating world backup directory failed (*reason*) {#c1007}

TODO

### C1008: Creating backup directory failed (*reason*) {#c1008}
TODO

### C1009: Creating settings backup failed (*reason*) {#c1009}
TODO

### C1010: Exporting world failed (*reason*) {#c1010}
TODO

### C1011: Importing world failed (*reason*) {#c1011}
TODO

### C1012: Unknown class '*class id*', can't recreate object '*object id*' {#c1012}
TODO

### C1013: Can't load world saved with newer version, requires at least: Traintastic server *version* {#c1013}

**Cause:** The world is saved with a newer version of Traintastic server than currently is running.

**Solution:** Update Traintastic server (and client) to at least *version*.


### C2001: Address already used at #*object* {#c2001}

TODO


### C2002: DCC++ only supports the DCC protocol {#c2002}

**Cause:** The selected decoder protocol isn't supported by the DCC++ command station.

**Solution:** Change the decoder protocol to *DCC* or *Auto*.


### C2003: DCC++ doesn't support DCC long addresses below 128 {#c2003}

**Cause:** The DCC++ command station considers all addresses below 128 a DCC short address.

**Solution:** Change the locomotive decoder address.


### C2004: Can't get free slot {#c2004}
TODO

### C9999: *message* {#c9999}

Custom critical message generated by a [Lua script](../advanced/scripting-basics.md).


## Error {#error}

TODO


### E1001: Invalid world UUID: *uuid* {#e1001}

TODO


### E1002: World *uuid* doesn't exist {#e1002}

TODO


### E1003: UDP receive error (*reason*) {#e1003}

TODO


### E1004: TCP accept error (*reason*) {#e1004}

TODO


### E1005: Socket shutdown failed (*reason*) {#e1005}

TODO


### E1006: Socket write failed (*reason*) {#e1006}

TODO


### E1007: Socket read failed (*reason*) {#e1007}

TODO


### E1008: Socket acceptor cancel failed (*reason*) {#e1008}

TODO


### E2001: Serial write failed (*reason*) {#e2001}

TODO


### E2002: Serial read failed (*reason*) {#e2002}

TODO


### E2003: Make address failed (*reason*) {#e2003}

TODO


### E2004: Socket open failed (*reason*) {#e2004}

TODO


### E2005: Socket connect failed (*reason*) {#e2005}

TODO


### E2006: Socket bind failed (*reason*) {#e2006}

TODO


### E2007: Socket write failed (*reason*) {#e2007}

TODO


### E2008: Socket read failed (*reason*) {#e2008}

TODO


### E2009: Socket receive failed (*reason*) {#e2009}

TODO


### E2010: Serial port open failed (*reason*) {#e2010}

TODO


### E2011: Socket send failed (*reason*) {#e2011}

TODO


### E2012: Function number already in use {#e2012}

TODO

### E2013: Serial port set baudrate failed (*reason*) {#e2013}
TODO

### E2014: Serial port set data bits failed (*reason*) {#e2014}
TODO

### E2015: Serial port set stop bits failed (*reason*) {#e2015}
TODO

### E2016: Serial port set parity failed (*reason*) {#e2016}
TODO

### E2017: Serial port set flow control failed (*reason*) {#e2017}
TODO

### E2018: Timeout, no echo within *number*ms {#e2018}
TODO

### E2019: Timeout, no response within *number*ms {#e2019}
TODO

### E2020: Total number of modules may not exceed *number* {#e2020}

**Cause:** The maximum number of S88 modules connected to the HSI-88 may not exceed *number*, this is a hardware limitation.

**Solution:** Reduce the number of modules, the sum of *left* + *middle* + *right* must be equal or less than *number*.

### E9001: *error* (During execution of *name* event handler) {#e9001}
TODO

### E9999: *message* {#e9999}

Custom error message generated by a [Lua script](../advanced/scripting-basics.md).
## Warning {#warning}

TODO


### W1001: Discovery disabled, only allowed on port *number* {#w1001}

TODO


### W1002: Setting *name* doesnt exist {#w1002}

TODO

### W1003: Reading world *filename* failed (libarchive error *code*: *reason*) {#w1003}
TODO

### W2001: Received malformed data dropped *number* bytes {#w2001}

TODO


### W2002: Command station doesn't support functions above F*number* {#w2002}

**Cause:** The command station or interface can't control these function, e.g. due hardware or protocol limitations.

**Solution:** Check if command station is setup properly, some command stations have options which specify how to control additional functions.
If not, remapping decoder functions or using a different command station is the only solution.


### W2003: Command station doesn't support *number* speed steps, using *number* {#w2003}

**Cause:** The command station or interface can't control decoders using *number* speed steps, e.g. due hardware or protocol limitations.

**Solution:** The number of speed steps that can be used is determinded by the command station or interface. Changing the decoders speed steps to *Auto* should usally work.


### W2004: Input address *address* is invalid {#w2004}
The connected Traintastic DIY device does not have an input with *address*.

### W2005: Output address *address* is invalid {#w2005}
The connected Traintastic DIY device does not have an output with *address*.

### W2006: Command station does not support loco slot *slot*
Slot *slot* can't be used with the connected command station, reduce the LocoNet *Locomotive slots* value.

### W2007: Command station does not support the fast clock slot
Fast clock can't be used with the connected command station, disable the LocoNet *Fast clock sync enabled* setting.

### W9999: *message* {#w9999}

Custom warning message generated by a [Lua script](../advanced/scripting-basics.md).
## Notice {#notice}

TODO


### N1001: Received signal: *name* {#n1001}

TODO


### N1002: Created new world {#n1002}

TODO


### N1003: Restaring {#n1003}

TODO


### N1004: Shutting down {#n1004}

TODO


### N1005: Discovery enabled {#n1005}

TODO


### N1006: Discovery disabled {#n1006}

TODO


### N1007: Listening at *address*:*port* {#n1007}

TODO


### N1008: Loaded settings {#n1008}

TODO


### N1009: Saved settings {#n1009}

TODO


### N1010: Edit mode: enabled {#n1010}

TODO


### N1011: Edit mode: disabled {#n1011}

TODO


### N1012: Communication: enabled {#n1012}

TODO


### N1013: Communication: disabled {#n1013}

TODO


### N1014: Power: on {#n1014}

TODO


### N1015: Power: off {#n1015}

TODO


### N1016: Running {#n1016}

TODO


### N1017: Stopped {#n1017}

TODO


### N1018: Mute: enabled {#n1018}

TODO


### N1019: Mute: disabled {#n1019}

TODO


### N1020: Smoke: enabled {#n1020}

TODO


### N1021: Smoke: disabled {#n1021}

TODO


### N1022: Saved world: *name* {#n1022}

TODO

### N1023: Simulation: disabled {#n1023}
TODO

### N1024: Simulation: enabled {#n1024}
TODO

### N1025: Exported world successfully {#n1025}
TODO

### N1026: Imported world successfully {#n1026}
TODO

### N2001: Simulation not supported {#n2001}
TODO

### N2002: No response from LNCV module *id* with address *address* {#n2002}
TODO

### N2003: Stopped sending fast clock sync {#n2003}
A fast clock sync message is no longer sent periodically, see [W2007](#w2007).

### N9001: Starting script {#n9001}
TODO

### N9999: *message* {#n9999}

Custom notice message generated by a [Lua script](../advanced/scripting-basics.md).
## Info {#info}

Informational messages


### I1001: Traintastic v*version* *codename* {#i1001}

TODO


### I1002: Settings file not found, using defaults {#i1002}

TODO


### I1003: Client connected {#i1003}

TODO


### I1004: Connection lost {#i1004}

TODO


### I1005: Building world index {#i1005}

TODO

### I1006: *boost version* {#i1006}
Version information about used boost library, e.g. *boost 1.71.0*.

### I1007: *nlohmann::json version* {#i1007}
Version information about used nlohmann::json library, e.g. *nlohmann::json 3.10.5*.

### I1008: *archive version* {#i1008}
Version information about used archive library, e.g. *libarchive 3.4.0 zlib/1.2.11 liblzma/5.2.4 bz2lib/1.0.8 liblz4/1.9.2 libzstd/1.4.4*.

### I2001: Unknown loco address: *address* {#i2001}

TODO

### I2002: Hardware type: *type* {#i2002}
TODO

### I2003: Firmware version: *version* {#i2003}
TODO

### I2004: HSI-88: *info* {#i2004}

Information about the connected HSI-88 interface, e.g. *Ver. 0.62 / 08.07.02 / HSI-88 / (c) LDT*.


### I2005: *info* {#i2005}
Information about the connected Traintastic DIY device.

### I9001: Stopped script {#i9001}
TODO

### I9002: *lua version* {#i9002}
Version information about used Lua scripting engine, e.g. *Lua 5.3.3  Copyright (C) 1994-2016 Lua.org, PUC-Rio*.

### I9999: *message* {#i9999}

Custom info message generated by a [Lua script](../advanced/scripting-basics.md).
## Debug {#debug}

TODO


### D2001: TX: *data* {#d2001}

TODO


### D2002: RX: *data* {#d2002}

TODO


### D2003: Unknown xHeader 0x*value* {#d2003}

TODO


### D2004: *source* TX: *data* {#d2004}

TODO


### D2005: *source* RX: *data* {#d2005}

TODO


### D2006: Unknown message: *number* {#d2006}

TODO


### D2007: Input *number* = *value* {#d2007}

TODO


### D2008: Output *number* = *value* {#d2008}

TODO


### D2009: Slot *number* = *address* {#d2009}

TODO


### D2010: Slot *number* = Free {#d2010}

TODO


### D9999: *message* {#d9999}

Custom debug message generated by a [Lua script](../advanced/scripting-basics.md).
