Package avrora.sim

Examples of avrora.sim.State


        }

        public TestResult match(Throwable t) {
            if (t != null) return super.match(t);

            State state = simulator.getState();
            Iterator i = predicates.iterator();

            try {
                while (i.hasNext()) {
                    StatePredicate p = (StatePredicate)i.next();
View Full Code Here


         * socket.
         * @throws IOException if there is a problem communicating over the socket
         */
        void readAllRegisters() throws IOException {
            StringBuffer buf = new StringBuffer(84);
            State s = simulator.getState();
            for ( int cntr = 0; cntr < 32; cntr++ ) {
                appendGPR(s, cntr, buf);
            }
            appendSREG(s, buf);
            appendSP(s, buf);
View Full Code Here

         * given its number.
         * @throws IOException if there is a problem communicating over the socket
         */
        void readOneRegister(CharacterIterator i) throws IOException {
            StringBuffer buf = new StringBuffer(8);
            State s = simulator.getState();

            int num = StringUtil.readHexValue(i, 2);

            if ( num < 32 ) {
                // general purpose register
View Full Code Here

            int addr = StringUtil.readHexValue(i, 8);
            // read the length if it exists
            int length = 1;
            if ( StringUtil.peekAndEat(i, ',') )
                length = StringUtil.readHexValue(i, 8);
            State s = simulator.getState();
            StringBuffer buf = new StringBuffer(length*2);

            if ( (addr & MEMMASK) == MEMBEGIN ) {
                // reading from SRAM
                addr = addr & (~MEMMASK);
                for ( int cntr = 0; cntr < length; cntr++ ) {
                    byte value = s.getDataByte(addr+cntr);
                    buf.append(StringUtil.toHex(value & 0xff, 2));
                }
            } else {
                // reading from program memory
                for ( int cntr = 0; cntr < length; cntr++ ) {
                    byte value = s.getProgramByte(addr+cntr);
                    buf.append(StringUtil.toHex(value & 0xff, 2));
                }
            }

            sendPacketOK(buf.toString());
View Full Code Here

TOP

Related Classes of avrora.sim.State

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.