svs_ps

package
v0.0.0-...-d1ba03b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Code generated by ndn tlv codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryIndex

type HistoryIndex struct {
	//+field:sequence:uint64:natural
	SeqNos []uint64 `tlv:"0x84"`
}

+tlv-model:nocopy

func ParseHistoryIndex

func ParseHistoryIndex(reader enc.WireView, ignoreCritical bool) (*HistoryIndex, error)

Parses a HistoryIndex from the provided wire format, optionally ignoring critical errors during parsing.

func (*HistoryIndex) Bytes

func (value *HistoryIndex) Bytes() []byte

Returns the byte representation of the HistoryIndex by encoding its components and joining them into a single byte slice.

func (*HistoryIndex) Encode

func (value *HistoryIndex) Encode() enc.Wire

Encodes the HistoryIndex into its wire format representation using the HistoryIndexEncoder.

type HistoryIndexEncoder

type HistoryIndexEncoder struct {
	Length uint

	SeqNos_subencoder []struct {
	}
	// contains filtered or unexported fields
}

func (*HistoryIndexEncoder) Encode

func (encoder *HistoryIndexEncoder) Encode(value *HistoryIndex) enc.Wire

Encodes a HistoryIndex into a pre-allocated byte buffer structured according to the encoder's wire plan, returning the segmented wire representation.

func (*HistoryIndexEncoder) EncodeInto

func (encoder *HistoryIndexEncoder) EncodeInto(value *HistoryIndex, wire enc.Wire)

Encodes the sequence numbers from a HistoryIndex into a binary wire format using a TLV-like structure with type byte 132 and variable-length encoding for each value.

func (*HistoryIndexEncoder) Init

func (encoder *HistoryIndexEncoder) Init(value *HistoryIndex)

Initializes the HistoryIndexEncoder with the provided HistoryIndex value, calculates the total encoded length of the sequence numbers (SeqNos), and prepares a wire encoding plan for serializing the data.

type HistoryIndexParsingContext

type HistoryIndexParsingContext struct {
}

func (*HistoryIndexParsingContext) Init

func (context *HistoryIndexParsingContext) Init()

Initializes the HistoryIndexParsingContext, preparing it for parsing operations.

func (*HistoryIndexParsingContext) Parse

func (context *HistoryIndexParsingContext) Parse(reader enc.WireView, ignoreCritical bool) (*HistoryIndex, error)

Parses a TLV-encoded HistoryIndex structure, extracting sequence numbers (type 132) into a slice and handling unknown fields according to the ignoreCritical flag.

type HistorySnap

type HistorySnap struct {
	//+field:sequence:*HistorySnapEntry:struct:HistorySnapEntry:nocopy
	Entries []*HistorySnapEntry `tlv:"0x82"`
}

+tlv-model:nocopy

func ParseHistorySnap

func ParseHistorySnap(reader enc.WireView, ignoreCritical bool) (*HistorySnap, error)

Parses a HistorySnap from encoded data using a parsing context, with an option to ignore critical parsing errors.

func (*HistorySnap) Bytes

func (value *HistorySnap) Bytes() []byte

Encodes the HistorySnap value into a byte slice by serializing its components and concatenating them.

func (*HistorySnap) Encode

func (value *HistorySnap) Encode() enc.Wire

Encodes the HistorySnap instance into a binary wire format using the HistorySnapEncoder for transmission or storage.

type HistorySnapEncoder

type HistorySnapEncoder struct {
	Length uint

	Entries_subencoder []struct {
		Entries_encoder HistorySnapEntryEncoder
	}
	// contains filtered or unexported fields
}

func (*HistorySnapEncoder) Encode

func (encoder *HistorySnapEncoder) Encode(value *HistorySnap) enc.Wire

Encodes a HistorySnap object into a byte-structured wire format as defined by the encoder's pre-planned segment lengths, preparing it for NDN data transmission.

func (*HistorySnapEncoder) EncodeInto

func (encoder *HistorySnapEncoder) EncodeInto(value *HistorySnap, wire enc.Wire)

Encodes a HistorySnap object into a TLV-based wire format by serializing its Entries field using a subencoder for each entry's length and value.

func (*HistorySnapEncoder) Init

func (encoder *HistorySnapEncoder) Init(value *HistorySnap)

Initializes a HistorySnap encoder by setting up sub-encoders for each entry, calculating the total encoded length, and building a wire plan for efficient TLV-based encoding of the structured data.

type HistorySnapEntry

type HistorySnapEntry struct {
	//+field:natural
	SeqNo uint64 `tlv:"0xd6"`
	//+field:wire
	Content enc.Wire `tlv:"0x83"`
}

+tlv-model:nocopy

func ParseHistorySnapEntry

func ParseHistorySnapEntry(reader enc.WireView, ignoreCritical bool) (*HistorySnapEntry, error)

Parses a HistorySnapEntry from wire-format data, optionally ignoring unknown critical fields.

func (*HistorySnapEntry) Bytes

func (value *HistorySnapEntry) Bytes() []byte

Serializes the HistorySnapEntry into a contiguous byte slice by encoding its components and joining them.

func (*HistorySnapEntry) Encode

func (value *HistorySnapEntry) Encode() enc.Wire

Encodes the HistorySnapEntry into a wire format using a HistorySnapEntryEncoder.

type HistorySnapEntryEncoder

type HistorySnapEntryEncoder struct {
	Length uint

	Content_length uint
	// contains filtered or unexported fields
}

func (*HistorySnapEntryEncoder) Encode

func (encoder *HistorySnapEntryEncoder) Encode(value *HistorySnapEntry) enc.Wire

Encodes a HistorySnapEntry into a structured wire format by allocating and populating byte slices according to the encoder's predefined length plan.

func (*HistorySnapEntryEncoder) EncodeInto

func (encoder *HistorySnapEntryEncoder) EncodeInto(value *HistorySnapEntry, wire enc.Wire)

Encodes a HistorySnapEntry into a TLV (Type-Length-Value) wire format, writing the sequence number as a variable-length integer and including optional content as a nested TLV block if present.

func (*HistorySnapEntryEncoder) Init

func (encoder *HistorySnapEntryEncoder) Init(value *HistorySnapEntry)

Initializes the encoder with the given HistorySnapEntry, calculating the total encoded length and generating a wire format plan that tracks offsets and sizes for each component (such as sequence number and content fields) to facilitate efficient binary serialization.

type HistorySnapEntryParsingContext

type HistorySnapEntryParsingContext struct {
}

func (*HistorySnapEntryParsingContext) Init

func (context *HistorySnapEntryParsingContext) Init()

Initializes the HistorySnapEntryParsingContext for parsing a history snapshot entry.

func (*HistorySnapEntryParsingContext) Parse

func (context *HistorySnapEntryParsingContext) Parse(reader enc.WireView, ignoreCritical bool) (*HistorySnapEntry, error)

Parses a HistorySnapEntry from TLV-encoded data, handling critical fields (SeqNo, Content) and allowing optional skipping of unrecognized critical fields based on the ignoreCritical flag.

type HistorySnapParsingContext

type HistorySnapParsingContext struct {
	Entries_context HistorySnapEntryParsingContext
}

func (*HistorySnapParsingContext) Init

func (context *HistorySnapParsingContext) Init()

Initializes the internal entries context within the history snapshot parsing context for parsing operations.

func (*HistorySnapParsingContext) Parse

func (context *HistorySnapParsingContext) Parse(reader enc.WireView, ignoreCritical bool) (*HistorySnap, error)

Parses a HistorySnap structure from TLV-encoded data, processing entries of type 130 and handling unrecognized or critical fields according to the ignoreCritical flag.

type InstanceState

type InstanceState struct {
	//+field:name
	Name enc.Name `tlv:"0x07"`
	//+field:natural
	BootstrapTime uint64 `tlv:"0xd4"`
	//+field:struct:svs.StateVector
	StateVector *svs.StateVector `tlv:"0xc9"`
}

func ParseInstanceState

func ParseInstanceState(reader enc.WireView, ignoreCritical bool) (*InstanceState, error)

Parses an InstanceState object from encoded wire data, with an option to ignore critical fields that cannot be processed.

func (*InstanceState) Bytes

func (value *InstanceState) Bytes() []byte

Returns the byte representation of the instance state by encoding its components and concatenating the resulting byte slices.

func (*InstanceState) Encode

func (value *InstanceState) Encode() enc.Wire

Encodes the instance state into a wire-format representation using the InstanceStateEncoder.

type InstanceStateEncoder

type InstanceStateEncoder struct {
	Length uint

	Name_length uint

	StateVector_encoder svs.StateVectorEncoder
}

func (*InstanceStateEncoder) Encode

func (encoder *InstanceStateEncoder) Encode(value *InstanceState) enc.Wire

Encodes the given InstanceState into a wire representation using a pre-allocated buffer of size specified by the encoder.

func (*InstanceStateEncoder) EncodeInto

func (encoder *InstanceStateEncoder) EncodeInto(value *InstanceState, buf []byte)

Encodes an `InstanceState` object into a binary buffer using TLV (Type-Length-Value) format, serializing optional name components (type 7), bootstrap time (type 212), and state vector data (type 201) as specified by the NDN encoding scheme.

func (*InstanceStateEncoder) Init

func (encoder *InstanceStateEncoder) Init(value *InstanceState)

Initializes the InstanceStateEncoder with the encoded length of the provided InstanceState, accounting for the name components, bootstrap time, and state vector to prepare for serialization.

type InstanceStateParsingContext

type InstanceStateParsingContext struct {
	StateVector_context svs.StateVectorParsingContext
}

func (*InstanceStateParsingContext) Init

func (context *InstanceStateParsingContext) Init()

Initializes the `StateVector_context` field of the `InstanceStateParsingContext` by calling its own `Init()` method.

func (*InstanceStateParsingContext) Parse

func (context *InstanceStateParsingContext) Parse(reader enc.WireView, ignoreCritical bool) (*InstanceState, error)

Parses TLV-encoded instance state data into an `InstanceState` struct, requiring the `BootstrapTime` field and handling critical fields according to the `ignoreCritical` flag.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL