UOodleNetworkTrainerCommandlet

Commandlet for processing UE packet captures, through Oodle's training API, for generating compressed state dictionaries.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UCommandlet

UOodleNetworkTrainerCommandlet

References

Module

OodleNetworkHandlerComponent

Header

/Engine/Plugins/Compression/OodleNetwork/Source/Classes/OodleNetworkTrainerCommandlet.h

Include

#include "OodleNetworkTrainerCommandlet.h"

Syntax

UCLASS(Config=Editor)
class UOodleNetworkTrainerCommandlet : public UCommandlet

Remarks

Commandlet for processing UE packet captures, through Oodle's training API, for generating compressed state dictionaries.

Primary Commands:

  • "AutoGenerateDictionaries Changelist":

  • Iterates every directory recursively within "*Game*\Saved\Oodle\Server", and uses all capture files within each directory, to generate a dictionary stored in "*Game*\Content\Oodle", named "*Game**DirectoryName*.udic".

  • For example, packet captures in "OrionGame\Saved\Oodle\Server\Input", will be generated into a dictionary stored in "OrionGame\Content\Oodle\OrionGameInput.udic"

  • Each folder within "*Game*\Content\Oodle", should contain at least 100mb of packet captures.

  • Changelist is an optional parameter than will only use upac files that contain the changelist in their filenames. If omitted, all files in the directory are used.

Secondary/Testing Commands:

  • "Enable":

  • Inserts the Oodle PacketHandler into the games packet handler component list, and initializes Oodle *Engine.ini settings

  • "MergePackets OutputFile PacketFile1,PacketFile2,PacketFileN":

  • Takes the specified packet capture files, and merges them into a single packet capture file

  • "MergePackets OutputFile All Directory":

  • As above, but merges all capture files in the specified directory.

  • "GenerateDictionary OutputFile FilenameFilter Changelist PacketFile1,PacketFile2,PacketFileN":

  • Takes the specified packet capture files, with an optional filter for a substring of a filename and changelist filter (use "all" to ignore either of these filters), and uses them to generate a network compression dictionary

  • "GenerateDictionary OutputFile FilenameFilter Changelist All Directory":

  • As above, but uses all capture files in the specified directory, to generate a network compression dictionary

  • "DebugDump OutputDirectory CaptureDirectory Changelist"

  • Recursively iterates all .ucap files in CaptureDirectory, and converts them to Oodle-example-code compatible .bin files, in OutputDirectory

Unimplemented commands:

  • "PacketInfo PacketFile":

  • Outputs information about the packet file, such as the MB amount of data recorded, per net connection channel, and data types

Only implement, if deciding to actually capture/track this kind of data

Variables

Name Description

Public variable UProperty Config

bool

 

bCompressionTest

Whether or not compression testing should be performed after dictionary generation (uses up some of the packets)

Public variable UProperty Config

bool

 

bNoTrials

Whether or not random-trials have been disabled

Public variable UProperty Config

bool

 

bWriteV5Dictionaries

Whether or not to write oodle version 5 dictionaries for back compat

Public variable UProperty Config

int32

 

DictionarySize

Size of the dictionary to be generated

Public variable UProperty Config

int32

 

DictionaryTrials

The number of random packet-selection trials to run, when generating the dictionary, to try and optimize the dictionary

Public variable UProperty Config

int32

 

HashTableSize

Size of the hash table to use for the dictionary

Public variable UProperty Config

int32

 

TrialGenerations

The number of generations of random packet-selection trials

Public variable UProperty Config

int32

 

TrialRandomness

The randomness, in percent, of random packet-selection trials

Constructors

Functions

Name Description

Public function Static

bool

 

GetMergeMapFromList

(
    const TArray< FString >& FileList,
    TMap< FArchive*, FString >& O...
)

Converts a list of capture files to merge, into a map of file archives vs file names (doing all necessary verification etc.)

Public function

bool

 

HandleAutoGenerateDictionaries

(
    int32 ChangelistNumber
)

Handles the 'AutoGenerateDictionaries' command, which is used to automatically detect packet captures and produce dictionaries

Public function

bool

 

HandleDebugDumpPackets

(
    FString OutputDirectory,
    FString SourceDirectory,
    const TArray< FString >& DumpList
)

Handles the 'DebugDump' command, which is used to take a directory of .ucap files, and output a directory of Oodle-example-code compatible .bin files, in SourceDirectory

Public function Static

bool

 

HandleEnable()

Handles the 'enable' command, which enables the Oodle packet handler component

Public function

bool

 

HandleMergePackets

(
    FString OutputCapFile,
    const TArray< FString >& MergeList
)

Handles the 'MergePackets' command, which is used to merge multiple packet capture files

Public function Static

bool

 

VerifyOutputFile

(
    FString OutputFile
)

Checks that the output file does not already exist, and prompts for an overwrite, if it does

Overridden from UCommandlet

Name Description

Public function Virtual

int32

 

Main

(
    const FString& Params
)

Entry point for your commandlet