system

package
v0.67.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDStrings

func IDStrings() []string

IDStrings returns a slice of all String values of the enum

Types

type ID

type ID int
const (
	// 1
	// 2
	TPC ID = 3
	TRD ID = 4
	TOF ID = 5
	HMP ID = 6
	PHS ID = 7
	CPV ID = 8
	// 9
	MCH ID = 10
	// 11-14
	ZDC ID = 15
	// 16
	TRG ID = 17
	EMC ID = 18
	TST ID = 19
	// 20-31
	ITS ID = 32
	FDD ID = 33
	FT0 ID = 34
	FV0 ID = 35
	MFT ID = 36
	MID ID = 37
	DCS ID = 38
	FOC ID = 39

	FIT ID = 254 // non-standard mapping: FT0 + FV0 = FIT
	NIL ID = 255
)
const (
	FLP ID = -1
	EPN ID = -2
	PDP ID = -3
)

Additional non-standard system IDs

func IDString

func IDString(s string) (ID, error)

IDString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func IDValues

func IDValues() []ID

IDValues returns all values of the enum

func (ID) IsAID

func (i ID) IsAID() bool

IsAID returns "true" if the value is listed in the enum definition. "false" otherwise

func (ID) MarshalJSON

func (i ID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ID

func (ID) MarshalText

func (i ID) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for ID

func (ID) MarshalYAML

func (i ID) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for ID

func (ID) String

func (i ID) String() string

func (*ID) UnmarshalJSON

func (i *ID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ID

func (*ID) UnmarshalText

func (i *ID) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for ID

func (*ID) UnmarshalYAML

func (i *ID) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for ID

type IDMap added in v0.26.3

type IDMap map[ID]struct{}

func (IDMap) StringList added in v0.26.3

func (m IDMap) StringList() []string

Jump to

Keyboard shortcuts

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