Package avrora.sim.mcu

Examples of avrora.sim.mcu.USART$Transmitter


         * @param s Simulator
         */
        Monitor(Simulator s) {
            if( s.getID() == NODE.get()) {
                AtmelMicrocontroller mcu = (AtmelMicrocontroller)s.getMicrocontroller();
                USART usart = (USART)mcu.getDevice("usart0");
                new SerialForwarder(usart, (int)PORT.get());
            }
        }
View Full Code Here


    }

    private void send(X10Event[] events) throws CruiseControlException {
        LOG.info("Sending X10 events...");
        Transmitter transmitter = getTransmitter();
        if (port != null) {
            ((SerialGateway) transmitter).setPortName(port);
        }
        try {
            ((Gateway) transmitter).allocate();
        } catch (Exception e) {
            throw new CruiseControlException("Trouble allocating the x10 gateway.", e);
        }

        for (int j = 0; j < events.length; j++) {
            LOG.debug("Transmitting: " + events[ j ]);
            try {
                transmitter.transmit(events[ j ]);
            } catch (IOException e) {
                throw new CruiseControlException("Trouble transmitting event " + events[ j ], e);
            }
        }
View Full Code Here

TOP

Related Classes of avrora.sim.mcu.USART$Transmitter

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.