From cd708c1f3acb3277cf21d1003bc49578a718bdfe Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Tue, 14 Feb 2017 20:44:28 +0000
Subject: [PATCH] Finish initial sped! :D

---
 PixelHub Protocol.md         | 50 +++++++++++++++++++++++++++++++++++-
 PixelHub-Client/PixelBot.cpp |  2 +-
 2 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/PixelHub Protocol.md b/PixelHub Protocol.md
index b0f27dc..225b487 100644
--- a/PixelHub Protocol.md	
+++ b/PixelHub Protocol.md	
@@ -111,6 +111,7 @@ Type	| Name		| Description
 3		| Left		| Turning left.
 4		| Right		| Turning right.
 
+
 ### CommandOk: When the PixelBot is ok with a command
 This message doesn't have a body, but it is sent by a PixelBot to say that it is going to perform the command that was sent previously.
 
@@ -118,7 +119,54 @@ This message is a direct response to a `Move` command.
 
 
 ### CommandComplete: When a PixelBot completes a command
-This message doesn't have a body, but is sent by a PixelBot when it finished executing a `Move` command. It should be in direct response the commandd sent by the server.
+This message doesn't have a body, but is sent by a PixelBot when it finished executing a `Move` command. It should be in direct response the `Move` command sent by the server.
+
+
+### CommandFailed: PixelBot Complaints
+This message doesn't have a body, but it's sent by PixelBots who can't complete an instruction they've been given. It should be in direct response to the `Move` command that it is complaining about.
+
+
+### InfoRequest: Requesting information
+An `InfoRequest` can be used by the server to request information from the client. Information held by a PixelBot is accessed by the server in a key / value format. All keys and values are formatted as a `char*` - the server needs to parse the result sent by the PixelBot into the appropriate type. It does have a body, and it is formatted like this:
+
+```
++------------+------------+------------+------------+
+|   Byte 1   |   Byte 2   |   Byte 3   |   Byte 4   |
++------------+------------+------------+------------+
+| char* Key                                         |
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
+```
+
+ - `char*` Key - The key. Must not contain a null byte - there's one at the end of the message.
+
+
+### InfoResponse: Responding with information
+The response to an `InfoRequest`. Must be in direct reply to the `InfoRequest` that it is responding to. The possible keys and values are detailed in the [keys and values](#Information keys and values) section.
+
+```
++------------+------------+------------+------------+
+|   Byte 1   |   Byte 2   |   Byte 3   |   Byte 4   |
++------------+------------+------------+------------+
+| char* Value                                       |
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
+```
+
+ - `char*` Value - The value that corresponds to the key requested in the `InfoRequest`. Numbers should be converted to their string representation - i.e. converted to ASCII / UTF8. Must not contain a null byte - there's one at the end of the message.
+
+
+## Information keys and values
+Information requests enable the server to request several different pieces of information from a PixelBot.
+
+Key						| Value description
+------------------------|-------------------
+`Id`					| The PixelBot's unique id.
+`TicksTravelled`		| The number of ticks that the PixelBot has been moving for.
+`LastMoveDirection`		| The direction that the PixelBot last moved in. See the [Movement Types](#Movement Types) section.
+`LastMoveDuration`		| The duration that the PixelBot last moved for in ticks.
+`PixelBotType`			| The type of PixelBot that this bot is. SHould be the same character array from the `HandshakeRequest`.
+`TicksPerRevolution`	| The number of ticks that this PixelBot needs in order to do one ful  revolution of it's wheels.
+
+If a key is not found, then a blank `InfoResponse` must be returned.
 
 
 ## Message Types
diff --git a/PixelHub-Client/PixelBot.cpp b/PixelHub-Client/PixelBot.cpp
index 99fa77f..23791c7 100644
--- a/PixelHub-Client/PixelBot.cpp
+++ b/PixelHub-Client/PixelBot.cpp
@@ -138,7 +138,7 @@ void PixelBot::Listen()
 
 bool PixelBot::processCommand(String command)
 {
-
+  
 	return false;
 }
 
