cswitch

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: 11 Imported by: 0

Documentation

Overview

Package cswitch ... Copyright 2021 The Chromium OS Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. The Thunderbolt Quality Center (TQC) API is which exposes a REST API for automating Thunderbolt test cases. Package cswitch provides utilities to interact with cswitch to perform hotplug-unplug and device enumeration. The CSwitch contains 4 connectors. Only 1 connector at any given time is enabled. An additional virtual connector, referred to as '0', is used in order to simulate disconnection. CSwitch using FTDI controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseSession

func CloseSession(ctx context.Context, sessionID, domain string) error

CloseSession closes the created session and on success it returns nil. If it fails it will return the respective error. domain holds the local host ip with port number ex: domain = "localhost:9000"

func CreateSession

func CreateSession(ctx context.Context, domain string) (string, error)

CreateSession Creates session id for controlling cswitch operations and on success it will return session id. If it fails it will return the respective error. domain holds the local host IP with port number ex: domain = "localhost:9000"

func Generation

func Generation(ctx context.Context, port string) (string, error)

Generation returns the generation of the TBT device connected to the DUT. port holds the TBT port id in DUT.

func IsDeviceEnumerated

func IsDeviceEnumerated(ctx context.Context, device, port string) (bool, error)

IsDeviceEnumerated validates device enumeration in DUT. device holds the device name of connected TBT device. port holds the TBT port id in DUT.

func NvmVersion

func NvmVersion(ctx context.Context, port string) (string, error)

NvmVersion returns the NVM version of the TBT device connected to the DUT. port holds the TBT port id in DUT.

func RxSpeed

func RxSpeed(ctx context.Context, port string) (string, error)

RxSpeed returns RX speed of the connected cable. port holds the TBT port id in DUT.

func ToggleCSwitchPort

func ToggleCSwitchPort(ctx context.Context, sessionID, toggle, domain string) error

ToggleCSwitchPort enable/disable cswitch port with given parameters session id, toggle, domain ip. sessionID holds session id created by CreateSession function. domain holds the local host ip with port number ex: domain = "localhost:9000".

func TxSpeed

func TxSpeed(ctx context.Context, port string) (string, error)

TxSpeed returns Tx speed of the connected cable. port holds the TBT port id in DUT.

Types

This section is empty.

Jump to

Keyboard shortcuts

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