Search in sources :

Example 1 with XNetMessage

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

the class StackMonDataModel method setValueAt.

@Override
public void setValueAt(Object value, int row, int col) {
    log.debug("setValueAt called for row: " + row + " column: " + col);
    switch(col) {
        case DELCOLUMN:
            log.debug("Delete Called for row " + row);
            fireTableRowsDeleted(row, row);
            // delete address from table
            XNetMessage msg = XNetMessage.getDeleteAddressOnStackMsg((_addressList.get(row)).intValue());
            tc.sendXNetMessage(msg, _stackFrame);
            _typeList.remove(_addressList.get(row));
            _addressList.remove(row);
            fireTableDataChanged();
            break;
        default:
            log.error("Unknown Operation");
    }
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage)

Example 2 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) {
    XNetMessage msg = XNetMessage.getNextAddressOnStackMsg(address, true);
    tc.sendXNetMessage(msg, this);
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage)

Example 3 with XNetMessage

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

the class StackMonFrame method getPreviousEntry.

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

Example 4 with XNetMessage

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

the class LZ100InternalFrame method amModeSave.

// set the current automatic/manual mode
synchronized void amModeSave() {
    if (log.isDebugEnabled()) {
        if (autoMode) {
            log.debug("Auto Mode True");
        } else {
            log.debug("Auto Mode False");
        }
    }
    XNetMessage msg = XNetMessage.getCSAutoStartMessage(autoMode);
    tc.sendXNetMessage(msg, this);
    amModeSetButton.setSelected(false);
    status.setText(rb.getString("LZ100StatusSetMode"));
}
Also used : XNetMessage(jmri.jmrix.lenz.XNetMessage)

Example 5 with XNetMessage

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

the class LZ100InternalFrame method amModeGet.

// get the current automatic/manual mode
synchronized void amModeGet() {
    XNetMessage msg = XNetMessage.getCSStatusRequestMessage();
    tc.sendXNetMessage(msg, this);
    amModeGetButton.setSelected(false);
    status.setText(rb.getString("LZ100StatusRetrieveMode"));
}
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