// Path: remote_controller/app/src/main/java/org/wilds/quadcontroller/app/communication/packet/Packet.java
// public abstract class Packet {
// 
//     public static final String TYPE_HELLO = "hello";
//     public static final String TYPE_MOTION = "rcinput";
//     public static final String TYPE_HEARTBEAT = "heartbeat";
//     public static final String TYPE_TEST_MOTOR = "tm";
// 
//     protected String type;
// 
//     public String getType() {
//         return type;
//     }
// 
//     protected void setType(String type) {
//         this.type = type;
//     }
// 
//     public boolean waitReply() {
//         return false;
//     }
// 
//     @Override
//     public String toString() {
//         return type;
//     }
// 
//     public byte[] getByte() { return this.toString().getBytes(); }
// 
//     public int getLength() {
//         return this.toString().length();
//     }
// }


import org.wilds.quadcontroller.app.communication.packet.Packet;
package org.wilds.quadcontroller.app.communication;


/**
 * Created by Wilds on 14/04/2014.
 */
public interface Protocol {
    public boolean isConnected();
    public boolean searchForQuadcopter();  // send broadcast udp packet
    public boolean connectToQuadcopter(String id);   // connect to quadcopter
// Path: remote_controller/app/src/main/java/org/wilds/quadcontroller/app/communication/packet/Packet.java
// public abstract class Packet {
// 
//     public static final String TYPE_HELLO = "hello";
//     public static final String TYPE_MOTION = "rcinput";
//     public static final String TYPE_HEARTBEAT = "heartbeat";
//     public static final String TYPE_TEST_MOTOR = "tm";
// 
//     protected String type;
// 
//     public String getType() {
//         return type;
//     }
// 
//     protected void setType(String type) {
//         this.type = type;
//     }
// 
//     public boolean waitReply() {
//         return false;
//     }
// 
//     @Override
//     public String toString() {
//         return type;
//     }
// 
//     public byte[] getByte() { return this.toString().getBytes(); }
// 
//     public int getLength() {
//         return this.toString().length();
//     }
// }


// Path: remote_controller/app/src/main/java/org/wilds/quadcontroller/app/communication/Protocol.java
import org.wilds.quadcontroller.app.communication.packet.Packet;

package org.wilds.quadcontroller.app.communication;


/**
 * Created by Wilds on 14/04/2014.
 */
public interface Protocol {
    public boolean isConnected();
    public boolean searchForQuadcopter();  // send broadcast udp packet
    public boolean connectToQuadcopter(String id);   // connect to quadcopter
    public boolean sendPacket(Packet packet);