Table of Contents

Class CodecDeclarationAttribute

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

The codec of a replicated field, named rather than defaulted from its type; the numeric properties parameterize it.

public abstract class CodecDeclarationAttribute : Attribute
Inheritance
CodecDeclarationAttribute
Derived
Inherited Members

Constructors

CodecDeclarationAttribute(CodecKind)

A codec named by kind alone, or Unknown to default it from the field's type.

protected CodecDeclarationAttribute(CodecKind kind)

Parameters

kind CodecKind

Properties

Bits

Bits, for Quant, Unorm, Snorm, Angle, Bits, Vec2/3, an enum or a position; 0 for the codec's default.

public int Bits { get; set; }

Property Value

int

Kind

The codec's kind; Unknown defaults it from the field's CLR type.

public CodecKind Kind { get; }

Property Value

CodecKind

Max

The upper bound of a Quant codec.

public double Max { get; set; }

Property Value

double

MaxBytes

The cap of a Str or Blob, or the length of Bytes.

public int MaxBytes { get; set; }

Property Value

int

Min

The lower bound of a Quant codec.

public double Min { get; set; }

Property Value

double

Name

The field's wire name; the builder's default (its own name) when unset.

public string Name { get; set; }

Property Value

string

Saturate

Whether a value past the codec's range is clamped to it rather than refused (Codec.Saturate()).

public bool Saturate { get; set; }

Property Value

bool

Scale

The step of a Vec2/3 codec.

public double Scale { get; set; }

Property Value

double