Package com.grt192.core

Examples of com.grt192.core.Message


     * Gets the encoder wired to the control IO on this CANJaguar.
     * @return
     */
    synchronized public GRTJagEncoder getEncoder() {
        if (encoder == null) {
            encoder = new GRTJagEncoder(this, 25, "Encoder" + this);
            encoder.start();
        }
        return encoder;
    }
View Full Code Here


     * Gets a fault sensor, which polls the Jaguar for faults
     * @return a fault sensor
     */
    synchronized public GRTJagFaultSensor getFaultSensor() {
        if (faultSensor == null) {
            faultSensor = new GRTJagFaultSensor(this, 50, "FaultSensor" + this);
            faultSensor.start();
        }
        return faultSensor;

    }
View Full Code Here

     * @return
     */
    synchronized public GRTJagPotentiometer getPotentiometer() {
        if (potentiometer == null) {
            potentiometer =
                    new GRTJagPotentiometer(this, 25, "Potentiometer" + this);
            potentiometer.start();
        }
        return potentiometer;
    }
View Full Code Here

     *
     * @return
     */
    public GRTJagPowerSensor getPowerSensor() {
        if (powerSensor == null) {
            powerSensor = new GRTJagPowerSensor(this, 50, "PowerSensor" + this);
            powerSensor.start();
        }
        return powerSensor;
    }
View Full Code Here

     * Gets a power sensor associated with this CANJaguar
     * @return
     */
    synchronized public GRTJagPowerSensor getPowerSensor() {
        if (powerSensor == null) {
            powerSensor = new GRTJagPowerSensor(this, 50, "PowerSensor" + this);
            powerSensor.start();
        }
        return powerSensor;
    }
View Full Code Here

     *
     * @return
     */
    public GRTJagSwitch getSwitches() {
        if (switches == null) {
            switches = new GRTJagSwitch(this, 5, "Switch" + this);
            switches.start();
        }
        return switches;
    }
View Full Code Here

            ((ProcessBuildData) parser.getData()).getMetaData("Messages");
        if (messages == null) {
            messages = new HashMap<String, Message>();
            buildData.setMetaData("Messages", messages);
        }
        Message message = new Message(id);
        message.setType(itemDefinition.getStructureRef());
        messages.put(id, message);
    return message;
  }
View Full Code Here

    Map<String, Message> messages = (Map<String, Message>)
            ((ProcessBuildData) parser.getData()).getMetaData("Messages");
        if (messages == null) {
            throw new IllegalArgumentException("No messages found");
        }
        Message message = messages.get(messageId);
        if (message == null) {
            throw new IllegalArgumentException("Could not find message " + messageId);
        }
        Operation operation = (Operation) parser.getParent();
        operation.setMessage(message);
View Full Code Here

        Map<String, Message> messages = (Map<String, Message>)
            ((ProcessBuildData) parser.getData()).getMetaData("Messages");
        if (messages == null) {
            throw new IllegalArgumentException("No messages found");
        }
        Message message = messages.get(messageRef);
        if (message == null) {
            throw new IllegalArgumentException("Could not find message " + messageRef);
        }
        workItemNode.getWork().setParameter("MessageType", message.getType());
    }
View Full Code Here

                Map<String, Message> messages = (Map<String, Message>)
                    ((ProcessBuildData) parser.getData()).getMetaData("Messages");
                if (messages == null) {
                    throw new IllegalArgumentException("No messages found");
                }
                Message message = messages.get(messageRef);
                if (message == null) {
                    throw new IllegalArgumentException("Could not find message " + messageRef);
                }
                String variable = (String) actionNode.getMetaData("MappingVariable");
                actionNode.setMetaData("MessageType", message.getType());
                actionNode.setAction(new DroolsConsequenceAction("java",
                    "org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();" + EOL +
                    "workItem.setName(\"Send Task\");" + EOL +
                    "workItem.setParameter(\"MessageType\", \"" + message.getType() + "\");" + EOL +
                    (variable == null ? "" : "workItem.setParameter(\"Message\", " + variable + ");" + EOL) +
                    "((org.drools.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
            }
            xmlNode = xmlNode.getNextSibling();
        }
View Full Code Here

TOP

Related Classes of com.grt192.core.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.