fake

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fake implements a fake gantry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGantry

func NewGantry(name resource.Name, logger logging.Logger) gantry.Gantry

NewGantry returns a new fake gantry.

Types

type Gantry

type Gantry struct {
	resource.Named
	resource.TriviallyReconfigurable
	resource.TriviallyCloseable
	// contains filtered or unexported fields
}

Gantry is a fake gantry that can simply read and set properties.

func (*Gantry) CurrentInputs

func (g *Gantry) CurrentInputs(ctx context.Context) ([]referenceframe.Input, error)

CurrentInputs returns positions in the Gantry frame model..

func (*Gantry) GoToInputs

func (g *Gantry) GoToInputs(ctx context.Context, inputSteps ...[]referenceframe.Input) error

GoToInputs moves using the Gantry frames..

func (*Gantry) Home added in v0.4.0

func (g *Gantry) Home(ctx context.Context, extra map[string]interface{}) (bool, error)

Home runs the homing sequence of the gantry and returns true once completed.

func (*Gantry) IsMoving

func (g *Gantry) IsMoving(ctx context.Context) (bool, error)

IsMoving is always false for a fake gantry.

func (*Gantry) Lengths

func (g *Gantry) Lengths(ctx context.Context, extra map[string]interface{}) ([]float64, error)

Lengths returns the position in meters.

func (*Gantry) ModelFrame

func (g *Gantry) ModelFrame() referenceframe.Model

ModelFrame returns a Gantry frame.

func (*Gantry) MoveToPosition

func (g *Gantry) MoveToPosition(ctx context.Context, positionsMm, speedsMmPerSec []float64, extra map[string]interface{}) error

MoveToPosition is in meters.

func (*Gantry) Position

func (g *Gantry) Position(ctx context.Context, extra map[string]interface{}) ([]float64, error)

Position returns the position in meters.

func (*Gantry) Stop

func (g *Gantry) Stop(ctx context.Context, extra map[string]interface{}) error

Stop doesn't do anything for a fake gantry.

Jump to

Keyboard shortcuts

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