gcode

package
v0.0.0-...-d76f781 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package gcode is providing parsing and marshalling functions to work with gcode data in text form.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshallAsText

func MarshallAsText(data *File, w io.StringWriter) error

MarshallAsText is marshaling the content as gcode file

Types

type File

type File struct {
	Lines []*Line
}

File represents *.gcode content (gcode application)

func ParseGCodeFile

func ParseGCodeFile(filename string) (*File, error)

ParseGCodeFile is parsing given file into data structure

type GCode

type GCode struct {
	Letter  string
	Value   string
	Comment string
}

GCode represents one command

type Line

type Line struct {
	DeleteFlg bool
	LineNbr   string
	Codes     []*GCode
	Comment   string
}

Line represents one line (gcode block) from *.gcode file

Jump to

Keyboard shortcuts

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