types

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package types contains all types used by both commands and in the machine model to avoid circular dependencies.

Index

Constants

View Source
const (
	// HTTP is the code channel for HTTP requests
	HTTP CodeChannel = "HTTP"
	// Telnet is the code channel for Telnet requests
	Telnet = "Telnet"
	// File is the code channel for file jobs
	File = "File"
	// USB is the code channel for codes from USB
	USB = "USB"
	// Aux is the code channel of serial devices except USB (e.g. PanelDue)
	Aux = "Aux"
	// Trigger is the code channel running triggers or config.g
	Trigger = "Trigger"
	// Queue is the code channel for the code queue that executes a couple of
	// codes in-sync with moves
	Queue = "Queue"
	// LCD is the code channel for auxiliary LCD devices (e.g. PanelOne)
	LCD = "LCD"
	// SBC is the default code channel for requests of SBC
	SBC = "SBC"
	// Daemon is the code channel for running triggers or config.g
	Daemon = "Daemon"
	// AutoPause is the code channel that executes macros on power fail,
	// heater faults and filament out
	AutoPause = "AutoPause"
	// Unknown code channel
	Unknown = "Unknown"

	// DefaultChannel is the default channel to use
	DefaultChannel CodeChannel = SBC
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeChannel

type CodeChannel string

CodeChannel represents supported input code channels

type DriverId

type DriverId struct {
	// Board of this driver identifier
	Board uint64
	// Port of this driver identifier
	Port uint64
}

DriverId represents a driver identification

func NewDriverId

func NewDriverId(board, port uint64) DriverId

NewDriverId creates a new DriverId from the given board and port values

func NewDriverIdString

func NewDriverIdString(value string) (DriverId, error)

NewDriverIdString creates a new DriverId from the given string

func NewDriverIdUint64

func NewDriverIdUint64(value uint64) DriverId

NewDriverIdUint64 creates a new DriverId from the given bit-masked board and port value

func (*DriverId) AsUint64

func (d *DriverId) AsUint64() uint64

AsUint64 converts this instance to uint64

func (*DriverId) String

func (d *DriverId) String() string

Jump to

Keyboard shortcuts

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