So a little context, back when I attempted to get a college degree I was playing a sci-fi tabletop game with some friends called Palladium Rifts, I was playing an AI living in a humanoid robot body, named Simone (Sim One) of all the groan worthy things. One of my teammates was a mech pilot (named lockon) who had a bike / mech transformer. I was admittedly being a little sh*t and hacked into the mech. I then proceeded to write up a language of sorts so I could call his mech when I wanted since I had a built-in FM transceiver and so did the mech. At this time I also had finished my class in assembly (specifically x8086 assembly) and so in my weird and nerdy mind I wrote this whole document, which was intended to grow as we play, but sadly some of the players started to take all the attention and the GM eventually ended the game because they were tired of it all. So we stopped playing, but I saved this document and found it while I was doing some digital clean up and wanted to share it with you.

Yes, this was pretty dumb and there are lots of problems with this, I am just sharing something silly. It was fun while it lasted.

96 - 128 Kbps is the rough bandwidth for U.S. based FM digital radio transmission. Source: https://en.wikipedia.org/wiki/Digital_radio#United_States
Note: All commands sound like noise to any non-machine (Think techni-can)

If any action fails, mech responds with ERROR and a message if applicable. Example:
   -> HIHI
   <- HELO
   -> FIRE
   <- ERROR404
   -> EXPL
   <- WEAPON_NOT_FOUND
The error is understood to mean 'Weapon not found'

Basic commands:
      HIHI - If mech is within radio range, responds with HELO
      STAT - Mech returns status like speed, heading, altitude, etc.
           Example: SPED300ALT10+HEAD180BATT50AMMO20ONBIKE (Speed 300mph, Altitude 10ft and climbing, heading South (180 degrees) with 50% battery left, 2 rounds left and in Bike mode)
      DATE - Mech will return current datetime.
           Example: 2014_07_09_10_08_00_P (09 Jul 2014 10.08.00 PM)
      TSON - Turn Mech on fully, responds with WAIT then OK when finished
      TSOF - Turn Mech off (but on enough to receive commands), responds with WAIT then OK when finished
      READ - Mech returns sensory equipment data (Likely would need a sensory equipment check) Not going to give an example here
      FIRE - If Mech has weapon, responds with WAIT then OK. (Note there are no coordinates)
      HOVR - Mech will hover at current altitude unless a number is given as an argument; then will hover at that height, responds with WAIT then OK when finished
      LAND - Mech will hover then descend, responds with WAIT then OK when finished
      STOP - Mech will slow down to 0mph if possible (In bike mode only)
      TOME - Mech will move closer to source (The antenna that's issuing commands) Likely will stop within Xmeters from target.
      CAMA - Mech will transmit camera data (This can range from average feed [96Kbps] to the low end of 'Business quality videoconferencing' [128kbps])
      AUDO - Mech will transmit microphone data (MP3 runs from 32Kbps for just speech to 128Kbps for 'mid range quality')
      HUDD - Mech will transmit HUD Data
      EXPL - Mech will explain error code with more information like WEAPON_NOT_FOUND (404) or NOT_ENOUGH_POWER (500) respectively. If no error to explain return NOPE
      RDRN - Mech will turn on radar
      RDRF - Mech will turn off radar
      LOCK - Mech will lock out pilot from all digital inputs. 
           Any 'fly-by-wire' or 'manual' systems cannot be overridden (by virtue of being fly-by-wire). Mech responds with OK, if locked LOCK will appear in STAT
      BECN - Mech will set off emergency distress beacon.
      HMSG - Mech will flash argument text on the HUD (In the 'messages' section). Responds with OK
      MAIL - Mech will read messages for user. Returns OK MSG#_FROMNAME_MSG_FSTP Responds with OK
           Example: MSG1_LOCKON_GET_THE_FUCK_OUT_OF_MY_MECH_FSTP
      SEND - Mech will send messages for user. Syntax SEND_TONAME_MESSAGE_FSTP 
           Example: SEND_LOCKON_MAKE_ME_FSTP
      NOTE - Mech will send self-addressed message, shows up in mail queue. Syntax: NOTE_MSG
           Example: NOTE_IMPLEMENT_EJECT_SEATS

Authentication:
      Before any commands can be sent (minus HIHI and HOME) a user must log in first.
      AUTH - Authenticate with mech. Command takes time encrypted password.
           Example: AUTH_BA87C4F2E2254FE55 Responds with HELO_NAME (Example: HELO_LOCKON or HELO_THADDIUS) if authenticated or ERROR401 if not
      WHOI - Mech will respond with the username of the logged in user
           Example: LOCKON or SIMONE
      LOGT - Mech will deauthenticate user. Responds with BYE_NAME (Mech auto deauthenticate if last command was Y seconds ago)
      

Function calls and process management:
      These next commands are to facilitate the creation of procedures (functions), or a saved set of commands.
      TEXT - Mech will start to stack orders but will not execute them. (TEXT requires an _ and the name of the procedure) Returns REDY
      TEND - Mech will stop stacking orders and save the stack as a procedure. Returns OK
      PROC - Mech will call procedure (PROC requires an _ and the name of the procedure) Returns START when calling the procedure then FINISH when done
      DELP - Mech will delete procedure (Requires ownership of procedure)
      KILL - Mech will immediately stop procedure, called during a procedure call. Returns DEAD if procedure stopped.
      BKGD - Mech will stop returning values for duration of procedure
      FRGD - Mech will begin returning values for duration of procedure
      VALU - Mech will store value into memory. Syntax: VALU_NAME_VALUE Returns OK.
           Example: VALU_TARGETNAME_FORSAKEN_GOD 
      GETV - Mech will return value from memory. Syntax: GETV_NAME. Note: If variable name doesn't conflict with namespace, can just call name. e.g TARGET_NAME. Can be used as arguments.
           Example: GETV_TARGETNAME (Returns: FORSAKEN_GOD)
      DELV - Mech will delete value from variable table
      CLEN - Mech will clean variables and finished procedures from table.
      ADDV - Mech will add two variables together provided they are integers or floats, stores result into first variable. Syntax: ADDV_ARG1_ADDV_ARG2. Returns result
      SUBV - Mech will subtract two variables provided they are integer or float, stores result into first variable. Syntax: SUBV_ARG1_SUBV_ARG2
      MULV - Mech will multiply two variables provided they are integer or float, stores result into first variable. Syntax: MULV_ARG1_MULV_ARG2
      DIVI - Mech will divide two variables provided they are integer or float, stores result into first variable. Syntax: DIVI_ARG1_DIVI_ARG2
      EQLV - Mech will compare two values and return TRUE if two values are the same, otherwise FALSE. Syntax: EQLV_ARG1_EQLV_ARG2
      NQLV - Mech will compare two values and return TRUE if they are *NOT* the same, otherwise FALSE. Syntax: NQLV_ARG1_NQLV_ARG2
      GTRV - Mech will compare two values and return TRUE if the first is greater than the second, otherwise FALSE. Syntax: GRV_ARG1_GTRV_ARG2
      LESV - Mech will compare two values and return TRUE if the first is less than the second, otherwise FALSE. Syntax: LESV_ARG1_LESV_ARG2
      GREV - Mech will compare two values and return TRUE if the first is greater than or equal to the second, otherwise FALSE. Syntax: GREV_ARG1_GREV_ARG2
      LEEV - Mech will compare two values and return TRUE if the first is less than or equal to the second, otherwise FALSE. Syntax: LEEV_ARG1_LEEV_ARG2
      TETR - Mech will compare first value and if true call first procedure arguemnt, if false calls the second procedure argument. Syntax: TETR_TEXT_TETR_PROCARG1_TETR_PROCARG2
           Example: TETR_EQLV_WHOAMI_NQLV_LOCKON_TETR_BECN_TSON
           (If WHOAMI doesn't equal LOCKON, turn on emergency distress beacon, else turn system on.)
      NUMV - Mech will test variable if it is a integer or float. Returns TRUE or FALSE. Syntax: NUMV_ARG
           Example: NUMV_TARGETNAME. (Returns: FALSE)
      STRV - Mech will test variable if it is a string (not 0-9). Returns TRUE or FALSE. Syntax: NUMS_ARG
           Example: NUMS_TARGETNAME. (Returns: TRUE)
      EXTV - Mech will test if variable exists, if it does returns TRUE else FALSE. Syntax: EXTV_ARG
           Example: EXTV_TARGETNAME. (Returns: TRUE)
      NXTV - Mech will test if variable does not exsit, if it does not exist returns TRUE else FALSE. Syntax: NXTV_ARG
      INUL - Mech will test if variable is equal to NULL or 0; if it is returns TRUE. Syntax: INUL_ARG
      NNUL - Mech will test if varuable is not equal to NULL or 0; if it is not returns TRUE else FALSE. Syntax: NNUL_ARG
      IFIT - Mech will execute procedure if test is true. Syntax: IFIT_TEST_IFIT_PROC.
           Example: IFIT_EQLV_TARGETNAME_EQLV_FORSAKEN_GOD_IFIT_FIRE. (If TARGETNAME is equal to FORSAKEN_GOD then FIRE)
      IFIF - Mech will execute procedure if test is false. Syntax: IFIF_TEST_IFIF_PROC.
      

           An Example of creating a procedure:
           -> TEXT_DOWN
           <- REDY
           -> MOVY-5
           <- OK
           -> MOVY-5
           <- OK
           -> TEND
           <- DONE
           From here the Mech hasn't moved, but has saved the two moves as a procedure called DOWN
           -> PROC_DOWN
           <- START
           <- OK
           <- OK
           <- FINISH
           The Mech moves down 10ft
      
      

Movement commands: (These don't matter at all really. As it is simply swept under the rug of a piloting check.)
         Base command syntax: MOV[X,Y,Z][+,-]####
         Move along the X, Y, or Z axis. X for horizontal, Y for vertical, and Z for speed.
         Air Movement command syntax: CORDXY
         Move to coordinates X,Y on Cartesian plane. (Mech points it's "Nose" at those coordinates.)

Flat Coordinate Plane: (To be replaced by POLAR plane) [Polar Plane is harder to code but makes for more accurate navigation]
     All Coordinate commands use a vertical plane (with Z bisecting the camera). So 100,100 is the upper right hand side.

     . . . . | . . . .                                                     |           
     . . . . | . . . .                                                     |   _       
     . . . . | . . . .                                                     |  /        
     - - - - + - - - - The + is both origin and the bike facing the plane. |<= Bike------
     . . . . | . . . .                                                     |  \_       
     . . . . | . . . .                                                     |           
     . . . . | . . . .                                                     |
             

Errors:
    401 - Unauthorized
    404 - Not found
    500 - internal error
    400 - operator error (like calling stop in air mode)
    429 - too many commands at one time
    501 - Command doesn't exist
    418 - I'm a Teapot -or- Time Magic

TO BE IMPLEMENTED:

Polar coordinate plane
FIREX###Y### - Mech will fire on X,Y coordinate (Requires more programming) Changes state of STAT (BIKE or MECH)
TRFM - Mech will transform, responds with WAIT then OK when finished (Requires more programming)
HOME - Mech will move closer to Lockon's beacon. - Need to build beacon. This command locks out all other commands except CNCL; mech will respond with NOPE (Requires only the Beacon)
CNCL - Cancels HOME command, and unlocks the mech. Requires a passcode that is encrypted with a time based crypt [Passcode is REDACTED] (Requires only the Beacon)


Basic Pipeline of Commands (Example session):
Anything after the '#' is a comment and not sent to or from the system
      -> HIHI
      <- HELO
      -> AUTH_4DF4885BA8D6F 
      <- HELO_SIMONE
      -> STAT
      <- SPD0ALT0.5HEAD90BATT100AMMO0OFFBIKE # Stopped, grounded, facing east, full battery, no ammo, turned off, and in bike mode
      -> TSON # Turn System ON
      <- WAIT
      <- OK
      -> STAT
      <- SPD0ALT0.5HEAD90BATT100AMMO0ONBIKE # Stopped, grounded, facing east, full battery, no ammo, turned on, and in bike mode
      -> ASDF
      <- ERROR501
      -> EXPL
      <- COMMAND_DOESNT_EXIST
      -> TEXT_ASDF # Create the procedure 'ASDF'
      <- REDY
      -> STAT
      <- OK
      -> HOVR10 # Hover at 10 ft
      <- OK
      -> STAT
      <- OK
      -> WHOI
      <- OK
      -> HMSG_HELLO_LOCKON_I_HAVE_CONTROL # Send "HELLO LOCKON I HAVE CONTROL" to the HUD's messages queue
      -> TEND
      <- DONE
      -> PROC_ASDF # Call procedure 'ASDF' (Since it doesn't conflict with any other commands, the command could just be called directly as ASDF)
      <- OK
      <- SPD0ALT0.5HEAD90BATT100AMMO0ONBIKE
      <- WAIT
      <- OK
      <- SPD0ALT10.5HEAD90BATT100AMMO0ONBIKE
      <- SIMONE
      <- OK
      <- FINISH
      -> DELP_ASDF # Delete 'ASDF'
      <- OK
      -> PROC_ASDF
      <- ERROR501
      -> EXPL
      <- COMMAND_DOESNT_EXIST
      -> LOGT
      <- BYE_SIMONE