Search in sources :

Example 11 with Message

use of org.openlcb.Message in project JMRI by JMRI.

the class OpenLcbCanSendPane method sendReqProducers.

public void sendReqProducers(java.awt.event.ActionEvent e) {
    Message m = new IdentifyProducersMessage(srcNodeID, eventID());
    connection.put(m, null);
}
Also used : IdentifyProducersMessage(org.openlcb.IdentifyProducersMessage) IdentifyProducersMessage(org.openlcb.IdentifyProducersMessage) CanMessage(jmri.jmrix.can.CanMessage) DatagramMessage(org.openlcb.DatagramMessage) IdentifyEventsMessage(org.openlcb.IdentifyEventsMessage) ProducerConsumerEventReportMessage(org.openlcb.ProducerConsumerEventReportMessage) DatagramAcknowledgedMessage(org.openlcb.DatagramAcknowledgedMessage) Message(org.openlcb.Message) IdentifyConsumersMessage(org.openlcb.IdentifyConsumersMessage) VerifyNodeIDNumberMessage(org.openlcb.VerifyNodeIDNumberMessage)

Example 12 with Message

use of org.openlcb.Message in project JMRI by JMRI.

the class OpenLcbCanSendPane method sendVerifyNodeGlobalID.

public void sendVerifyNodeGlobalID(java.awt.event.ActionEvent e) {
    Message m = new VerifyNodeIDNumberMessage(srcNodeID, destNodeID());
    connection.put(m, null);
}
Also used : IdentifyProducersMessage(org.openlcb.IdentifyProducersMessage) CanMessage(jmri.jmrix.can.CanMessage) DatagramMessage(org.openlcb.DatagramMessage) IdentifyEventsMessage(org.openlcb.IdentifyEventsMessage) ProducerConsumerEventReportMessage(org.openlcb.ProducerConsumerEventReportMessage) DatagramAcknowledgedMessage(org.openlcb.DatagramAcknowledgedMessage) Message(org.openlcb.Message) IdentifyConsumersMessage(org.openlcb.IdentifyConsumersMessage) VerifyNodeIDNumberMessage(org.openlcb.VerifyNodeIDNumberMessage) VerifyNodeIDNumberMessage(org.openlcb.VerifyNodeIDNumberMessage)

Example 13 with Message

use of org.openlcb.Message in project JMRI by JMRI.

the class OpenLcbCanSendPane method sendReqConsumers.

public void sendReqConsumers(java.awt.event.ActionEvent e) {
    Message m = new IdentifyConsumersMessage(srcNodeID, eventID());
    connection.put(m, null);
}
Also used : IdentifyConsumersMessage(org.openlcb.IdentifyConsumersMessage) IdentifyProducersMessage(org.openlcb.IdentifyProducersMessage) CanMessage(jmri.jmrix.can.CanMessage) DatagramMessage(org.openlcb.DatagramMessage) IdentifyEventsMessage(org.openlcb.IdentifyEventsMessage) ProducerConsumerEventReportMessage(org.openlcb.ProducerConsumerEventReportMessage) DatagramAcknowledgedMessage(org.openlcb.DatagramAcknowledgedMessage) Message(org.openlcb.Message) IdentifyConsumersMessage(org.openlcb.IdentifyConsumersMessage) VerifyNodeIDNumberMessage(org.openlcb.VerifyNodeIDNumberMessage)

Example 14 with Message

use of org.openlcb.Message in project JMRI by JMRI.

the class MonitorPane method frameToMessages.

// see jmri.jmrix.openlcb.OlcbConfigurationManager
java.util.List<Message> frameToMessages(int header, int len, int[] content) {
    OpenLcbCanFrame frame = new OpenLcbCanFrame(header & 0xFFF);
    frame.setHeader(header);
    if (len != 0) {
        byte[] data = new byte[len];
        for (int i = 0; i < data.length; i++) {
            data[i] = (byte) content[i];
        }
        frame.setData(data);
    }
    aliasMap.processFrame(frame);
    java.util.List<Message> list = messageBuilder.processFrame(frame);
    return list;
}
Also used : Message(org.openlcb.Message) CanMessage(jmri.jmrix.can.CanMessage) OpenLcbCanFrame(org.openlcb.can.OpenLcbCanFrame)

Aggregations

Message (org.openlcb.Message)14 CanMessage (jmri.jmrix.can.CanMessage)9 DatagramAcknowledgedMessage (org.openlcb.DatagramAcknowledgedMessage)8 DatagramMessage (org.openlcb.DatagramMessage)8 IdentifyConsumersMessage (org.openlcb.IdentifyConsumersMessage)8 IdentifyEventsMessage (org.openlcb.IdentifyEventsMessage)8 IdentifyProducersMessage (org.openlcb.IdentifyProducersMessage)8 ProducerConsumerEventReportMessage (org.openlcb.ProducerConsumerEventReportMessage)8 VerifyNodeIDNumberMessage (org.openlcb.VerifyNodeIDNumberMessage)8 ProducerIdentifiedMessage (org.openlcb.ProducerIdentifiedMessage)5 ProtocolIdentificationReplyMessage (org.openlcb.ProtocolIdentificationReplyMessage)5 SimpleNodeIdentInfoReplyMessage (org.openlcb.SimpleNodeIdentInfoReplyMessage)5 Test (org.junit.Test)4 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)2 NodeTreeRep (org.openlcb.swing.networktree.NodeTreeRep)2 JFrame (javax.swing.JFrame)1 JTree (javax.swing.JTree)1 TreeSelectionEvent (javax.swing.event.TreeSelectionEvent)1 TreeSelectionListener (javax.swing.event.TreeSelectionListener)1 Before (org.junit.Before)1