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);
}
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);
}
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);
}
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);
}
}
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);
}
Aggregations