// Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT!
// Generated from Cellbots.proto
package com.cellbots.cellserv.client;
import com.google.gwt.core.client.*;
public final class HALCommand extends JavaScriptObject {
public static final class Servo extends JavaScriptObject {
/**
* Creates a new Servo instance
*
* @return new Servo instance
*/
public static native Servo create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<Servo> instance
*
* @return new JsArray<Servo> instance
*/
public static native JsArray<Servo> createArray() /*-{
return [];
}-*/;
/**
* Gets a Servo (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return Servo
*/
public static native Servo get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<Servo> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<Servo>
*/
public static native JsArray<Servo> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a Servo from a json string
*
* @param json string to be parsed/evaluated
* @return Servo
*/
public static native Servo parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<Servo> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<Servo>
*/
public static native JsArray<Servo> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param Servo the object to serialize
* @return String the serialized json string
*/
public static native String stringify(Servo obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(Servo obj) /*-{
return
obj["iD"] != null;
}-*/;
protected Servo() {}
// getters and setters
// iD
public native String getID() /*-{
return this["iD"] || "";
}-*/;
public native void setID(String iD) /*-{
this["iD"] = iD;
}-*/;
public native void clearID() /*-{
delete this["iD"];
}-*/;
public native boolean hasID() /*-{
return this["iD"] != null;
}-*/;
// speed
public native int getSpeed() /*-{
return this["speed"] || 0;
}-*/;
public native void setSpeed(int speed) /*-{
this["speed"] = speed;
}-*/;
public native void clearSpeed() /*-{
delete this["speed"];
}-*/;
public native boolean hasSpeed() /*-{
return this["speed"] != null;
}-*/;
// targetPosition
public native int getTargetPosition() /*-{
return this["targetPosition"] || 0;
}-*/;
public native void setTargetPosition(int targetPosition) /*-{
this["targetPosition"] = targetPosition;
}-*/;
public native void clearTargetPosition() /*-{
delete this["targetPosition"];
}-*/;
public native boolean hasTargetPosition() /*-{
return this["targetPosition"] != null;
}-*/;
// torque
public native int getTorque() /*-{
return this["torque"] || 0;
}-*/;
public native void setTorque(int torque) /*-{
this["torque"] = torque;
}-*/;
public native void clearTorque() /*-{
delete this["torque"];
}-*/;
public native boolean hasTorque() /*-{
return this["torque"] != null;
}-*/;
// freeWheel
public native boolean getFreeWheel() /*-{
return this["freeWheel"] || false;
}-*/;
public native void setFreeWheel(boolean freeWheel) /*-{
this["freeWheel"] = freeWheel;
}-*/;
public native void clearFreeWheel() /*-{
delete this["freeWheel"];
}-*/;
public native boolean hasFreeWheel() /*-{
return this["freeWheel"] != null;
}-*/;
}
public static final class Motor extends JavaScriptObject {
/**
* Creates a new Motor instance
*
* @return new Motor instance
*/
public static native Motor create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<Motor> instance
*
* @return new JsArray<Motor> instance
*/
public static native JsArray<Motor> createArray() /*-{
return [];
}-*/;
/**
* Gets a Motor (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return Motor
*/
public static native Motor get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<Motor> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<Motor>
*/
public static native JsArray<Motor> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a Motor from a json string
*
* @param json string to be parsed/evaluated
* @return Motor
*/
public static native Motor parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<Motor> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<Motor>
*/
public static native JsArray<Motor> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param Motor the object to serialize
* @return String the serialized json string
*/
public static native String stringify(Motor obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(Motor obj) /*-{
return
obj["iD"] != null;
}-*/;
protected Motor() {}
// getters and setters
// iD
public native String getID() /*-{
return this["iD"] || "";
}-*/;
public native void setID(String iD) /*-{
this["iD"] = iD;
}-*/;
public native void clearID() /*-{
delete this["iD"];
}-*/;
public native boolean hasID() /*-{
return this["iD"] != null;
}-*/;
// steps
public native int getSteps() /*-{
return this["steps"] || 0;
}-*/;
public native void setSteps(int steps) /*-{
this["steps"] = steps;
}-*/;
public native void clearSteps() /*-{
delete this["steps"];
}-*/;
public native boolean hasSteps() /*-{
return this["steps"] != null;
}-*/;
// speed
public native int getSpeed() /*-{
return this["speed"] || 0;
}-*/;
public native void setSpeed(int speed) /*-{
this["speed"] = speed;
}-*/;
public native void clearSpeed() /*-{
delete this["speed"];
}-*/;
public native boolean hasSpeed() /*-{
return this["speed"] != null;
}-*/;
// freeWheel
public native boolean getFreeWheel() /*-{
return this["freeWheel"] || false;
}-*/;
public native void setFreeWheel(boolean freeWheel) /*-{
this["freeWheel"] = freeWheel;
}-*/;
public native void clearFreeWheel() /*-{
delete this["freeWheel"];
}-*/;
public native boolean hasFreeWheel() /*-{
return this["freeWheel"] != null;
}-*/;
}
public static final class PWM extends JavaScriptObject {
/**
* Creates a new PWM instance
*
* @return new PWM instance
*/
public static native PWM create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<PWM> instance
*
* @return new JsArray<PWM> instance
*/
public static native JsArray<PWM> createArray() /*-{
return [];
}-*/;
/**
* Gets a PWM (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return PWM
*/
public static native PWM get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<PWM> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<PWM>
*/
public static native JsArray<PWM> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a PWM from a json string
*
* @param json string to be parsed/evaluated
* @return PWM
*/
public static native PWM parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<PWM> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<PWM>
*/
public static native JsArray<PWM> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param PWM the object to serialize
* @return String the serialized json string
*/
public static native String stringify(PWM obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(PWM obj) /*-{
return
obj["iD"] != null
&& obj["frequency"] != null
&& obj["duty"] != null;
}-*/;
protected PWM() {}
// getters and setters
// iD
public native String getID() /*-{
return this["iD"] || "";
}-*/;
public native void setID(String iD) /*-{
this["iD"] = iD;
}-*/;
public native void clearID() /*-{
delete this["iD"];
}-*/;
public native boolean hasID() /*-{
return this["iD"] != null;
}-*/;
// frequency
public native int getFrequency() /*-{
return this["frequency"] || 0;
}-*/;
public native void setFrequency(int frequency) /*-{
this["frequency"] = frequency;
}-*/;
public native void clearFrequency() /*-{
delete this["frequency"];
}-*/;
public native boolean hasFrequency() /*-{
return this["frequency"] != null;
}-*/;
// duty
public native int getDuty() /*-{
return this["duty"] || 0;
}-*/;
public native void setDuty(int duty) /*-{
this["duty"] = duty;
}-*/;
public native void clearDuty() /*-{
delete this["duty"];
}-*/;
public native boolean hasDuty() /*-{
return this["duty"] != null;
}-*/;
}
public static final class Relay extends JavaScriptObject {
/**
* Creates a new Relay instance
*
* @return new Relay instance
*/
public static native Relay create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<Relay> instance
*
* @return new JsArray<Relay> instance
*/
public static native JsArray<Relay> createArray() /*-{
return [];
}-*/;
/**
* Gets a Relay (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return Relay
*/
public static native Relay get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<Relay> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<Relay>
*/
public static native JsArray<Relay> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a Relay from a json string
*
* @param json string to be parsed/evaluated
* @return Relay
*/
public static native Relay parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<Relay> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<Relay>
*/
public static native JsArray<Relay> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param Relay the object to serialize
* @return String the serialized json string
*/
public static native String stringify(Relay obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(Relay obj) /*-{
return
obj["iD"] != null
&& obj["on"] != null;
}-*/;
protected Relay() {}
// getters and setters
// iD
public native String getID() /*-{
return this["iD"] || "";
}-*/;
public native void setID(String iD) /*-{
this["iD"] = iD;
}-*/;
public native void clearID() /*-{
delete this["iD"];
}-*/;
public native boolean hasID() /*-{
return this["iD"] != null;
}-*/;
// on
public native boolean getOn() /*-{
return this["on"] || false;
}-*/;
public native void setOn(boolean on) /*-{
this["on"] = on;
}-*/;
public native void clearOn() /*-{
delete this["on"];
}-*/;
public native boolean hasOn() /*-{
return this["on"] != null;
}-*/;
}
/**
* Creates a new HALCommand instance
*
* @return new HALCommand instance
*/
public static native HALCommand create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<HALCommand> instance
*
* @return new JsArray<HALCommand> instance
*/
public static native JsArray<HALCommand> createArray() /*-{
return [];
}-*/;
/**
* Gets a HALCommand (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return HALCommand
*/
public static native HALCommand get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<HALCommand> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<HALCommand>
*/
public static native JsArray<HALCommand> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a HALCommand from a json string
*
* @param json string to be parsed/evaluated
* @return HALCommand
*/
public static native HALCommand parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<HALCommand> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<HALCommand>
*/
public static native JsArray<HALCommand> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param HALCommand the object to serialize
* @return String the serialized json string
*/
public static native String stringify(HALCommand obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(HALCommand obj) /*-{
return true;
}-*/;
protected HALCommand() {}
// getters and setters
// timestamp
public native double getTimestamp() /*-{
return this["timestamp"] || 0;
}-*/;
public native void setTimestamp(double timestamp) /*-{
this["timestamp"] = timestamp;
}-*/;
public native void clearTimestamp() /*-{
delete this["timestamp"];
}-*/;
public native boolean hasTimestamp() /*-{
return this["timestamp"] != null;
}-*/;
// txtCommand
public native String getTxtCommand() /*-{
return this["txtCommand"] || "";
}-*/;
public native void setTxtCommand(String txtCommand) /*-{
this["txtCommand"] = txtCommand;
}-*/;
public native void clearTxtCommand() /*-{
delete this["txtCommand"];
}-*/;
public native boolean hasTxtCommand() /*-{
return this["txtCommand"] != null;
}-*/;
// allStop
public native boolean getAllStop() /*-{
return this["allStop"] || false;
}-*/;
public native void setAllStop(boolean allStop) /*-{
this["allStop"] = allStop;
}-*/;
public native void clearAllStop() /*-{
delete this["allStop"];
}-*/;
public native boolean hasAllStop() /*-{
return this["allStop"] != null;
}-*/;
// servo
public native JsArray<Servo> getServoArray() /*-{
return this["servo"];
}-*/;
public native void setServoArray(JsArray<Servo> servo) /*-{
this["servo"] = servo;
}-*/;
public native JsArray<Servo> clearServoArray() /*-{
return (this["servo"] = []);
}-*/;
public Servo getServo(int index) {
JsArray<Servo> array = getServoArray();
return array == null ? null : array.get(index);
}
public int getServoCount() {
JsArray<Servo> array = getServoArray();
return array == null ? 0 : array.length();
}
public void addServo(Servo servo) {
JsArray<Servo> array = getServoArray();
if(array == null)
array = clearServoArray();
array.push(servo);
}
// motor
public native JsArray<Motor> getMotorArray() /*-{
return this["motor"];
}-*/;
public native void setMotorArray(JsArray<Motor> motor) /*-{
this["motor"] = motor;
}-*/;
public native JsArray<Motor> clearMotorArray() /*-{
return (this["motor"] = []);
}-*/;
public Motor getMotor(int index) {
JsArray<Motor> array = getMotorArray();
return array == null ? null : array.get(index);
}
public int getMotorCount() {
JsArray<Motor> array = getMotorArray();
return array == null ? 0 : array.length();
}
public void addMotor(Motor motor) {
JsArray<Motor> array = getMotorArray();
if(array == null)
array = clearMotorArray();
array.push(motor);
}
// pwm
public native JsArray<PWM> getPwmArray() /*-{
return this["pwm"];
}-*/;
public native void setPwmArray(JsArray<PWM> pwm) /*-{
this["pwm"] = pwm;
}-*/;
public native JsArray<PWM> clearPwmArray() /*-{
return (this["pwm"] = []);
}-*/;
public PWM getPwm(int index) {
JsArray<PWM> array = getPwmArray();
return array == null ? null : array.get(index);
}
public int getPwmCount() {
JsArray<PWM> array = getPwmArray();
return array == null ? 0 : array.length();
}
public void addPwm(PWM pwm) {
JsArray<PWM> array = getPwmArray();
if(array == null)
array = clearPwmArray();
array.push(pwm);
}
// relay
public native JsArray<Relay> getRelayArray() /*-{
return this["relay"];
}-*/;
public native void setRelayArray(JsArray<Relay> relay) /*-{
this["relay"] = relay;
}-*/;
public native JsArray<Relay> clearRelayArray() /*-{
return (this["relay"] = []);
}-*/;
public Relay getRelay(int index) {
JsArray<Relay> array = getRelayArray();
return array == null ? null : array.get(index);
}
public int getRelayCount() {
JsArray<Relay> array = getRelayArray();
return array == null ? 0 : array.length();
}
public void addRelay(Relay relay) {
JsArray<Relay> array = getRelayArray();
if(array == null)
array = clearRelayArray();
array.push(relay);
}
// botID
public native String getBotID() /*-{
return this["botID"] || "";
}-*/;
public native void setBotID(String botID) /*-{
this["botID"] = botID;
}-*/;
public native void clearBotID() /*-{
delete this["botID"];
}-*/;
public native boolean hasBotID() /*-{
return this["botID"] != null;
}-*/;
}