V3 is the same as V2 only some more bits now have a meaning for some new codes, so we can now use D for diameter and some more. Order of these variables is described in definition for work092 firmware tree.
The host GCode.cs is quite simple. At beginning it parses a simple gcode string and stores values in variables x,y,z,f,e, ... and sets a bitmask so it knows which values are actually set. When packaging it creates a binary blob with the raw data of the values. Most difficult part is pure text as it does not have a defined length and comes in 2 flavours (V1 = 16 byte and V2 or later = variable size, length byte first)