dropletgenomics

package
v0.0.0-...-55f88ab Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package dropletgenomics defines the DropletGenomics company's microfluidincs device

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakePayload

func MakePayload(setting string, data interface{}) payload

MakePayload creates a payload structure TODO: eliminate use

func MakePost

func MakePost(url string, data map[string][]string) (*http.Response, error)

MakePost encodes a struct to json and sends a post to url TODO: eliminate use

Types

type Camera

type Camera struct {
	BaseAddr     string  `json:"-"`
	FrameRate    float64 `json:"volumeTarget"`
	Exposure     float64 `json:"purge_rate"`
	Illumination float64 `json:"pump_id"`
}

Camera has the camera dataset and controlls comms

func (*Camera) Invoke

func (c *Camera) Invoke(invoke device.ClientInvocation, data float64) error

Invoke performs communications with the device by specific commands

type Device

type Device struct {
	device.Device
	// contains filtered or unexported fields
}

Device is DropletGenomics' rendition of microfluidics devices

func Create

func Create(usedPumps int) *Device

Create returns a device configured with given configuration

func (*Device) Available

func (d *Device) Available() bool

Available determines whether connection to DropletGenomics device is established

func (Device) Camera

func (d Device) Camera() device.Client

Camera returns the device's camera data

func (Device) NumPumps

func (d Device) NumPumps() int

NumPumps tells the user how many pumps are available

func (Device) Pump

func (d Device) Pump(index int) device.Client

Pump returns device's pump by it's id

func (Device) RefreshAll

func (d Device) RefreshAll() error

RefreshAll launches refresh on all pumps

func (Device) Stream

func (Device) Stream(ctx context.Context) <-chan device.Frame

Stream launches async stream decoding of ctx lifetime

type Frame

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

Frame defines how dropletgenomics frame looks like. It's a struct to be passed as message. Getting the internal frame ends this struct's lifetime.

func CreateFrame

func CreateFrame(ctx context.Context, frame image.Image) Frame

CreateFrame creates a frame with given frame and context

func (Frame) Frame

func (f Frame) Frame() image.Image

Frame returns the underlying frame Upon frame retrieval, cancel is called, ending frame's lifetime

func (Frame) Skip

func (f Frame) Skip() <-chan struct{}

Skip checks if struct is passed it's lifetime Since it's a frame, it means it should be skipped

type Pump

type Pump struct {
	BaseAddr      string  `json:"-"`
	VolumeTarget  float64 `json:"volumeTarget"`
	PurgeRate     float64 `json:"purge_rate"`
	PumpID        int     `json:"pump_id"`
	RateW         float64 `json:"rateW"`
	Volume        float64 `json:"volume"`
	Status        bool    `json:"status"`
	Name          string  `json:"name"`
	Direction     bool    `json:"direction"`
	Syringe       float64 `json:"syringe"`
	Used          bool    `json:"used"`
	VolumeTargetW float64 `json:"volumeTargetW"`
	VolumeW       float64 `json:"volumeW"`
	Rate          float64 `json:"rate"`
	Stalled       bool    `json:"stalled"`
	Force         float64 `json:"force"`
	// contains filtered or unexported fields
}

Pump owns data of a pump and performs comms with device

func (*Pump) Invoke

func (p *Pump) Invoke(invoke device.ClientInvocation, data float64) error

Invoke performs communications with the device by specific commands

Jump to

Keyboard shortcuts

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