protocol

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2017 License: Apache-2.0 Imports: 4 Imported by: 37

Documentation

Overview

Package protocol contains the constants and types used to communicate with the replay system and its virtual-machine interpreter.

Any changes to the values in this package must also be made to the replay source.

Index

Constants

View Source
const (
	OpCall         = 0
	OpPushI        = 1
	OpLoadC        = 2
	OpLoadV        = 3
	OpLoad         = 4
	OpPop          = 5
	OpStoreV       = 6
	OpStore        = 7
	OpResource     = 8
	OpPost         = 9
	OpCopy         = 10
	OpClone        = 11
	OpStrcpy       = 12
	OpExtend       = 13
	OpAdd          = 14
	OpLabel        = 15
	OpSwitchThread = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Opcode

type Opcode int

Opcode is one of the opcodes supported by the replay virtual machine.

func (Opcode) String

func (t Opcode) String() string

String returns the human-readable name of the opcode.

type Payload

type Payload struct {
	StackSize          uint32         // Maximum number of values.
	VolatileMemorySize uint32         // In bytes.
	Constants          []byte         // The constant buffer.
	Resources          []ResourceInfo // Resources used by this replay payload.
	Opcodes            []byte         // The encoded list of opcodes.
}

Payload contains all the information to perform a replay. The encoded form is what is passed to the replay system.

type ResourceInfo

type ResourceInfo struct {
	ID   string // The resource identifier as a string.
	Size uint32 // The size in bytes of the resource.
}

ResourceInfo describes a resource used by a Payload.

Jump to

Keyboard shortcuts

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