logic

package
v0.0.0-...-67e9636 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstantlyUpdateMainData

func ConstantlyUpdateMainData(inputChannel <-chan StatusUpdate)

Types

type Data

type Data struct {
	Objects *PrinterObjects
}

func GetMasterData

func GetMasterData() *Data

func NewData

func NewData() *Data

type Extruder

type Extruder struct {
	Temperature     *float32 `json:"temperature"`
	Target          *float32 `json:"target"`
	Power           *float32 `json:"power"`
	PressureAdvance *float32 `json:"pressure_advance"`
	SmoothTime      *float32 `json:"smooth_time"`
}

type Fan

type Fan struct {
	Speed *float32 `json:"speed"`
	Rpm   *int     `json:"rpm"`
}

type GcodeMove

type GcodeMove struct {
	SpeedFactor         *float32   `json:"speed_factor"`
	Speed               *float32   `json:"speed"`
	ExtrudeFactor       *float32   `json:"extrude_factor"`
	AbsoluteCoordinates *bool      `json:"absolute_coordinates"`
	AbsoluteExtrude     *bool      `json:"absolute_extrude"`
	HomingOrigin        *[]float32 `json:"homing_origin"`
	Position            *[]float32 `json:"position"`
	GcodePosition       *[]float32 `json:"gcode_position"`
}

type HeaterBed

type HeaterBed struct {
	Temperature *float32 `json:"temperature"`
	Target      *float32 `json:"target"`
	Power       *float32 `json:"power"`
}

type IdleTimeout

type IdleTimeout struct {
	State        *string  `json:"state"`
	PrintingTime *float32 `json:"printing_time"`
}

type Objects

type Objects struct {
	Webhooks    *[]string `json:"webhooks"`
	GcodeMove   *[]string `json:"gcode_move"`
	Toolhead    *[]string `json:"toolhead"`
	Extruder    *[]string `json:"extruder"`
	HeaterBed   *[]string `json:"heater_bed"`
	Fan         *[]string `json:"fan"`
	IdleTimeout *[]string `json:"idle_timeout"`
	PrintStats  *[]string `json:"print_stats"`
}

type Param

type Param struct {
	Webhooks    *Webhooks    `json:"webhooks"`
	GcodeMove   *GcodeMove   `json:"gcode_move"`
	Toolhead    *Toolhead    `json:"toolhead"`
	Extruder    *Extruder    `json:"extruder"`
	HeaterBed   *HeaterBed   `json:"heater_bed"`
	Fan         *Fan         `json:"fan"`
	IdleTimeout *IdleTimeout `json:"idle_timeout"`
	PrintStats  *PrintStats  `json:"print_stats"`
}

type Params

type Params struct {
	Objects Objects `json:"objects"`
}

type PrintStats

type PrintStats struct {
	Filename      *string         `json:"filename"`
	TotalDuration *float32        `json:"total_duration"`
	PrintDuration *float32        `json:"print_duration"`
	FilamentUsed  *float32        `json:"filament_used"`
	State         *string         `json:"state"`
	Message       *string         `json:"message"`
	Info          *PrintStatsInfo `json:"info"`
}

type PrintStatsInfo

type PrintStatsInfo struct {
	TotalLayer   *interface{} `json:"total_layer"`
	CurrentLayer *interface{} `json:"current_layer"`
}

type PrinterObjects

type PrinterObjects struct {
	Webhooks    *Webhooks
	GcodeMove   *GcodeMove
	Toolhead    *Toolhead
	Extruder    *Extruder
	HeaterBed   *HeaterBed
	Fan         *Fan
	IdleTimeout *IdleTimeout
	PrintStats  *PrintStats
}

type StatusUpdate

type StatusUpdate struct {
	Jsonrpc string  `json:"jsonrpc"`
	Method  string  `json:"method"`
	Params  []Param `json:"params"`
}

type SubscribeRequest

type SubscribeRequest struct {
	Jsonrpc string `json:"jsonrpc"`
	Method  string `json:"method"`
	Params  Params `json:"params"`
	Id      string `json:"id"`
}

func NewSubscribeRequest

func NewSubscribeRequest() *SubscribeRequest

type Toolhead

type Toolhead struct {
	HomedAxes            *string    `json:"homed_axes"`
	PrintTime            *float32   `json:"print_time"`
	EstimatedPrintTime   *float32   `json:"estimated_print_time"`
	Extruder             *string    `json:"extruder"`
	Position             *[]float32 `json:"position"`
	MaxVelocity          *float32   `json:"max_velocity"`
	MaxAccel             *float32   `json:"max_accel"`
	MaxAccelToDecel      *float32   `json:"max_accel_to_decel"`
	SquareCornerVelocity *float32   `json:"square_corner_velocity"`
}

type Webhooks

type Webhooks struct {
	State        *string `json:"state"`
	StateMessage *string `json:"state_message"`
}

Jump to

Keyboard shortcuts

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