types

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 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
)
View Source
const (
	// None for no permissions set (default value)
	None SbcPermissions = "none"
	// CommandExecution to execute generic commands
	CommandExecution = "commandExecution"
	// CodeInterceptionRead to intercept codes in a non-blocking way
	CodeInterceptionRead = "codeInterceptionRead"
	// CodeInterceptionReadWrite to intercept codes in a blocking way
	// with options to resolve or cancel them
	CodeInterceptionReadWrite = "codeInterceptionReadWrite"
	// ManagePlugins to install, load, unload and uninstall plugins
	ManagePlugins = "managePlugins"
	// ManageUserSession to manage user sessions
	ManageUserSession = "manageUserSessions"
	// ObjectModelRead to read from the object model
	ObjectModelRead = "objectModelRead"
	// ObjectModelReadWrite to read from and write to the object model
	ObjectModelReadWrite = "objectModelReadWrite"
	// RegisterHttpEndpoints to create new HTTP endpoints
	RegisterHttpEndpoints = "registerHttpEndpoints"
	// ReadFilaments to read files in 0:/filaments
	ReadFilaments = "readFilaments"
	// WriteFilaments to write files in 0:/filaments
	WriteFilaments = "writeFilaments"
	// ReadFirmware to read files in 0:/firmware
	ReadFirmware = "readFirmware"
	// WriteFirmware to write files in 0:/firmware
	WriteFirmware = "writeFirmware"
	// ReadGCodes to read files in 0:/gcodes
	ReadGCodes = "readGCodes"
	// WriteGCodes to write files in 0:/gcodes
	WriteGCodes = "writeGCodes"
	// ReadMacros to read files in 0:/macros
	ReadMacros = "readMacros"
	// WriteMacros to write files in 0:/macros
	WriteMacros = "writeMacros"
	// ReadMenu to read files in 0:/menu
	ReadMenu = "readMenu"
	// WriteMenu to write files in 0:/menu
	WriteMenu = "WriteMenu"
	// ReadSystem to read files in 0:/sys
	ReadSystem = "readSystem"
	// WriteSystem to write files in 0:/sys
	WriteSystem = "writeSystem"
	// ReadWeb to read files in 0:/www
	ReadWeb = "readWeb"
	// WriteWeb to write files in 0:/www
	WriteWeb = "writeWeb"
	// FileSystemAccess to access files outside the virtual SD directory (as DSF user)
	FileSystemAccess = "fileSystemAccess"
	// LaunchProcess to launch new processes
	LaunchProcess = "launchProcess"
	// NetworkAccess to communicat over network (stand-alone)
	NetworkAccess = "networkAccess"
	// SuperUser to launch processes as root user (for full device control - potentially dangerous)
	SuperUser = "superUser"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeChannel

type CodeChannel string

CodeChannel represents supported input code channels

func AllChannels added in v3.2.0

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 added in v3.2.0

type SbcPermissions string

Jump to

Keyboard shortcuts

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