gcodehs-0.1.2.0: GCode processor

Safe HaskellNone
LanguageHaskell2010

Data.GCode.Types

Description

GCode types

This module exports types for constructing Code values

Synopsis

Documentation

data Class Source #

Code class

Constructors

G

G-code

M

M-code

T

T-code (select tool)

PStandalone

Stand-alone P-code

FStandalone

Stand-alone F-code

SStandalone

Stand-alone S-code

Instances
Enum Class Source # 
Instance details

Defined in Data.GCode.Types

Eq Class Source # 
Instance details

Defined in Data.GCode.Types

Methods

(==) :: Class -> Class -> Bool #

(/=) :: Class -> Class -> Bool #

Ord Class Source # 
Instance details

Defined in Data.GCode.Types

Methods

compare :: Class -> Class -> Ordering #

(<) :: Class -> Class -> Bool #

(<=) :: Class -> Class -> Bool #

(>) :: Class -> Class -> Bool #

(>=) :: Class -> Class -> Bool #

max :: Class -> Class -> Class #

min :: Class -> Class -> Class #

Show Class Source # 
Instance details

Defined in Data.GCode.Types

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

data ParamDesignator Source #

Param letter

Constructors

S

S parameter - usually spindle RPM

P

P parameter

F

F parameter - usually feedrate

H

H paramater - used by tool length offset

R

R parameter

I

X offset for arcs

J

Y offset for arcs

K

Z offset for arcs

zeroAxes :: Axes Source #

Return Axes with each known at zero position

asChars :: Show a => [a] -> [Char] Source #

type Limits = Map AxisDesignator (Double, Double) Source #

Map of AxisDesignator to pair of Doubles indicating lower and upper limits of travel

type ParamLimits = Map ParamDesignator (Double, Double) Source #

Map of ParamDesignator to pair of Doubles indicating lower and upper limits of this parameter

data Code Source #

Constructors

Code 

Fields

Comment ByteString

Standalone comment

Empty

Empty lines

Other ByteString

Parser unhandled lines

Instances
Eq Code Source # 
Instance details

Defined in Data.GCode.Types

Methods

(==) :: Code -> Code -> Bool #

(/=) :: Code -> Code -> Bool #

Ord Code Source # 
Instance details

Defined in Data.GCode.Types

Methods

compare :: Code -> Code -> Ordering #

(<) :: Code -> Code -> Bool #

(<=) :: Code -> Code -> Bool #

(>) :: Code -> Code -> Bool #

(>=) :: Code -> Code -> Bool #

max :: Code -> Code -> Code #

min :: Code -> Code -> Code #

Show Code Source # 
Instance details

Defined in Data.GCode.Types

Methods

showsPrec :: Int -> Code -> ShowS #

show :: Code -> String #

showList :: [Code] -> ShowS #

type GCode = [Code] Source #

List of Codes

toCodeClass :: Char -> Maybe Class Source #

Convert Char representation of a code to its Class

toAxis :: Char -> Maybe AxisDesignator Source #

Convert Char representation of an axis to its AxisDesignator

toParam :: Char -> Maybe ParamDesignator Source #

Convert Char representation of a param to its ParamDesignator

(&) :: a -> (a -> c) -> c Source #

num :: Int -> Code -> Code Source #

sub :: Int -> Code -> Code Source #

data Style Source #

Constructors

Style 
Instances
Show Style Source # 
Instance details

Defined in Data.GCode.Types

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #