types

package
v3.0.0-...-9c34073 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 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"
	// Aux2 is the code channel for the second UART port
	Aux2 = "Aux2"
	// 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

func AllChannels

func AllChannels() []CodeChannel

AllChannels returns a slice containing all 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

type SbcPermissions

type SbcPermissions uint64
const (
	// None for no permissions set (default value)
	None SbcPermissions = 1 << iota
	// CommandExecution to execute generic commands
	CommandExecution
	// CodeInterceptionRead to intercept codes but don't interact with them
	CodeInterceptionRead
	// CodeInterceptionReadWrite to intercept codes in a blocking way
	// with options to resolve or cancel them
	CodeInterceptionReadWrite
	// ManagePlugins to install, load, unload and uninstall plugins.
	// Grants FS access to all third-party plugins, too.
	ManagePlugins
	// ServicePlugins runtime information (for internal purposes only, do not use)
	ServicePlugins
	// ManageUserSession to manage user sessions
	ManageUserSession
	// ObjectModelRead to read from the object model
	ObjectModelRead
	// ObjectModelReadWrite to read from and write to the object model
	ObjectModelReadWrite
	// RegisterHttpEndpoints to create new HTTP endpoints
	RegisterHttpEndpoints
	// ReadFilaments to read files in 0:/filaments
	ReadFilaments
	// WriteFilaments to write files in 0:/filaments
	WriteFilaments
	// ReadFirmware to read files in 0:/firmware
	ReadFirmware
	// WriteFirmware to write files in 0:/firmware
	WriteFirmware
	// ReadGCodes to read files in 0:/gcodes
	ReadGCodes
	// WriteGCodes to write files in 0:/gcodes
	WriteGCodes
	// ReadMacros to read files in 0:/macros
	ReadMacros
	// WriteMacros to write files in 0:/macros
	WriteMacros
	// ReadMenu to read files in 0:/menu
	ReadMenu
	// WriteMenu to write files in 0:/menu
	WriteMenu
	// ReadSystem to read files in 0:/sys
	ReadSystem
	// WriteSystem to write files in 0:/sys
	WriteSystem
	// ReadWeb to read files in 0:/www
	ReadWeb
	// WriteWeb to write files in 0:/www
	WriteWeb
	// FileSystemAccess to access files including all subdirectories of the virtual SD directory as DSF user
	FileSystemAccess
	// LaunchProcess to launch new processes
	LaunchProcess
	// NetworkAccess to communicat over network (stand-alone)
	NetworkAccess
	// SuperUser to launch processes as root user (for full device control - potentially dangerous)
	SuperUser
)

Jump to

Keyboard shortcuts

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