ros1msg

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidBool indicates a bool value was not 0 or 1.
	ErrInvalidBool = errors.New("invalid bool")
	// ErrUnrecognizedPrimitive indicates a primitive type was not recognized.
	ErrUnrecognizedPrimitive = errors.New("unrecognized primitive")
)
View Source
var MessageDefinitionSeparator = []byte(
	"================================================================================\n",
)
View Source
var Primitives = map[string]bool{
	"bool":     true,
	"int8":     true,
	"uint8":    true,
	"int16":    true,
	"uint16":   true,
	"int32":    true,
	"uint32":   true,
	"int64":    true,
	"uint64":   true,
	"float32":  true,
	"float64":  true,
	"string":   true,
	"time":     true,
	"duration": true,
	"char":     true,
	"byte":     true,
}

Functions

This section is empty.

Types

type ErrMalformedField

type ErrMalformedField struct {
	// contains filtered or unexported fields
}

func (ErrMalformedField) Error

func (e ErrMalformedField) Error() string

type ErrUnknownDependency

type ErrUnknownDependency struct {
	// contains filtered or unexported fields
}

func (ErrUnknownDependency) Error

func (e ErrUnknownDependency) Error() string

type Field

type Field struct {
	Name string
	Type Type
}

func ParseMessageDefinition

func ParseMessageDefinition(parentPackage string, data []byte) ([]Field, error)

type JSONTranscoder

type JSONTranscoder struct {
	// contains filtered or unexported fields
}

func NewJSONTranscoder

func NewJSONTranscoder(parentPackage string, data []byte) (*JSONTranscoder, error)

func (*JSONTranscoder) Transcode

func (t *JSONTranscoder) Transcode(w io.Writer, r io.Reader) error

type Type

type Type struct {
	FixedSize int
	IsArray   bool
	IsRecord  bool
	BaseType  string
	Items     *Type
	Fields    []Field
}

Jump to

Keyboard shortcuts

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