messages

package
v0.0.0-...-f592e1d Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExampleRequest

type ExampleRequest struct {
}

func (*ExampleRequest) Init

func (exampleRequest *ExampleRequest) Init() *ExampleRequest

func (*ExampleRequest) Pack

func (exampleRequest *ExampleRequest) Pack() []byte

func (*ExampleRequest) Unpack

func (exampleRequest *ExampleRequest) Unpack(data []byte) error

type ExampleResponse

type ExampleResponse struct {
	Result
}

func (*ExampleResponse) Failure

func (exampleResponse *ExampleResponse) Failure(reason string) *ExampleResponse

func (*ExampleResponse) Pack

func (exampleResponse *ExampleResponse) Pack() []byte

func (*ExampleResponse) Success

func (exampleResponse *ExampleResponse) Success() *ExampleResponse

func (*ExampleResponse) Unpack

func (exampleResponse *ExampleResponse) Unpack(data []byte) error

type Joints

type Joints struct {
	LeftFront  hmath.Vec3
	RightFront hmath.Vec3
	LeftBack   hmath.Vec3
	RightBack  hmath.Vec3
}

func (*Joints) Init

func (joints *Joints) Init() *Joints

func (*Joints) Pack

func (joints *Joints) Pack() []byte

func (*Joints) Unpack

func (joints *Joints) Unpack(data []byte) error

type Message

type Message struct {
	Type     MessageType
	Data     []byte
	RespChan string
	Multi    bool
}

func (*Message) Build

func (message *Message) Build(response interface{}) []byte

func (*Message) BuildM

func (message *Message) BuildM(response interface{}) *Message

func (*Message) Pack

func (message *Message) Pack() []byte

func (*Message) Request

func (message *Message) Request(respChan string) *Message

func (*Message) Response

func (message *Message) Response() *Message

func (*Message) ResponseMulti

func (message *Message) ResponseMulti(multi bool) *Message

func (*Message) Unpack

func (message *Message) Unpack(data []byte) error

type MessageType

type MessageType int
const (
	ExampleRequestMessage  MessageType = 1
	ExampleResponseMessage MessageType = 2

	JointsMessage MessageType = 3
	PoseMessage   MessageType = 4
)

type Pose

type Pose struct {
	X     float32
	Y     float32
	Z     float32
	Roll  float32
	Pitch float32
	Yaw   float32
}

func (*Pose) Init

func (pose *Pose) Init() *Pose

func (*Pose) Pack

func (pose *Pose) Pack() []byte

func (*Pose) Unpack

func (pose *Pose) Unpack(data []byte) error

type Result

type Result struct {
	Type ResultType
	Text string
}

func (*Result) Init

func (result *Result) Init(rType ResultType, text string) *Result

func (*Result) Pack

func (result *Result) Pack() []byte

func (*Result) Unpack

func (result *Result) Unpack(data []byte) error

type ResultType

type ResultType int
const (
	SuccessResult ResultType = 1
	FailureResult ResultType = 2

	UnknownResult ResultType = 99
)

Jump to

Keyboard shortcuts

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