devices

package
v0.0.0-...-4ffc68c Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Devices collected methods for getting device information from a system under test

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClockIDFetcher

func BuildClockIDFetcher(interfaceName string) error

func BuildDPLLNetlinkInfoFetcher

func BuildDPLLNetlinkInfoFetcher(clockID *big.Int) error

BuildDPLLNetlinkInfoFetcher popluates the fetcher required for collecting the DPLLInfo

func BuildFilesystemDPLLInfoFetcher

func BuildFilesystemDPLLInfoFetcher(interfaceName string) error

BuildFilesystemDPLLInfoFetcher popluates the fetcher required for collecting the DPLLInfo

func BuildPTPDeviceInfo

func BuildPTPDeviceInfo(interfaceName string) error

BuildPTPDeviceInfo popluates the fetcher required for collecting the PTPDeviceInfo

func IsDPLLFileSystemPresent

func IsDPLLFileSystemPresent(ctx clients.ExecContext, interfaceName string) (bool, error)

func MapStringToInt

func MapStringToInt(inputMap map[string]string) (map[string]int, error)

MapStringToInt converts map string to map int

Types

type DevFilesystemDPLLInfo

type DevFilesystemDPLLInfo struct {
	Timestamp string  `fetcherKey:"date"          json:"timestamp"`
	EECState  string  `fetcherKey:"dpll_0_state"  json:"eecstate"`
	PPSState  string  `fetcherKey:"dpll_1_state"  json:"state"`
	PPSOffset float64 `fetcherKey:"dpll_1_offset" json:"terror"`
}

func GetDevDPLLFilesystemInfo

func GetDevDPLLFilesystemInfo(ctx clients.ExecContext, interfaceName string) (DevFilesystemDPLLInfo, error)

GetDevDPLLFilesystemInfo returns the device DPLL info for an interface.

func (*DevFilesystemDPLLInfo) GetAnalyserFormat

func (dpllInfo *DevFilesystemDPLLInfo) GetAnalyserFormat() ([]*callbacks.AnalyserFormatType, error)

AnalyserJSON returns the json expected by the analysers

type DevNetlinkDPLLInfo

type DevNetlinkDPLLInfo struct {
	Timestamp string `fetcherKey:"date" json:"timestamp"`
	EECState  string `fetcherKey:"eec"  json:"eecstate"`
	PPSState  string `fetcherKey:"pps"  json:"state"`
}

func GetDevDPLLNetlinkInfo

func GetDevDPLLNetlinkInfo(ctx clients.ExecContext, clockID *big.Int) (DevNetlinkDPLLInfo, error)

GetDevDPLLInfo returns the device DPLL info for an interface.

func (*DevNetlinkDPLLInfo) GetAnalyserFormat

func (dpllInfo *DevNetlinkDPLLInfo) GetAnalyserFormat() ([]*callbacks.AnalyserFormatType, error)

AnalyserJSON returns the json expected by the analysers

type GPSAntennaDetails

type GPSAntennaDetails struct {
	Timestamp string `json:"timestamp"`
	BlockID   int    `json:"blockId"`
	Status    int    `json:"status"`
	Power     int    `json:"power"`
}

type GPSDetails

type GPSDetails struct {
	NavStatus      GPSNavStatus         `fetcherKey:"navStatus"      json:"navStatus"`
	AntennaDetails []*GPSAntennaDetails `fetcherKey:"antennaDetails" json:"antennaDetails"`
	NavClock       GPSNavClock          `fetcherKey:"navClock"       json:"navClock"`
}

func GetGPSNav

func GetGPSNav(ctx clients.ExecContext) (GPSDetails, error)

GetGPSNav returns GPSNav of the host

func (*GPSDetails) GetAnalyserFormat

func (gpsNav *GPSDetails) GetAnalyserFormat() ([]*callbacks.AnalyserFormatType, error)

type GPSNavClock

type GPSNavClock struct {
	Timestamp string `json:"timestamp"`
	TimeAcc   int    `json:"timeAcc"`
	FreqAcc   int    `json:"freqAcc"`
}

type GPSNavStatus

type GPSNavStatus struct {
	Timestamp string `json:"timestamp"`
	Flags     string `json:"flags"`
	GPSFix    int    `json:"GPSFix"`
}

type GPSVersions

type GPSVersions struct {
	Timestamp       string   `fetcherKey:"timestamp"       json:"timestamp"`
	FirmwareVersion string   `fetcherKey:"firmwareVersion" json:"firmwareVersion"`
	ProtoVersion    string   `fetcherKey:"protocolVersion" json:"protocolVersion"`
	Module          string   `fetcherKey:"module"          json:"module"`
	UBXVersion      string   `fetcherKey:"UBXVersion"      json:"ubxVersion"`
	GPSDVersion     string   `fetcherKey:"GPSDVersion"     json:"gpsdVersion"`
	GNSSDevices     []string `fetcherKey:"GNSSDevices"     json:"gnssDevices"`
}

func GetGPSVersions

func GetGPSVersions(ctx clients.ExecContext) (GPSVersions, error)

GetGPSVersions returns GPSVersions of the host

func (*GPSVersions) GetAnalyserFormat

func (gpsVer *GPSVersions) GetAnalyserFormat() ([]*callbacks.AnalyserFormatType, error)

type NetlinkClockID

type NetlinkClockID struct {
	ClockID   *big.Int `fetcherKey:"clockID"       json:"clockId"`
	Timestamp string   `fetcherKey:"date"          json:"timestamp"`
}

func GetClockID

func GetClockID(ctx clients.ExecContext, interfaceName string) (NetlinkClockID, error)

type NetlinkEntry

type NetlinkEntry struct {
	ClockID    *big.Int `json:"clock-id"`    //nolint:tagliatelle // not my choice
	LockStatus string   `json:"lock-status"` //nolint:tagliatelle // not my choice
	Driver     string   `json:"module-name"` //nolint:tagliatelle // not my choice
	ClockType  string   `json:"type"`        //nolint:tagliatelle // not my choice
	ID         int      `json:"id"`          //nolint:tagliatelle // not my choice
}

type PMCInfo

type PMCInfo struct {
	Timestamp               string `fetcherKey:"date"                    json:"timestamp"`
	TimeSource              string `fetcherKey:"timeSource"              json:"timeSource"`
	ClockAccuracy           string `fetcherKey:"clockAccuracy"           json:"clockAccuracy"`
	OffsetScaledLogVariance string `fetcherKey:"offsetScaledLogVariance" json:"offsetScaledLogVariance"`
	ClockClass              int    `fetcherKey:"clockClass"              json:"clock_class"` //nolint:tagliatelle // needs to match the parser in vse-sync-pp
	CurrentUtcOffset        int    `fetcherKey:"currentUtcOffset"        json:"currentUtcOffset"`
	Leap61                  int    `fetcherKey:"leap61"                  json:"leap61"`
	Leap59                  int    `fetcherKey:"leap59"                  json:"leap59"`
	CurrentUtcOffsetValid   int    `fetcherKey:"currentUtcOffsetValid"   json:"currentUtcOffsetValid"`
	PtpTimescale            int    `fetcherKey:"ptpTimescale"            json:"ptpTimescale"`
	TimeTraceable           int    `fetcherKey:"timeTraceable"           json:"timeTraceable"`
	FrequencyTraceable      int    `fetcherKey:"frequencyTraceable"      json:"frequencyTraceable"`
}

func GetPMC

func GetPMC(ctx clients.ExecContext) (PMCInfo, error)

GetPMC returns PMCInfo

func (*PMCInfo) GetAnalyserFormat

func (gmSetting *PMCInfo) GetAnalyserFormat() ([]*callbacks.AnalyserFormatType, error)

GetAnalyserFormat returns the json expected by the analysers

type PTPDeviceInfo

type PTPDeviceInfo struct {
	Timestamp       string        `fetcherKey:"date"            json:"date"`
	VendorID        string        `fetcherKey:"vendorID"        json:"vendorId"`
	DeviceID        string        `fetcherKey:"devID"           json:"deviceInfo"`
	GNSSDev         string        `fetcherKey:"gnss"            json:"GNSSDev"`
	FirmwareVersion string        `fetcherKey:"firmwareVersion" json:"firmwareVersion"`
	DriverVersion   string        `fetcherKey:"driverVersion"   json:"driverVersion"`
	Timeoffset      time.Duration `fetcherKey:"timeOffset"      json:"timeOffset"`
}

func GetPTPDeviceInfo

func GetPTPDeviceInfo(interfaceName string, ctx clients.ExecContext) (PTPDeviceInfo, error)

GetPTPDeviceInfo returns the PTPDeviceInfo for an interface

func (*PTPDeviceInfo) GetAnalyserFormat

func (ptpDevInfo *PTPDeviceInfo) GetAnalyserFormat() ([]*callbacks.AnalyserFormatType, error)

AnalyserJSON returns the json expected by the analysers

Jump to

Keyboard shortcuts

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