Package org.jboss.netty.buffer

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


            ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter(getProtocol());
            extendedInfo.set("index", index);
           
            // Location
            position.setTime(new Date(buf.readUnsignedInt() * 1000));
            position.setLatitude(buf.readInt() / 1800000.0);
            position.setLongitude(buf.readInt() / 1800000.0);
            position.setSpeed(buf.readUnsignedByte() * 0.539957);
            position.setCourse((double) buf.readUnsignedShort());
            position.setAltitude(0.0);
           
View Full Code Here


            extendedInfo.set("index", index);
           
            // Location
            position.setTime(new Date(buf.readUnsignedInt() * 1000));
            position.setLatitude(buf.readInt() / 1800000.0);
            position.setLongitude(buf.readInt() / 1800000.0);
            position.setSpeed(buf.readUnsignedByte() * 0.539957);
            position.setCourse((double) buf.readUnsignedShort());
            position.setAltitude(0.0);
           
            // Cell
View Full Code Here

            buf.readUnsignedByte(); // mode 2

            position.setValid(buf.readUnsignedByte() >= 3); // satellites

            // Location data
            position.setLongitude(buf.readInt() / Math.PI * 180 / 100000000);
            position.setLatitude(buf.readInt() / Math.PI * 180 / 100000000.0);
            position.setAltitude(buf.readInt() * 0.01);
            position.setSpeed(buf.readInt() * 0.01 * 1.943844);
            position.setCourse(buf.readUnsignedShort() / Math.PI * 180.0 / 1000.0);
           
View Full Code Here

            position.setValid(buf.readUnsignedByte() >= 3); // satellites

            // Location data
            position.setLongitude(buf.readInt() / Math.PI * 180 / 100000000);
            position.setLatitude(buf.readInt() / Math.PI * 180 / 100000000.0);
            position.setAltitude(buf.readInt() * 0.01);
            position.setSpeed(buf.readInt() * 0.01 * 1.943844);
            position.setCourse(buf.readUnsignedShort() / Math.PI * 180.0 / 1000.0);
           
            // Time
View Full Code Here

            position.setValid(buf.readUnsignedByte() >= 3); // satellites

            // Location data
            position.setLongitude(buf.readInt() / Math.PI * 180 / 100000000);
            position.setLatitude(buf.readInt() / Math.PI * 180 / 100000000.0);
            position.setAltitude(buf.readInt() * 0.01);
            position.setSpeed(buf.readInt() * 0.01 * 1.943844);
            position.setCourse(buf.readUnsignedShort() / Math.PI * 180.0 / 1000.0);
           
            // Time
            Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
View Full Code Here

            // Location data
            position.setLongitude(buf.readInt() / Math.PI * 180 / 100000000);
            position.setLatitude(buf.readInt() / Math.PI * 180 / 100000000.0);
            position.setAltitude(buf.readInt() * 0.01);
            position.setSpeed(buf.readInt() * 0.01 * 1.943844);
            position.setCourse(buf.readUnsignedShort() / Math.PI * 180.0 / 1000.0);
           
            // Time
            Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
            time.clear();
View Full Code Here

                    position.setTime(new Date(buf.readUnsignedInt() * 1000));
                    break;
                   
                case TAG_COORDINATES:
                    position.setValid((buf.readUnsignedByte() & 0xf0) == 0x00);
                    position.setLatitude(buf.readInt() / 1000000.0);
                    position.setLongitude(buf.readInt() / 1000000.0);
                    break;
                   
                case TAG_SPEED_COURSE:
                    position.setSpeed(buf.readUnsignedShort() * 0.0539957);
 
View Full Code Here

                    break;
                   
                case TAG_COORDINATES:
                    position.setValid((buf.readUnsignedByte() & 0xf0) == 0x00);
                    position.setLatitude(buf.readInt() / 1000000.0);
                    position.setLongitude(buf.readInt() / 1000000.0);
                    break;
                   
                case TAG_SPEED_COURSE:
                    position.setSpeed(buf.readUnsignedShort() * 0.0539957);
                    position.setCourse(buf.readUnsignedShort() * 0.1);
 
View Full Code Here

                time.clear();
                time.setTimeInMillis(buf.readUnsignedInt() * 1000);
                position.setTime(time.getTime());

                // Latitude
                position.setLatitude(buf.readInt() * 180.0 / 0x7FFFFFFF);

                // Longitude
                position.setLongitude(buf.readInt() * 180.0 / 0x7FFFFFFF);

                // Speed and Validity
View Full Code Here

                // Latitude
                position.setLatitude(buf.readInt() * 180.0 / 0x7FFFFFFF);

                // Longitude
                position.setLongitude(buf.readInt() * 180.0 / 0x7FFFFFFF);

                // Speed and Validity
                if (subtype == MSG_TYPE_STATE_FULL_INFO_T104) {
                    int speed = buf.readUnsignedByte();
                    position.setValid(speed != 255);
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.