Enum Constant and Description |
---|
CFGBGN
Starte Konfigurationsmodus.
|
CFGEND
Beende Konfigurationsmodus und führe RESET aus.
|
CFGLGT
Konfigurieret Beleuchtungsmittel.
|
CFGMF2
Konfiguriere Formhauptsignal mit zwei Spulen (Hp0, Hp1).
|
CFGMF3
Konfiguriere Formhauptsignal mit drei Spulen (Hp0, Hp1, Hp2).
|
CFGML2
Konfiguriere Blocksignal mit zwei Zuständen (Hp0, Hp1) und zwei Anschlüssen.
|
CFGML3
Konfiguriere Einfahrsignal mit drei Zuständen (Hp0, Hp1, Hp2) und drei Anschlüssen.
|
CFGML4
Konfiguriere Ausfahrsignal mit vier Zuständen (Hp0, Hp1, Hp2, Hp0/Sh1) und fünf Anschlüssen.
|
CFGPF2
Konfiguriere Formvorsignal mit zwei Spulen (Vr0, Vr1).
|
CFGPF3
Konfiguriere Formvorsignal mit drei Spulen (Vr0, Vr1, Vr2).
|
CFGPL2
Konfiguriere Lichtvorsignal mit zwei Zuständen (Vr0, Vr1) und zwei Anschlüssen.
|
CFGPL3
Konfiguriere Lichtvorsignal mit drei Zuständen (Vr0, Vr1, Vr2) und vier Anschlüssen.
|
CFGRAI
Konfiguriere Gleisabschnitt.
|
CFGSL2
Konfiguriere Lichtgleissperrsignal mit zwei Zuständen (Sh0, Sh1) und zwei Anschlüssen.
|
CFGSWN
Konfiguriere Weiche/DKW mit Endabschaltung.
|
CFGSWO
Konfiguriere Weiche/DKW ohne Endabschaltung.
|
FLASH_CHECK
Prüfsumme des Firmwareupdates (nur im Updatemodus des Bootloaders).
|
FLASH_DATA
Programmdatentelegramm (nur im Updatemodus des Bootloaders).
|
FLASH_REQ
Firmware-Update auslösen (funktioniert nur im Bootloader).
|
GETCFG
Konfiguration abfragen (nicht implementiert).
|
GETDIR
Frage Weichenlage ab.
|
GETDVC
Konfiguration abfragen (nicht implementiert).
|
GETRBS
Frage Gleisbelegtzustand ab.
|
GETVER
Versionsnummer der Firmware abfragen.
|
PING
Kommunikationstest.
|
QRYBUF
Belegung der Sende- und Empfangspuffer abfragen.
|
QRYERR
Fehlerzähler abfragen.
|
RESET
Reset auslösen.
|
SENSOR
Sensordaten übertragen.
|
SET_ID
Setzen einer neuen Mikrocontroller-ID.
|
SETLFT
Schalte Weiche nach links bzw.
|
SETRGT
Schalte Weiche nach rechts bzw.
|
SETROF
Schalte Gleisabschnitt aus.
|
SETRON
Schalte Gleisabschnitt ein.
|
SETSGN
Schalte Signal.
|
Modifier and Type | Field and Description |
---|---|
static int |
CAT_CONFIG
Die Kategorie der Konfigurationskommandos.
|
static int |
CAT_EXT
Die Kategorie der Schaltkommandos, die einen Extended CAN-Frame verlangen.
|
static int |
CAT_MASK
Die Maske, die die Kategorien filtert.
|
static int |
CAT_RAIL
Due Kategorie der Abschnittschaltkommandos.
|
static int |
CAT_SIGNAL
Die Kategorie der Signalschaltkommandos.
|
static int |
CAT_SWITCH
Die Kategorie der Weichenschaltkommandos.
|
Modifier and Type | Method and Description |
---|---|
int |
getCommand()
Diese Methode gibt den Kommando-Code als Integer für eine
MrwMessage zurück. |
static Command |
getCommand(int code)
Diese Methode wandelt den Integer-Wert eines
MrwMessage -Kommandos in eine Command-enum-Instanz um. |
static boolean |
isResult(int code)
Diese Methode testet, ob der Integer-Wert zum Kommando-Code aus einer Rückgabe stammt.
|
static int |
makeResult(byte code)
Diese Methode macht aus einer Byte-Repräsentation eines Kommando-Codes ein Integer-Wert mit
Rückmeldeflag.
|
static int |
makeResult(Command cmd)
Diese Methode macht aus einem Kommando-Code ein Integer-Wert mit Rückmeldeflag.
|
static Command |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Command[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Command SETLFT
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 1 |
Data[0] | SETLFT |
Mögliche Antworten:
public static final Command SETRGT
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 1 |
Data[0] | SETRGT |
Mögliche Antworten:
public static final Command GETDIR
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 1 |
Data[0] | GETDIR |
Als Antwort kommt ein sieben Byte langes Frame mit der Weichenlage.
Aufteilung Füllzustand: | |
---|---|
Data[6] | DirectionCode |
Mögliche Antworten:
DirectionCode
public static final Command SETRON
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 1 |
Data[0] | SETRON |
Mögliche Antworten:
public static final Command SETROF
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 1 |
Data[0] | SETROF |
Mögliche Antworten:
public static final Command GETRBS
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 1 |
Data[0] | GETRBS |
Als Antwort kommt ein Frame mit sieben Bytes mit dem Belegtzustand des Gleisabschnitts.
Belegtzustand: | |
---|---|
Data[6] | OccupationCode |
Mögliche Antworten:
OccupationCode
public static final Command SETSGN
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 2 |
Data[0] | SETSGN |
Data[1] | SignalCode |
Mögliche Antworten:
SignalCode
public static final Command CFGBGN
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | CFGBGN |
Mögliche Antworten:
public static final Command CFGSWN
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 5 |
Data[0] | CFGSWN |
Data[1] | Schaltpin links/Bogen |
Data[2] | Schaltpin rechts/Kreuz |
Data[3] | Weichenlage links |
Data[4] | Weichenlage rechts |
Mögliche Antworten:
public static final Command CFGSWO
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGSWO |
Data[1] | Schaltpin links/Bogen |
Data[2] | Schaltpin rechts/Kreuz |
Mögliche Antworten:
public static final Command CFGRAI
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGRAI |
Data[1] | Schaltpin Gleis |
Data[2] | Abfragepin Gleis |
Mögliche Antworten:
public static final Command CFGPF2
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGPF2 |
Data[1] | Schaltpin Vr0 |
Data[2] | Schaltpin Vr1 |
Mögliche Antworten:
public static final Command CFGPF3
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 4 |
Data[0] | CFGPF3 |
Data[1] | Schaltpin Vr0 |
Data[2] | Schaltpin Vr1 |
Data[2] | Schaltpin Vr2 |
Mögliche Antworten:
public static final Command CFGMF2
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGMF2 |
Data[1] | Schaltpin Hp0 |
Data[2] | Schaltpin Hp1 |
Mögliche Antworten:
public static final Command CFGMF3
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 4 |
Data[0] | CFGMF3 |
Data[1] | Schaltpin Hp0 |
Data[2] | Schaltpin Hp1 |
Data[2] | Schaltpin Hp2 |
Mögliche Antworten:
public static final Command CFGPL2
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGPL2 |
Data[1] | Schaltpin gelb |
Data[2] | Schaltpin grün |
Mögliche Antworten:
public static final Command CFGPL3
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 5 |
Data[0] | CFGPL3 |
Data[1] | Schaltpin gelb links oben |
Data[2] | Schaltpin gelb links unten |
Data[1] | Schaltpin grün rechts oben |
Data[2] | Schaltpin grün rechts unten |
Mögliche Antworten:
public static final Command CFGSL2
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGSL2 |
Data[1] | Schaltpin rot |
Data[2] | Schaltpin weiß |
Mögliche Antworten:
public static final Command CFGML2
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 |
Data[0] | CFGML2 |
Data[1] | Schaltpin rot |
Data[2] | Schaltpin grün |
Mögliche Antworten:
public static final Command CFGML3
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 4 |
Data[0] | CFGML3 |
Data[1] | Schaltpin rot |
Data[2] | Schaltpin grün |
Data[3] | Schaltpin gelb |
Mögliche Antworten:
public static final Command CFGML4
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 6 |
Data[0] | CFGML4 |
Data[1] | Schaltpin rot links |
Data[2] | Schaltpin rot rechts |
Data[3] | Schaltpin weiß |
Data[4] | Schaltpin grün |
Data[5] | Schaltpin gelb |
Mögliche Antworten:
public static final Command CFGLGT
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | Gerätenummer |
Länge: | 3 oder 4 |
Data[0] | CFGLGT |
Data[1] | Schaltpin |
Data[2] | Schwellwert |
Data[3] | Typ (optional) |
Mögliche Antworten:
public static final Command CFGEND
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | CFGEND |
Mögliche Antworten:
MsgCode.MSG_OK
In diesem Falle steht in Data[4] die Zahl der konfigurierten Geräte.
MsgCode.MSG_RESET_PENDING
MsgCode.MSG_NOT_IN_CONFIG_MODE
public static final Command SET_ID
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 3 |
Data[0] | SET_ID |
Data[1] | Neue Controller-ID, Low Byte |
Data[2] | Neue Controller-ID, High Byte |
Mögliche Antworten:
public static final Command PING
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | PING |
Mögliche Antworten:
public static final Command RESET
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | RESET |
Mögliche Antworten:
MsgCode.MSG_OK
MsgCode.MSG_RESET_PENDING
MsgCode.MSG_BOOTED
In Data[4] steht vom Mikroprozessor das MCUSR. Es gibt den Grund für das Booten an.
MsgCode.MSG_INFO
public static final Command GETCFG
Mögliche Antworten:
public static final Command GETDVC
Mögliche Antworten:
public static final Command FLASH_REQ
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 5 |
Data[0] | FLASH_REQ |
Data[1] | Jumperstellung |
Data[2] | Signaturbyte 1 der MPU |
Data[3] | Signaturbyte 2 der MPU |
Data[4] | Signaturbyte 3 der MPU |
Antwort im Betriebsmodus:
Mögliche Antworten im Bootloader:
public static final Command FLASH_DATA
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 6 oder 8 |
Data[0] | FLASH_DATA |
Data[1] | Adresse, Low Byte |
Data[2] | Adresse, Mid Byte |
Data[3] | Adresse, High Byte |
Data[4] | Programmbyte |
Data[5] | Programmbyte |
Data[6] | Programmbyte (bei Frame Länge 8) |
Data[7] | Programmbyte (bei Frame Länge 8) |
Antwort im Betriebsmodus:
Antwort im Bootloader:
public static final Command FLASH_CHECK
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 2 |
Data[0] | FLASH_CHECK |
Data[1] | Prüfsumme |
Antwort im Betriebsmodus:
Mögliche Antworten im Bootloader:
Als weitere Daten werden zurückgemeldet
Aufteilung Prüfsummen: | |
---|---|
Data[4] | Data[5] |
Angeforderte Prüfsumme | Prüfsumme aus den FLASH_DATA-Messages |
public static final Command QRYBUF
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | QRYBUF |
Als Antwort kommt ein Frame mit dem Füllzustand der Sende- und Empfangspuffer.
Aufteilung Füllzustand: | |
---|---|
Data[4] | Data[5] |
Füllzustand Empfangspuffer | Füllzustand Sendepuffer |
Mögliche Antworten:
public static final Command QRYERR
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | QRYERR |
Als Antwort kommen drei Frames mit dem Fehlerzustand. Die Fehlerzustand besteht aus drei Bytes. Für jedes Byte kann ein Frame gesendet werden. Das fünfte Datenbyte bestimmt den Index des Fehlerzustandes. Das sechste bis achte Datenbyte ist das Zustandsbyte.
Aufteilung Fehlerzustand: | |||
---|---|---|---|
Data[4] | Data[5] | Data[6] | Data[7] |
0 | Error Flags | ||
1 | Zähler für Empfangsfehler | ||
2 | Zähler für Sendefehler | ||
3 | Error Flags | Zähler für Empfangsfehler | Zähler für Sendefehler |
Mögliche Antworten:
public static final Command GETVER
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | GETVER |
Als Antwort kommen drei Frames mit der Versionsnummer. Die Versionsnummer besteht aus drei Bytes. Für jedes Byte kann ein Frame gesendet werden. Das fünfte Datenbyte bestimmt die Nummer des Versionsbytes. Das sechste bis achte Datenbyte ist das Versionsbyte.
Aufteilung Versionsnummer: | |||
---|---|---|---|
Data[4] | Data[5] | Data[6] | Data[7] |
0 | Major Version | ||
1 | Minor Version, Low Byte | ||
2 | Minor Version, High Byte | ||
3 | Major Version | Minor Version, Low Byte | Minor Version, High Byte |
Mögliche Antworten:
public static final Command SENSOR
Aufbau CAN-Frame: | |
---|---|
Standard-ID: | Controller-ID |
Extended-ID: | nicht nötig |
Länge: | 1 |
Data[0] | SENSOR |
Als Antwort kommen die Sensordaten bestehend aus zwei Bytes. Das erste Byte ist der Sensortyp. Das zweite Byte beinhaltet den Wert.
Aufteilung Sensorwerte: | |
---|---|
Data[4] | Data[5] |
Sensortyp | Sensorwert |
1 | Temperatur |
2 | Helligkeit |
Mögliche Antworten:
public static final int CAT_SWITCH
public static final int CAT_RAIL
public static final int CAT_SIGNAL
public static final int CAT_CONFIG
public static final int CAT_EXT
public static final int CAT_MASK
public static Command[] values()
for (Command c : Command.values()) System.out.println(c);
public static Command valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getCommand()
MrwMessage
zurück.MrwMessage
.public static Command getCommand(int code)
MrwMessage
-Kommandos in eine Command-enum-Instanz um.code
- Der Kommando-Code aus einer MrwMessage
.CodeNotFoundException
- Wenn zum code keine Enum-Instanz gefunden wurde.public static boolean isResult(int code)
code
- Der zu testende Kommando-Code.MrwMessage
public static int makeResult(byte code)
code
- Der Kommando-Code als Byte.public static int makeResult(Command cmd)
cmd
- Der Kommando-Code.Copyright © 2011 all committers of this modelrailway project