// Update is called once per frame in Unity void Update() { Int32Msg msg = new Int32Msg(3); ros.Publish(pup_test.GetMessageTopic(), msg); ros.Render(); }
public void SerializeDeserialize_MinInt32RoundTrip_ReturnsMinInt() { const int v = int.MinValue; Int32Msg inMsg = new Int32Msg(v); Int32Msg outMsg = MessageRoundTrip(inMsg, Int32Msg.Deserialize); Assert.AreEqual(inMsg.data, v); Assert.AreEqual(inMsg.data, outMsg.data); }
public void SerializeDeserialize_Int32RoundTrip_ReturnsSameValue() { const int v = 1234; Int32Msg inMsg = new Int32Msg(v); Int32Msg outMsg = MessageRoundTrip(inMsg, Int32Msg.Deserialize); Assert.AreEqual(inMsg.data, v); Assert.AreEqual(inMsg.data, outMsg.data); }
public CommandMsg(JSONNode msg) { //Debug.Log("CommandMsg with " + msg.ToString()); _header = new HeaderMsg(msg["header"]); _command = new Int32Msg(msg["command"]); _params = new Float64Msg[msg["params"].Count]; for (int i = 0; i < _params.Length; i++) { _params[i] = new Float64Msg(msg["params"][i]); } //Debug.Log("CommandMsg done and it looks like " + this.ToString()); }
public CommandMsg(HeaderMsg header, Int32Msg command, Float64Msg[] param) { _header = header; _command = command; _params = param; }
public static string ToYAMLString(Int32Msg msg) { //return msg.GetData().ToString(); return(msg.ToYAMLString()); }
public static string GetMessageType() { return(Int32Msg.GetMessageType()); }