schemacan

package module
v0.0.0-...-9ae228c Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(in []byte) (err error, output []interface{})

Types

type Message

type Message struct {
	Object `yaml:",inline"`
	Spec   struct {
		Id struct {
			Standard *uint16 `yaml:"standard,omitempty"`
			Extended *uint32 `yaml:"extended,omitempty"`
			J1939    *struct {
				Priority         *uint8 `yaml:"priority,omitempty"`
				DataPage         *bool  `yaml:"data_page,omitempty"`
				ExtendedDataPage *bool  `yaml:"extended_data_page,omitempty"`
				PDUFormat        *uint8 `yaml:"pdu_format,omitempty"`
				PDUSpecific      *uint8 `yaml:"pdu_specific,omitempty"`
				SourceAddress    *uint8 `yaml:"source_address,omitempty"`
			} `yaml:"j1939,omitempty"`
		} `yaml:"id"`
		Length *uint8 `yaml:"length"`
		Data   []struct {
			Name          string `yaml:"name,omitempty"`
			Size          string `yaml:"size,omitempty"`
			SLOTReference string `yaml:"slot,omitempty"`
			Padding       *uint8 `yaml:"padding,omitempty"`
		} `yaml:"data" json:"data"`
	} `yaml:"spec"`
}

Message

func (*Message) Validate

func (msg *Message) Validate() (err error)

type Object

type Object struct {
	APIVersion string `yaml:"apiVersion"`
	Kind       string `yaml:"kind"`
	Metadata   struct {
		Name      string            `yaml:"name"`
		Namespace string            `yaml:"namespace,omitempty"`
		Labels    map[string]string `yaml:"labels,omitempty"`
	} `yaml:"metadata"`
}

Common object attributes

type SLOT

type SLOT struct {
	Object `yaml:",inline"`
	Spec   struct {
		Min    *float32 `yaml:"min"`
		Max    *float32 `yaml:"max"`
		Offset *float32 `yaml:"offset"`
		Size   *string  `yaml:"size"`
		Unit   *string  `yaml:"unit,omitempty"`
	} `yaml:"spec"`
}

Scaling, Limit, Transfer, Offset

func (*SLOT) Validate

func (msg *SLOT) Validate() (err error)

Jump to

Keyboard shortcuts

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