Search in sources :

Example 6 with XNetMessage

use of jmri.jmrix.lenz.XNetMessage in project JMRI by JMRI.

the class StackMonFrame method requestFunctionStatus.

/*
     * Request the momentary/continuous status of functions for the 
     * current address.
     */
@SuppressWarnings("unused")
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "This is part of work in progress code to allow display of all information about the locomotives in the stack.")
private void requestFunctionStatus() {
    int address = 0;
    if (!adrTextField.getText().equals("")) {
        address = Integer.parseInt(adrTextField.getText());
        XNetMessage msg = XNetMessage.getLocomotiveFunctionStatusMsg(address);
        tc.sendXNetMessage(msg, this);
    }
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Example 7 with XNetMessage

use of jmri.jmrix.lenz.XNetMessage in project JMRI by JMRI.

the class StackMonFrame method getNextEntry.

/*
     *  Request the next entry
     */
private void getNextEntry() {
    int address = 0;
    if (!adrTextField.getText().equals("")) {
        address = Integer.parseInt(adrTextField.getText());
    }
    XNetMessage msg = XNetMessage.getNextAddressOnStackMsg(address, true);
    tc.sendXNetMessage(msg, this);
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage)

Example 8 with XNetMessage

use of jmri.jmrix.lenz.XNetMessage in project JMRI by JMRI.

the class StackMonFrame method requestStatus.

/*
     * Request the status of the current address
     */
@SuppressWarnings("unused")
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "This is part of work in progress code to allow display of all information about the locomotives in the stack.")
private void requestStatus() {
    int address = 0;
    if (!adrTextField.getText().equals("")) {
        address = Integer.parseInt(adrTextField.getText());
        XNetMessage msg = XNetMessage.getLocomotiveInfoRequestMsg(address);
        tc.sendXNetMessage(msg, this);
    }
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Example 9 with XNetMessage

use of jmri.jmrix.lenz.XNetMessage in project JMRI by JMRI.

the class LZ100InternalFrame method resetLZ100CS.

// reset the command station to factory defaults
synchronized void resetLZ100CS() {
    resetCSButton.setEnabled(false);
    status.setText(rb.getString("LZ100StatusReset"));
    // the Command station is reset by sending F4 25 times for address 00
    XNetMessage msgon = XNetMessage.getFunctionGroup1OpsMsg(0, false, false, false, true, false);
    resetMode = ONSENT;
    sendCount = 25;
    tc.sendXNetMessage(msgon, this);
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage)

Example 10 with XNetMessage

use of jmri.jmrix.lenz.XNetMessage in project JMRI by JMRI.

the class LIUSBConfigFrame method readLIUSBSettings.

//Send Information request to LIUSB
void readLIUSBSettings() {
    /* we request setting an out of range address 
         to get the current value. */
    XNetMessage msg = XNetMessage.getLIAddressRequestMsg(32);
    //Then send to the controller
    tc.sendXNetMessage(msg, this);
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage)

Aggregations

XNetMessage (jmri.jmrix.lenz.XNetMessage)55 XNetReply (jmri.jmrix.lenz.XNetReply)14 Test (org.junit.Test)14 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)2 IOException (java.io.IOException)1 XNetListenerScaffold (jmri.jmrix.lenz.XNetListenerScaffold)1 Z21Reply (jmri.jmrix.roco.z21.Z21Reply)1