Package org.thingml.bglib

Examples of org.thingml.bglib.BGAPIPacketReader


    public void packetSent(BGAPIPacket packet) {}

    public void packetReceived(BGAPIPacket packet) {
        System.out.println("Received: " + packet.toString());
        if (packet.getClassID() == 0 && packet.getCommandID() == 8) {
            BGAPIPacketReader r = packet.getPayloadReader();
            Integer major = r.r_uint16();
            Integer minor = r.r_uint16();
            Integer patch = r.r_uint16();
            Integer build = r.r_uint16();
            Integer ll_version = r.r_uint16();
            Integer protocol_version = r.r_uint8();
            Integer hw = r.r_uint8();
            System.out.println("get_info_rsp :" + major + "." + minor + "." + patch + " (" + build + ") " + "ll=" + ll_version + " hw=" + hw);
        }
    }
View Full Code Here

TOP

Related Classes of org.thingml.bglib.BGAPIPacketReader

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.