Package org.jboss.netty.buffer

Examples of org.jboss.netty.buffer.ChannelBuffer.readUnsignedShort()


       
        // ADC
        if ((selector & 0x0020) != 0) {
            extendedInfo.set("adc1", buf.readUnsignedShort());
            extendedInfo.set("adc2", buf.readUnsignedShort());
            extendedInfo.set("adc3", buf.readUnsignedShort());
            extendedInfo.set("adc4", buf.readUnsignedShort());
        }

        // Power
        if ((selector & 0x8000) != 0) {
View Full Code Here


        // ADC
        if ((selector & 0x0020) != 0) {
            extendedInfo.set("adc1", buf.readUnsignedShort());
            extendedInfo.set("adc2", buf.readUnsignedShort());
            extendedInfo.set("adc3", buf.readUnsignedShort());
            extendedInfo.set("adc4", buf.readUnsignedShort());
        }

        // Power
        if ((selector & 0x8000) != 0) {
            extendedInfo.set("power", buf.readUnsignedShort() / 1000.0);
View Full Code Here

            extendedInfo.set("adc4", buf.readUnsignedShort());
        }

        // Power
        if ((selector & 0x8000) != 0) {
            extendedInfo.set("power", buf.readUnsignedShort() / 1000.0);
            extendedInfo.set("battery", buf.readUnsignedShort());
        }
       
        // Pulse rate 1
        if ((selector & 0x10000) != 0) {
View Full Code Here

        }

        // Power
        if ((selector & 0x8000) != 0) {
            extendedInfo.set("power", buf.readUnsignedShort() / 1000.0);
            extendedInfo.set("battery", buf.readUnsignedShort());
        }
       
        // Pulse rate 1
        if ((selector & 0x10000) != 0) {
            buf.readUnsignedShort();
View Full Code Here

            extendedInfo.set("battery", buf.readUnsignedShort());
        }
       
        // Pulse rate 1
        if ((selector & 0x10000) != 0) {
            buf.readUnsignedShort();
            buf.readUnsignedInt();
        }
       
        // Pulse rate 2
        if ((selector & 0x20000) != 0) {
View Full Code Here

            buf.readUnsignedInt();
        }
       
        // Pulse rate 2
        if ((selector & 0x20000) != 0) {
            buf.readUnsignedShort();
            buf.readUnsignedInt();
        }

        // Trip 1
        if ((selector & 0x0080) != 0) {
View Full Code Here

    protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
            throws Exception {

        ChannelBuffer buf = (ChannelBuffer) msg;

        buf.readUnsignedShort(); // data length

        // Identify device
        String imei = String.format("%015d", buf.readLong());
        long deviceId;
        try {
View Full Code Here

                buf.readUnsignedByte(); // priority (reserved)
               
                // Location
                position.setLongitude(buf.readInt() / 10000000.0);
                position.setLatitude(buf.readInt() / 10000000.0);
                position.setAltitude(buf.readUnsignedShort() / 10.0);
                position.setCourse(buf.readUnsignedShort() / 100.0);

                // Validity
                int satellites = buf.readUnsignedByte();
                extendedInfo.set("satellites", satellites);
View Full Code Here

               
                // Location
                position.setLongitude(buf.readInt() / 10000000.0);
                position.setLatitude(buf.readInt() / 10000000.0);
                position.setAltitude(buf.readUnsignedShort() / 10.0);
                position.setCourse(buf.readUnsignedShort() / 100.0);

                // Validity
                int satellites = buf.readUnsignedByte();
                extendedInfo.set("satellites", satellites);
                position.setValid(satellites >= 3);
View Full Code Here

                // Validity
                int satellites = buf.readUnsignedByte();
                extendedInfo.set("satellites", satellites);
                position.setValid(satellites >= 3);

                position.setSpeed(buf.readUnsignedShort() * 0.539957);

                extendedInfo.set("hdop", buf.readUnsignedByte() / 10.0);

                buf.readUnsignedByte();

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.