Search in sources :

Example 1 with EcosMessage

use of jmri.jmrix.ecos.EcosMessage in project JMRI by JMRI.

the class EcosLocoToRoster method getFunctionDetails.

void getFunctionDetails(int func) {
    //Only gets information for function numbers upto 28
    if (func >= 29) {
        return;
    }
    String message = "get(" + _ecosObject + ", funcdesc[" + func + "])";
    EcosMessage m = new EcosMessage(message);
    adaptermemo.getTrafficController().sendEcosMessage(m, this);
}
Also used : EcosMessage(jmri.jmrix.ecos.EcosMessage)

Example 2 with EcosMessage

use of jmri.jmrix.ecos.EcosMessage in project JMRI by JMRI.

the class StatusPanel method sendButtonActionPerformed.

public void sendButtonActionPerformed(java.awt.event.ActionEvent e) {
    reset();
    EcosMessage m = new EcosMessage("get(1, info)");
    tc.sendEcosMessage(m, null);
}
Also used : EcosMessage(jmri.jmrix.ecos.EcosMessage)

Example 3 with EcosMessage

use of jmri.jmrix.ecos.EcosMessage in project JMRI by JMRI.

the class RemoveObjectFromEcos method deleteObject.

private void deleteObject() {
    EcosMessage m;
    String message = "delete(" + _ecosObject + ")";
    m = new EcosMessage(message);
    tc.sendEcosMessage(m, this);
}
Also used : EcosMessage(jmri.jmrix.ecos.EcosMessage)

Example 4 with EcosMessage

use of jmri.jmrix.ecos.EcosMessage in project JMRI by JMRI.

the class EcosLocoTableAction method stopLoco.

void stopLoco(int row, int col) {
    String objectNumber = ecosObjectIdList.get(row);
    EcosMessage msg;
    //We will repeat this three times to make sure it gets through.
    for (int x = 0; x < 3; x++) {
        msg = new EcosMessage("request(" + objectNumber + ", control, force)");
        adaptermemo.getTrafficController().sendEcosMessage(msg, null);
        msg = new EcosMessage("set(" + objectNumber + ", stop)");
        adaptermemo.getTrafficController().sendEcosMessage(msg, null);
        msg = new EcosMessage("release(" + objectNumber + ", control)");
        adaptermemo.getTrafficController().sendEcosMessage(msg, null);
    }
}
Also used : EcosMessage(jmri.jmrix.ecos.EcosMessage)

Example 5 with EcosMessage

use of jmri.jmrix.ecos.EcosMessage in project JMRI by JMRI.

the class PacketGenPanel method sendButtonActionPerformed.

public void sendButtonActionPerformed(java.awt.event.ActionEvent e) {
    EcosMessage m = new EcosMessage(packetTextField.getText().length());
    for (int i = 0; i < packetTextField.getText().length(); i++) {
        m.setElement(i, packetTextField.getText().charAt(i));
    }
    memo.getTrafficController().sendEcosMessage(m, this);
}
Also used : EcosMessage(jmri.jmrix.ecos.EcosMessage)

Aggregations

EcosMessage (jmri.jmrix.ecos.EcosMessage)10 BoxLayout (javax.swing.BoxLayout)2 JButton (javax.swing.JButton)2 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 MouseEvent (java.awt.event.MouseEvent)1 Hashtable (java.util.Hashtable)1 List (java.util.List)1 JDialog (javax.swing.JDialog)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JTable (javax.swing.JTable)1 JTextField (javax.swing.JTextField)1 RowSorter (javax.swing.RowSorter)1 TableCellEditor (javax.swing.table.TableCellEditor)1 TableCellRenderer (javax.swing.table.TableCellRenderer)1 TableColumn (javax.swing.table.TableColumn)1 TableModel (javax.swing.table.TableModel)1 TableRowSorter (javax.swing.table.TableRowSorter)1 NamedBean (jmri.NamedBean)1