msgconv

package
v0.0.0-...-d395cb5 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package msgconv contains functions to convert messages from ROS definitions to Golang.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	RosType   string
	GoType    string
	Name      string
	Value     string
	HasQuotes bool
}

Definition is a message definition.

type Field

type Field struct {
	TypeArray    string
	TypePkg      string
	Type         string
	Name         string
	NameOverride string
}

Field is a message field.

type MessageDefinition

type MessageDefinition struct {
	RosPkgName     string
	Name           string
	Fields         []Field
	Definitions    []Definition
	DefinitionsStr string
	Imports        map[string]struct{}
}

MessageDefinition is a message definition.

func ParseMessageDefinition

func ParseMessageDefinition(goPkgName string, rosPkgName, name string, content string) (*MessageDefinition, error)

ParseMessageDefinition parses a message definition.

func (*MessageDefinition) Write

func (res *MessageDefinition) Write() (string, error)

Write converts a message definition into a Go structure.

Jump to

Keyboard shortcuts

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