Skip to content

AutoNav Interpreter

Incbom edited this page Sep 18, 2023 · 11 revisions

AutoNav Interpreter Documentation

The AutoNav Interpreter is responsible for interpreting commands sent from the server and running said action. It has to sort through priorities and decide what to run first. A practical approach to sending data efficiently and respective to the importance would be having multiple HTTP streams connected, each labeled respectively to the data sent through the stream. Then the program would be able to handle the data in a "queue" respective to the priority of the action. This same logic can be applied to the messages sent to the interface. Multiple HTTP streams could be created to the interface from the interpreter, and data is sent through the respective stream. Data is sent through the format of JSON objects. More about the structure of those here.

Wiki structure

New information is categorized into "sections" e.g. 1.2, 4.3, 6.8. This is to help you navigate the documentation better. Easily navigate through those sections on the sidebar.

Table of contents

(#section-1)[Section 1]

High-Level Overview

(insert the diagram here)

This diagram shows the high-level overview of the AutoNav Interpreter system. Below we go more in-depth about the components of this system

Section 1

1.1 HTTP

Section 2

2.1 Action ID System

All actions are assigned an ID. This ID is used to lookup the action which is stored in a database. Here is the code we use to generate an ID:

protected String genID() {
    int n = 6;
    String alphaStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    + "0123456789"
    + "abcdefghijklmnopqrstuvwxyz";

    StringBuilder sb = new StringBuilder(n);
    for (int i=0;i<n;i++) {
        int index = (int)(alphaStr.length() * Math.random());

        sb.append(alphaStr.charAt(index));
    }
    sb.insert(3, "-", 0, 1);
    return sb.toString();
}
Example of an ID generated with the function: luX-fMZ

IDs are stored in a database accessible by all AutoNav programs. The interface program would primarily be using this, just to display the contents of the database as a log.

AutoNav

@rohanmishr

@TreeBronch

@IncbomDev

@PillageDev

Clone this wiki locally