Documentation ¶
Overview ¶
Package protoutils are a collection of util methods for using proto in rdk
Index ¶
- func ConvertOrientationToProto(o spatialmath.Orientation) *commonpb.Orientation
- func ConvertProtoToOrientation(o *commonpb.Orientation) spatialmath.Orientation
- func ConvertStringMapToAnyPBMap(params map[string]string) (map[string]*anypb.Any, error)
- func ConvertStringToAnyPB(str string) (*anypb.Any, error)
- func ConvertVectorProtoToR3(v *commonpb.Vector3) r3.Vector
- func ConvertVectorR3ToProto(v r3.Vector) *commonpb.Vector3
- func MessageToProtoV1(msg interface{}) protov1.Message
- func ReadingGoToProto(readings map[string]interface{}) (map[string]*structpb.Value, error)
- func ReadingProtoToGo(readings map[string]*structpb.Value) (map[string]interface{}, error)
- func ResourceNameFromProto(name *commonpb.ResourceName) resource.Name
- func ResourceNameToProto(name resource.Name) *commonpb.ResourceName
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
ConvertStringMapToAnyPBMap takes a string map and parses each value to an Any proto type.
func ConvertStringToAnyPB ¶ added in v0.1.0
ConvertStringToAnyPB takes a string and parses it to an Any pb type.
func ConvertVectorProtoToR3 ¶ added in v0.0.6
ConvertVectorProtoToR3 TODO.
func ConvertVectorR3ToProto ¶ added in v0.0.6
ConvertVectorR3ToProto TODO.
func MessageToProtoV1 ¶ added in v0.2.5
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
ReadingGoToProto converts go readings to proto readings.
func ReadingProtoToGo ¶ added in v0.0.8
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.