Esempio n. 1
0
            private void SendNetworkReply(BrickReply reply)
            {
                ushort length = (ushort)reply.Data.Length;

                byte[] data = new byte[length + 2];
                data[0] = (byte)(length & 0x00ff);
                data[1] = (byte)((length & 0xff00) >> 2);
                Array.Copy(reply.Data, 0, data, 2, reply.Data.Length);
                networkStream.Write(data, 0, data.Length);
            }
	private void OnReplyRecieved(BrickReply reply){
		if(brickType == BrickType.NXT){

			if(!((MonoBrick.NXT.Reply)reply).HasError){
				Gtk.Application.Invoke (delegate {
					replyStatusbar.Pop(1);
						replyStatusbar.Push(1,"Received " + reply.Length + " bytes");
				});
			}
		}
	}