Exemplo n.º 1
0
 public void stop(String comStop)
 {
     Parameter par = new Parameter();
     Command cmd = new Command { type = "motion", method = "rest", parameter = par };
     String body = JsonConvert.SerializeObject(cmd);
     Byte[] buffer = Encoding.UTF8.GetBytes(body);
     channelSend.BasicPublish("amq.topic", "avatar.NAO.command", null, buffer);
 }
Exemplo n.º 2
0
 public void speak(String kata)
 {
     Parameter par = new Parameter { text = kata };
     Command cmd = new Command { type = "texttospeech", method = "say", parameter = par };
     String body = JsonConvert.SerializeObject(cmd);
     Byte[] buffer = Encoding.UTF8.GetBytes(body);
     channelSend.BasicPublish("amq.topic", "avatar.NAO.command", null, buffer);
 }
Exemplo n.º 3
0
 public void putarBalik(float comPutar)
 {
     Parameter par = new Parameter { x = comPutar };
     Command cmd = new Command { type = "motion", method = "moveto", parameter = new Parameter { x = 0.1f, y = 0.0f, tetha = 3.0f } };
     String body = JsonConvert.SerializeObject(cmd);
     Byte[] buffer = Encoding.UTF8.GetBytes(body);
 }
Exemplo n.º 4
0
 public void sit(String comSit)
 {
     Parameter par = new Parameter { postureName = comSit };
     Command cmd = new Command { type = "posture", method = "gotoposture", parameter = new Parameter { postureName = "Sit", speed = 0.5f } };
     String body = JsonConvert.SerializeObject(cmd);
     Byte[] buffer = Encoding.UTF8.GetBytes(body);
     channelSend.BasicPublish("amq.topic", "avatar.NAO.command", null, buffer);
 }
Exemplo n.º 5
0
 public void jalan(float comJalan)
 {
     Parameter par = new Parameter {x = comJalan};
     Command cmd = new Command { type = "motion", method = "moveto", parameter = new Parameter { x = 0.1f, y = 0.0f, tetha = 0.0f } };
     String body = JsonConvert.SerializeObject(cmd);
     Byte[] buffer = Encoding.UTF8.GetBytes(body);
     channelSend.BasicPublish("amq.topic", "avatar.NAO.command", null, buffer);
 }