Table of Contents

Class BuiltInCommands

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

The commands the engine itself understands (W27, W28). They sit in the catalog beside the application's, at reserved indices that never move.

public static class BuiltInCommands
Inheritance
BuiltInCommands
Inherited Members

Fields

ClientRegion

The name of the client-supplied viewpoint footprint.

public const string ClientRegion = "ClientRegion"

Field Value

string

ClientRegionIdx

The reserved index of ClientRegion.

public const int ClientRegionIdx = 0

Field Value

int

MaxRegionVertices

The most footprint vertices a region may carry: a horizon-clipped frustum needs 5–8, 16 is headroom.

public const int MaxRegionVertices = 16

Field Value

int

MaxSubscribeBurst

The fewest and the most requests a SubscribeRequest burst admits. A server sets it to the keys a session may hold of a set, so a client that subscribes all of them at once — at login — is admitted in one tick; the sustained rate is fixed.

public const int MaxSubscribeBurst = 1024

Field Value

int

MinRegionVertices

The fewest vertices a flat world's region may carry: a triangle.

public const int MinRegionVertices = 3

Field Value

int

MinRegionVertices3

The fewest vertices a deep world's region may carry: a tetrahedron (10 § 6).

public const int MinRegionVertices3 = 4

Field Value

int

MinSubscribeBurst

The fewest and the most requests a SubscribeRequest burst admits. A server sets it to the keys a session may hold of a set, so a client that subscribes all of them at once — at login — is admitted in one tick; the sustained rate is fixed.

public const int MinSubscribeBurst = 5

Field Value

int

RegionAltitudeField

The ClientRegion field carrying the viewpoint altitude, in metres.

public const string RegionAltitudeField = "altitudeM"

Field Value

string

RegionBudgetField

The ClientRegion field carrying the client's byte budget, in KiB per second.

public const string RegionBudgetField = "budgetKiBps"

Field Value

string

RegionVerticesField

The ClientRegion field carrying the convex footprint polygon.

public const string RegionVerticesField = "vertices"

Field Value

string

SubscribeKeyField

The SubscribeRequest field carrying the key, as a 64-bit integer.

public const string SubscribeKeyField = "key"

Field Value

string

SubscribeOp

The op that asks for the key. 0 is no operation and refused.

public const byte SubscribeOp = 1

Field Value

byte

SubscribeOpField

The SubscribeRequest field saying what to do with the key: SubscribeOp or UnsubscribeOp.

public const string SubscribeOpField = "op"

Field Value

string

SubscribeRatePerSec

SubscribeRequest's sustained rate, per second.

public const int SubscribeRatePerSec = 5

Field Value

int

SubscribeRequest

The name of a client's request for one key of an explicit group set (14 § 4, P13): {u16 requestId, varu set, vari key, u8 op}, answered in SOURCES by SOURCE_APPLIED{requestId} once the key is complete — or released — or by SOURCE_ERROR{requestId, code}.

public const string SubscribeRequest = "SubscribeRequest"

Field Value

string

SubscribeRequestIdField

The SubscribeRequest field the client chose to recognise the answer by.

public const string SubscribeRequestIdField = "requestId"

Field Value

string

SubscribeRequestIdx

The reserved index of SubscribeRequest.

public const int SubscribeRequestIdx = 1

Field Value

int

SubscribeSetField

The SubscribeRequest field naming the group set, by its index in the catalog's groupSets.

public const string SubscribeSetField = "set"

Field Value

string

UnsubscribeOp

The op that gives the key back.

public const byte UnsubscribeOp = 2

Field Value

byte

Methods

CreateClientRegion()

Builds the ClientRegion command: its vertices are always list<pos3> over the session's realm frame (typhon.3, D-8), so a decoded region can never leave the realm. A flat realm ignores z and needs a polygon of 3–16 points; a deep one a polyhedron of 4–16, which the engine checks when it builds the hull (10 § 6).

public static CatalogCommand CreateClientRegion()

Returns

CatalogCommand

The command definition: latest-wins, at most 5 per second.

CreateSubscribeRequest(int)

Builds the SubscribeRequest command: every request kept, in order, 5 a second past a burst of burst.

public static CatalogCommand CreateSubscribeRequest(int burst = 5)

Parameters

burst int

The burst, MinSubscribeBurst to MaxSubscribeBurst; the engine's is the keys a session may hold of a set.

Returns

CatalogCommand

The command definition.

HasClientRegionShape(CatalogCommand)

Whether command is shaped exactly as CreateClientRegion() builds it, for whatever position codec. The engine interprets this command itself, so an application command that merely takes its name must be refused, not decoded as a region.

public static bool HasClientRegionShape(CatalogCommand command)

Parameters

command CatalogCommand

A command named ClientRegion.

Returns

bool

true when the shape matches.

HasSubscribeRequestShape(CatalogCommand)

Whether command is shaped as CreateSubscribeRequest(int) builds it, for any burst it admits.

public static bool HasSubscribeRequestShape(CatalogCommand command)

Parameters

command CatalogCommand

A command named SubscribeRequest.

Returns

bool

true when the shape matches.

MinVertices(int)

The fewest vertices a region may carry over a position codec of dims axes.

public static int MinVertices(int dims)

Parameters

dims int

2 or 3.

Returns

int

MinRegionVertices or MinRegionVertices3.

ReservedIdx(string)

The reserved index of a built-in command, or −1 when name is an application command.

public static int ReservedIdx(string name)

Parameters

name string

The command name.

Returns

int

The reserved index, or −1.