camera

package
v0.0.0-...-f4b31ea Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package camera contains utilities for auditing camera on DUTs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountByConfig

func CountByConfig(ctx context.Context, ha components.HostAccess) (int, error)

CountByConfig get the number of camera on DUT.

func InterfaceType

func InterfaceType(ctx context.Context, ha components.HostAccess, cameraIndex int) (string, error)

InterfaceType get the type of the camera interface ie. "usb"

func ShouldRunAudit

func ShouldRunAudit(ctx context.Context, metric metrics.Metrics, dut *tlw.Dut, auditInterval time.Duration) (bool, error)

ShouldRunAudit determines if audit should run. The audit should run if any of the following is true: - last audit is done auditInterval duration ago

func TryCaptureFrame

func TryCaptureFrame(ctx context.Context, ha components.HostAccess, cameraIndex int) error

TryCaptureFrame tries to capture a frame. The capture takes maximum 10 second time and returns error if failed

Types

This section is empty.

Jump to

Keyboard shortcuts

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