Documentation
¶
Overview ¶
Package planktoscope provides a high-level client for control of planktoscopes
Index ¶
- Constants
- func GetMQTTConfig(brokerURL, clientID string) (c *mqtt.ClientOptions, err error)
- type Broadcaster
- type CameraSettings
- type Client
- func (c *Client) CameraStateBroadcasted() <-chan struct{}
- func (c *Client) Close()
- func (c *Client) Connect() error
- func (c *Client) ConnectedAtLeastOnce() <-chan struct{}
- func (c *Client) GetState() Planktoscope
- func (c *Client) HasConnection() bool
- func (c *Client) ImagerStateBroadcasted() <-chan struct{}
- func (c *Client) PumpStateBroadcasted() <-chan struct{}
- func (c *Client) RunControllerAction(ctx context.Context, command string, params hcl.Body) error
- func (c *Client) RunImagingAction(ctx context.Context, p PlanktoscopeImagingParams) error
- func (c *Client) RunPumpAction(ctx context.Context, p PlanktoscopePumpParams) error
- func (c *Client) RunStopImagingAction(ctx context.Context) error
- func (c *Client) RunStopPumpAction(ctx context.Context) error
- func (c *Client) SetCamera(iso, shutterSpeed uint64, autoWhiteBalance bool, ...) (mqtt.Token, error)
- func (c *Client) SetMetadata(sampleProjectID, sampleID string, acquisitionTime time.Time) (mqtt.Token, error)
- func (c *Client) Shutdown(ctx context.Context) error
- func (c *Client) StartImaging(forward bool, stepVolume, stepDelay float64, steps uint64) (mqtt.Token, error)
- func (c *Client) StartPump(forward bool, volume, flowrate float64) (mqtt.Token, error)
- func (c *Client) StopImaging() (mqtt.Token, error)
- func (c *Client) StopPump() (mqtt.Token, error)
- type ClientID
- type Config
- type Imager
- type ImagerSettings
- type Orchestrator
- func (o *Orchestrator) Add(id ClientID, url string) error
- func (o *Orchestrator) Close(ctx context.Context) error
- func (o *Orchestrator) Get(id ClientID) (c *Client, ok bool)
- func (o *Orchestrator) Remove(ctx context.Context, id ClientID) error
- func (o *Orchestrator) Update(ctx context.Context, id ClientID, url string) error
- type Planktoscope
- type PlanktoscopeImagingParams
- type PlanktoscopePumpParams
- type Pump
- type PumpSettings
Constants ¶
View Source
const (
Protocol = "planktoscope-v2.3"
)
Variables ¶
This section is empty.
Functions ¶
func GetMQTTConfig ¶
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
func NewBroadcaster ¶
func NewBroadcaster() *Broadcaster
func (*Broadcaster) BroadcastNext ¶
func (b *Broadcaster) BroadcastNext()
func (*Broadcaster) Broadcasted ¶
func (b *Broadcaster) Broadcasted() <-chan struct{}
type CameraSettings ¶ added in v0.3.3
type CameraSettings struct { StateKnown bool ISO uint64 ShutterSpeed uint64 AutoWhiteBalance bool WhiteBalanceRedGain float64 WhiteBalanceBlueGain float64 }
func DefaultCameraSettings ¶ added in v0.3.3
func DefaultCameraSettings() CameraSettings
type Client ¶
type Client struct { Config Config Logger godest.Logger MQTT mqtt.Client // contains filtered or unexported fields }
func (*Client) CameraStateBroadcasted ¶ added in v0.3.3
func (c *Client) CameraStateBroadcasted() <-chan struct{}
func (*Client) ConnectedAtLeastOnce ¶ added in v0.1.7
func (c *Client) ConnectedAtLeastOnce() <-chan struct{}
func (*Client) GetState ¶
func (c *Client) GetState() Planktoscope
func (*Client) HasConnection ¶ added in v0.1.7
func (*Client) ImagerStateBroadcasted ¶ added in v0.3.9
func (c *Client) ImagerStateBroadcasted() <-chan struct{}
func (*Client) PumpStateBroadcasted ¶
func (c *Client) PumpStateBroadcasted() <-chan struct{}
func (*Client) RunControllerAction ¶ added in v0.3.5
func (*Client) RunImagingAction ¶ added in v0.3.9
func (c *Client) RunImagingAction(ctx context.Context, p PlanktoscopeImagingParams) error
func (*Client) RunPumpAction ¶ added in v0.3.5
func (c *Client) RunPumpAction(ctx context.Context, p PlanktoscopePumpParams) error
func (*Client) RunStopImagingAction ¶ added in v0.3.9
func (*Client) RunStopPumpAction ¶ added in v0.3.5
func (*Client) SetMetadata ¶ added in v0.3.9
func (*Client) StartImaging ¶ added in v0.3.9
func (*Client) StopImaging ¶ added in v0.3.9
type ImagerSettings ¶ added in v0.3.9
func DefaultImagerSettings ¶ added in v0.3.9
func DefaultImagerSettings() ImagerSettings
type Orchestrator ¶ added in v0.1.7
type Orchestrator struct {
// contains filtered or unexported fields
}
func NewOrchestrator ¶ added in v0.1.7
func NewOrchestrator(logger godest.Logger) *Orchestrator
func (*Orchestrator) Add ¶ added in v0.1.7
func (o *Orchestrator) Add(id ClientID, url string) error
func (*Orchestrator) Close ¶ added in v0.1.7
func (o *Orchestrator) Close(ctx context.Context) error
func (*Orchestrator) Get ¶ added in v0.1.7
func (o *Orchestrator) Get(id ClientID) (c *Client, ok bool)
type Planktoscope ¶
type Planktoscope struct { Pump Pump PumpSettings PumpSettings CameraSettings CameraSettings Imager Imager ImagerSettings ImagerSettings }
type PlanktoscopeImagingParams ¶ added in v0.3.9
type PlanktoscopeImagingParams struct { SampleProjectID string `hcl:"sample_project_id"` // TODO: move the project ID somewhere else? SampleID string `hcl:"sample_id"` // TODO: move the sample ID somewhere else? Forward bool `hcl:"forward"` StepVolume float64 `hcl:"step_volume"` StepDelay float64 `hcl:"step_delay"` Steps uint64 `hcl:"steps"` }
type PlanktoscopePumpParams ¶ added in v0.3.5
type PumpSettings ¶
func DefaultPumpSettings ¶ added in v0.3.3
func DefaultPumpSettings() PumpSettings
Click to show internal directories.
Click to hide internal directories.