Documentation
¶
Overview ¶
Package camera contains utilities for auditing camera on DUTs.
Index ¶
- func CountByConfig(ctx context.Context, ha components.HostAccess) (int, error)
- func InterfaceType(ctx context.Context, ha components.HostAccess, cameraIndex int) (string, error)
- func ShouldRunAudit(ctx context.Context, metric metrics.Metrics, dut *tlw.Dut, ...) (bool, error)
- func TryCaptureFrame(ctx context.Context, ha components.HostAccess, cameraIndex int) error
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.
Click to show internal directories.
Click to hide internal directories.