Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am working on a robot that has some AI built in. However, the mandated robot c

ID: 658640 • Letter: I

Question

I am working on a robot that has some AI built in. However, the mandated robot controller does not have the power to do the work onboard. This means that I need to use a co-processor.

I am writing all of my AI in C++. This will also be a TCP server. I have an idea for the protocol. The C++ server receives commands and only sends back values when absolutely required. The String for a basic command would be:

REQUEST DATA PUT data storename ENDREQ
The C++ server would parse the request and store data under the reference of storename.

To read data from the server:
The Java request would be:

REQUEST DATA GET storename ENDREQ
The server will reply with:

data
I will be using TCP for the transmission of data because it seems much more robust and easy to implement using the libraries that I am using.

I am not too knowledgeable when it comes to Java, especially with J2ME. How to implement the Java side?

CHANGE: It is quite easy for me to implement a web server on the C++ side, so please feel free to use HTTP for the protocol!

Explanation / Answer

You may use HttpClient in Java ME. It's just located under a different namespace (javax.microedition.io.HttpClient). You can find some sample code in the official MID Profile documentation

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote