chart

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package chart provides utility for displaying a chart on chart tablet paired with DUT in camerabox setup.

Index

Constants

View Source
const DisplayDefaultLevel = -1

DisplayDefaultLevel presents the default display level

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, d *dut.DUT, altHostname, outDir string, chartPaths []string) (*Chart, []NamePath, error)

New starts chart service waiting for display chart command on the host either |altHostname| or |d|'s corresponding chart tablet, prepares all chart files to be displayed from |chartPaths| and returns a new |Chart| instance and the |NamePath| for each input chart for further be displayed with.

func SetUp

func SetUp(ctx context.Context, conn *ssh.Conn, outDir string, chartPaths []string) (_ *Chart, _ []NamePath, retErr error)

SetUp sets up the chart with the given ssh connection, prepares all chart files to be displayed from |chartPaths| and returns a new |Chart| instance and the |NamePath| for each input chart for further be displayed with. It uses |displayLevel| to set the brightness, the range is in [0.0, 100.0].

Types

type Chart

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

Chart displays chart files on the chart tablet in a camerabox setup.

func (*Chart) Close

func (c *Chart) Close(ctx context.Context, outDir string) error

Close closes the chart process and saves its logs to |outDir|.

func (*Chart) Display

func (c *Chart) Display(ctx context.Context, namePath NamePath) error

Display displays the chart file specified by |namePath|.

func (*Chart) SetDisplayLevel

func (c *Chart) SetDisplayLevel(ctx context.Context, lv float32) error

SetDisplayLevel sets the display level ranged [0.0, 100.0].

type NamePath

type NamePath string

NamePath is the reference path to the chart to be displayed on the chart service. The path is determined by the relative path to the chart directory.

Jump to

Keyboard shortcuts

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