protoutils

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: AGPL-3.0 Imports: 12 Imported by: 1

Documentation

Overview

Package protoutils are a collection of util methods for using proto in rdk

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertOrientationToProto added in v0.0.6

func ConvertOrientationToProto(o spatialmath.Orientation) *commonpb.Orientation

ConvertOrientationToProto TODO.

func ConvertProtoToOrientation added in v0.0.6

func ConvertProtoToOrientation(o *commonpb.Orientation) spatialmath.Orientation

ConvertProtoToOrientation TODO.

func ConvertStringMapToAnyPBMap added in v0.1.0

func ConvertStringMapToAnyPBMap(params map[string]string) (map[string]*anypb.Any, error)

ConvertStringMapToAnyPBMap takes a string map and parses each value to an Any proto type.

func ConvertStringToAnyPB added in v0.1.0

func ConvertStringToAnyPB(str string) (*anypb.Any, error)

ConvertStringToAnyPB takes a string and parses it to an Any pb type.

func ConvertVectorProtoToR3 added in v0.0.6

func ConvertVectorProtoToR3(v *commonpb.Vector3) r3.Vector

ConvertVectorProtoToR3 TODO.

func ConvertVectorR3ToProto added in v0.0.6

func ConvertVectorR3ToProto(v r3.Vector) *commonpb.Vector3

ConvertVectorR3ToProto TODO.

func MessageToProtoV1 added in v0.2.5

func MessageToProtoV1(msg interface{}) protov1.Message

MessageToProtoV1 converts a message to a protov1.Message. It is assumed it is either a proto.Message or a protov1.Message.

func ReadingGoToProto added in v0.0.8

func ReadingGoToProto(readings map[string]interface{}) (map[string]*structpb.Value, error)

ReadingGoToProto converts go readings to proto readings.

func ReadingProtoToGo added in v0.0.8

func ReadingProtoToGo(readings map[string]*structpb.Value) (map[string]interface{}, error)

ReadingProtoToGo converts proto readings to go readings.

func ResourceNameFromProto

func ResourceNameFromProto(name *commonpb.ResourceName) resource.Name

ResourceNameFromProto converts a proto ResourceName to its rdk counterpart.

func ResourceNameToProto

func ResourceNameToProto(name resource.Name) *commonpb.ResourceName

ResourceNameToProto converts a resource.Name to its proto counterpart.

Types

This section is empty.

Jump to

Keyboard shortcuts

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