target

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 10 Imported by: 12

Documentation

Overview

Package target provides the construction of a target machine from a collection of devices

Index

Constants

View Source
const (
	// DriverSelectorV1Name is the basic selector name for device plugins
	// (drivers)
	DriverSelectorV1Name = "antha.driver.v1.TypeReply.type"
)

Variables

View Source
var (
	DriverSelectorV1Human = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.human.v1.Human",
	}
	DriverSelectorV1ShakerIncubator = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.shakerincubator.v1.ShakerIncubator",
	}
	DriverSelectorV1Mixer = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.mixer.v1.Mixer",
	}
	DriverSelectorV1Prompter = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.prompter.v1.Prompter",
	}
	DriverSelectorV1DataSource = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.datasource.v1.DataSource",
	}
	DriverSelectorV1WriteOnlyPlateReader = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.platereader.v1.PlateReader",
	}
	DriverSelectorV1QPCRDevice = ast.NameValue{
		Name:  DriverSelectorV1Name,
		Value: "antha.quantstudio.v1.QuantStudioService",
	}
)

Well known device plugins (drivers) selectors

Functions

func WithTarget

func WithTarget(parent context.Context, t *Target) context.Context

WithTarget creates a context with the given Target

Types

type Files

type Files struct {
	Type    string // Pseudo MIME-type describing contents of tarball
	Tarball []byte // Tar'ed and gzip'ed files
}

Files are binary data encoded in tar.gz bytes

type Finalizer

type Finalizer interface {
	GetFinalizers() []ast.Inst
}

A Finalizer is an instruction with finalization instructions

type Graph

type Graph struct {
	Insts []ast.Inst
}

Graph is a view of instructions as a graph

func (*Graph) Node

func (a *Graph) Node(i int) graph.Node

Node implements a Graph

func (*Graph) NumNodes

func (a *Graph) NumNodes() int

NumNodes implements a Graph

func (*Graph) NumOuts

func (a *Graph) NumOuts(n graph.Node) int

NumOuts implements a Graph

func (*Graph) Out

func (a *Graph) Out(n graph.Node, i int) graph.Node

Out implements a Graph

type Initializer

type Initializer interface {
	GetInitializers() []ast.Inst
}

An Initializer is an instruction with initialization instructions

type Manual

type Manual struct {
	Dev     ast.Device
	Label   string
	Details string
	// contains filtered or unexported fields
}

A Manual is human-aided interaction

func (*Manual) AppendDependsOn

func (a *Manual) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*Manual) DependsOn

func (a *Manual) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*Manual) Device

func (a *Manual) Device() ast.Device

Device implements an Inst

func (*Manual) SetDependsOn

func (a *Manual) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type Mix

type Mix struct {
	Dev             ast.Device
	Request         *lh.LHRequest
	Properties      *liquidhandling.LHProperties
	FinalProperties *liquidhandling.LHProperties
	Final           map[string]string // Map from ids in Properties to FinalProperties
	Files           Files
	Initializers    []ast.Inst
	Summary         *MixSummary
	// contains filtered or unexported fields
}

A Mix is a task that runs a mixer

func (*Mix) AppendDependsOn

func (a *Mix) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*Mix) DependsOn

func (a *Mix) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*Mix) Device

func (a *Mix) Device() ast.Device

Device implements an Inst

func (*Mix) GetInitializers

func (a *Mix) GetInitializers() []ast.Inst

GetInitializers implements an Initializer

func (*Mix) GetTimeEstimate

func (a *Mix) GetTimeEstimate() float64

GetTimeEstimate implements a TimeEstimator

func (*Mix) GetTipEstimates

func (a *Mix) GetTipEstimates() []wtype.TipEstimate

GetTipEstimates implements a TipEstimator

func (*Mix) SetDependsOn

func (a *Mix) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type MixSummary

type MixSummary struct {
	// Layout is a validated JSON summary of the deck layouts before and after
	// the mix operation takes place, suitable for consumption by the front end.
	// The JSON schema is available at microArch/driver/liquidhandling/schemas/layout.schema.json
	Layout []byte
	// Actions is a validated JSON summary of the steps taken during the liquidhandling
	// operation, suitable for consumption by the front end.
	// The JSON schema is available at microArch/driver/liquidhandling/schemas/actions.schema.json
	Actions []byte
}

MixSummary contains all the summary information which describes the mix instruction

func NewMixSummary

func NewMixSummary(itree *liquidhandling.ITree, initial *liquidhandling.LHProperties, final *liquidhandling.LHProperties, idMap map[string]string) (*MixSummary, error)

NewMixSummary construct a new MixSummary object from the instructions and initial and final robot states an error is returned if the parameters are invalid of if either summary object fails JSON-schema validation

type Order

type Order struct {
	Manual
	Mixes []*Mix
}

An Order is a task to order physical components

func (*Order) AppendDependsOn

func (a *Order) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*Order) DependsOn

func (a *Order) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*Order) SetDependsOn

func (a *Order) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type PlatePrep

type PlatePrep struct {
	Manual
	Mixes []*Mix
}

A PlatePrep is a task to setup plates

func (*PlatePrep) AppendDependsOn

func (a *PlatePrep) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*PlatePrep) DependsOn

func (a *PlatePrep) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*PlatePrep) SetDependsOn

func (a *PlatePrep) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type Prompt

type Prompt struct {
	Message string
	// contains filtered or unexported fields
}

Prompt is manual prompt instruction

func (*Prompt) AppendDependsOn

func (a *Prompt) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*Prompt) DependsOn

func (a *Prompt) DependsOn() []ast.Inst

DependsOn implements an Inst

func (Prompt) Device

func (a Prompt) Device() ast.Device

Device implements an Inst

func (*Prompt) SetDependsOn

func (a *Prompt) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type Run

type Run struct {
	Dev     ast.Device
	Label   string
	Details string
	Calls   []driver.Call
	// Additional instructions to add to beginning of instruction stream.
	// Instructions are assumed to depend in FIFO order.
	Initializers []ast.Inst
	// Additional instructions to add to end of instruction stream.
	// Instructions are assumed to depend in LIFO order.
	Finalizers []ast.Inst
	// contains filtered or unexported fields
}

Run calls on device

func (*Run) AppendDependsOn

func (a *Run) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*Run) DependsOn

func (a *Run) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*Run) Device

func (a *Run) Device() ast.Device

Device implements an Inst

func (*Run) GetFinalizers

func (a *Run) GetFinalizers() []ast.Inst

GetFinalizers implements a Finalizer instruction

func (*Run) GetInitializers

func (a *Run) GetInitializers() []ast.Inst

GetInitializers implements an Initializer instruction

func (*Run) SetDependsOn

func (a *Run) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type SetupIncubator

type SetupIncubator struct {
	Manual
	// Corresponding mix
	Mix              *Mix
	IncubationPlates []*wtype.Plate
}

A SetupIncubator is a task to setup an incubator

func (*SetupIncubator) AppendDependsOn

func (a *SetupIncubator) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*SetupIncubator) DependsOn

func (a *SetupIncubator) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*SetupIncubator) SetDependsOn

func (a *SetupIncubator) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type SetupMixer

type SetupMixer struct {
	Manual
	Mixes []*Mix
}

A SetupMixer is a task to setup a mixer

func (*SetupMixer) AppendDependsOn

func (a *SetupMixer) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*SetupMixer) DependsOn

func (a *SetupMixer) DependsOn() []ast.Inst

DependsOn implements an Inst

func (*SetupMixer) SetDependsOn

func (a *SetupMixer) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type Target

type Target struct {
	// contains filtered or unexported fields
}

Target for execution (collection of devices).

func GetTarget

func GetTarget(ctx context.Context) (*Target, error)

GetTarget returns the current Target in context

func New

func New() *Target

New creates a new target

func (*Target) AddDevice

func (a *Target) AddDevice(d ast.Device)

AddDevice adds a device to the target configuration

func (*Target) CanCompile

func (a *Target) CanCompile(reqs ...ast.Request) (r []ast.Device)

CanCompile returns the devices that can compile the given set of requests

type TimeEstimator

type TimeEstimator interface {
	// GetTimeEstimate returns a time estimate for this instruction in seconds
	GetTimeEstimate() float64
}

A TimeEstimator is an instruction that can estimate its own execution time

type TimedWait

type TimedWait struct {
	Duration time.Duration
	// contains filtered or unexported fields
}

TimedWait is a wait for a period of time.

func (*TimedWait) AppendDependsOn

func (a *TimedWait) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*TimedWait) DependsOn

func (a *TimedWait) DependsOn() []ast.Inst

DependsOn implements an Inst

func (TimedWait) Device

func (a TimedWait) Device() ast.Device

Device implements an Inst

func (*TimedWait) SetDependsOn

func (a *TimedWait) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

type TipEstimator

type TipEstimator interface {
	// GetTipEstimates returns an estimate of how many tips this instruction will use
	GetTipEstimates() []wtype.TipEstimate
}

A TipEstimator is an instruction that uses tips and provides information on how many

type Wait

type Wait struct {
	// contains filtered or unexported fields
}

Wait is a virtual instruction to hang dependencies on. A better name might been no-op.

func (*Wait) AppendDependsOn

func (a *Wait) AppendDependsOn(x ...ast.Inst)

AppendDependsOn implements an Inst

func (*Wait) DependsOn

func (a *Wait) DependsOn() []ast.Inst

DependsOn implements an Inst

func (Wait) Device

func (a Wait) Device() ast.Device

Device implements an Inst

func (*Wait) SetDependsOn

func (a *Wait) SetDependsOn(x ...ast.Inst)

SetDependsOn implements an Inst

Directories

Path Synopsis
Package auto provides methods for creating a simulation target based on auto discovery of drivers via gRPC
Package auto provides methods for creating a simulation target based on auto discovery of drivers via gRPC

Jump to

Keyboard shortcuts

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