Added getters for the GenericPacket class, but left the internal
variables public for now. Also added safety checks such as length must
equal totalCommand.length and dataLength much equal commandData.length
but for the time being these just print console error messages and
continue execution.