cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BandwidthCmd

type BandwidthCmd struct {
	Device  string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
	Time    int    `kong:"optional,short='t',default='5',help='measurement time in seconds'"`
	Details bool   `kong:"optional,short='d',default='false',help='print posted, non-posted and completion results'"`
	Type    string `kong:"optional,short='t',default='raw',enum='raw,payload',help='bandwidth type ${enum}'"`
}

func (*BandwidthCmd) Run

func (cmd *BandwidthCmd) Run() error

type BindCmd

type BindCmd struct {
	Device    string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	SwIndex   uint8  `arg help:"Software index of the fabric device."`
	PhyPortID uint8  `arg help:"Physical port ID within the domain."`
	LogPortID uint8  `arg help:"Logical port ID within the domain."`
	PDFID     string `arg help:"PDFID of the end-point."`
}

BindCmd defines the Bind CLI command and parameters

func (*BindCmd) Run

func (cmd *BindCmd) Run() error

Run will run the Bind command

type CsrCmd

type CsrCmd struct {
	Read  CsrReadCmd  `cmd help:"Read bytes from a device's Configuration Status Registers."`
	Write CsrWriteCmd `cmd help:"Write bytes to a device's Configuration Status Registers."`
}

type CsrReadCmd

type CsrReadCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	PDFID  string `arg help:"PDFID of the end-point."`
	Addr   string `arg help:"Address to read."`
	Bytes  uint8  `arg optional default:"4" help:"Number of bytes to read."`
}

func (*CsrReadCmd) Run

func (cmd *CsrReadCmd) Run() error

type CsrWriteCmd

type CsrWriteCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	PDFID  string `arg help:"PDFID of the end-point."`
	Addr   string `arg help:"Address to read."`
	Data   string `arg help:"Value to write."`
	Bytes  uint8  `arg optional default:"4" help:"Number of bytes to read."`
}

func (*CsrWriteCmd) Run

func (cmd *CsrWriteCmd) Run() error

type DumpCmd

type DumpCmd struct {
	EpPort DumpEpPortCmd `cmd help:"Dump information for a specific end-point port."`
}

type DumpEpPortCmd

type DumpEpPortCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	Pid    uint8  `arg help:"The end-point port ID."`
}

func (*DumpEpPortCmd) Run

func (cmd *DumpEpPortCmd) Run() error

type EchoCmd

type EchoCmd struct {
	Device  string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	Payload uint32 `arg optional default:"0" help:"The echo payload. The bit-inverse will be returned by the device."`
}

EchoCmd defines the Echo CLI command and parameters

func (*EchoCmd) Run

func (cmd *EchoCmd) Run() error

Run will run the Echo command

type EventCmd

type EventCmd struct {
	List EventListCmd `kong:"cmd,help='List events (Non-PAX)'"`
	Wait EventWaitCmd `kong:"cmd,help='Wait on events (Non-PAX)'"`
	Gfms EventGfmsCmd `kong:"cmd,help='Display and control GFMS event information (PAX Only)'"`
}

type EventGfmsCmd

type EventGfmsCmd struct {
	Device string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
	Clear  bool   `kong:"optional,short='c',default=false,help='Clear all GFMS events'"`
}

func (*EventGfmsCmd) Run

func (cmd *EventGfmsCmd) Run() error

type EventListCmd

type EventListCmd struct {
	Device string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
	All    bool   `kong:"optional,short='a',help='Show events in all partitions'"`
	Reset  bool   `kong:"optional,short='r',help='Clear all events'"`
	Event  int    `kong:"optional,short='e',help='Clear all events of the specified type'"`
}

func (*EventListCmd) Run

func (cmd *EventListCmd) Run() error

type EventWaitCmd

type EventWaitCmd struct {
	Device    string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
	Event     uint   `kong:"arg,required,short='e',help='Event to wait on'"`
	Partition int32  `kong:"optional,short='p',default=-1,help='Partition ID for the event'"`
	Port      int32  `kong:"optional,short='p',default=-1,help='Logical port ID for the event'"`
	Timeout   int64  `kong:"optional,short='t',default=-1,help='Timeout in milliseconds (-1 = forever)'"`
}

func (*EventWaitCmd) Run

func (cmd *EventWaitCmd) Run() error

type GasCmd

type GasCmd struct {
	Write GasWriteCmd `cmd help:"Write bytes to the Global Address Space."`
	Read  GasReadCmd  `cmd help:"Read bytes from the Global Address Space."`
	Stat  GasStatCmd  `cmd help:"Identify the device's Global Address Space."`
}

type GasReadCmd

type GasReadCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	Addr   string `arg help:"Address to read."`
	Bytes  uint64 `arg optional default:"4" help:"Number of bytes to read."`
}

GasReadCmd defines the GAS Read CLI command and parameters

func (*GasReadCmd) Run

func (cmd *GasReadCmd) Run() error

Run will execute the GAS Read Command and display the read data

type GasStatCmd

type GasStatCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
}

func (*GasStatCmd) Run

func (cmd *GasStatCmd) Run() error

type GasWriteCmd

type GasWriteCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	Addr   string `arg help:"Address to write."`
	Value  string `arg help:"Value to write."`
	Bytes  int    `arg optional default:"4" help:"Number of bytes to write."`
}

GasWriteCmd defines the GAS Write CLI command and parameters

func (*GasWriteCmd) Run

func (cmd *GasWriteCmd) Run() error

Run will execute the GAS Write Command

type GetFirmwareCmd

type GetFirmwareCmd struct {
	Device string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
}

GetFirmwareCmd -

func (*GetFirmwareCmd) Run

func (cmd *GetFirmwareCmd) Run() error

Run will run the GetFirmwareCmd command

type GetSerialCmd

type GetSerialCmd struct {
	Device string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
}

GetSerialCmd -

func (*GetSerialCmd) Run

func (cmd *GetSerialCmd) Run() error

Run will run the GetSerialCmd command

type IdentifyCmd

type IdentifyCmd struct {
	Device string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
}

IdentifyCmd defines the Identify CLI command and parameters

func (*IdentifyCmd) Run

func (cmd *IdentifyCmd) Run() error

Run will execute the Identify CLI Command

type LinkStatCmd

type LinkStatCmd struct {
	Device string `kong:"arg,required,type='existingFile',env='SWITCHTEC_DEV',help='The switchtec device.'"`
}

LinkStatCmd defines the Link Stat CLI command and parameters

func (*LinkStatCmd) Run

func (cmd *LinkStatCmd) Run() error

Run will execute the Link Stat CLI Command

type MfgCmd

type MfgCmd struct {
	Serial   GetSerialCmd   `kong:"cmd,help='Retrieve the device serial number.'"`
	Firmware GetFirmwareCmd `kong:"cmd,help='Retrieve the active firmware.'"`
}

type UnbindCmd

type UnbindCmd struct {
	Device    string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	SwIndex   uint8  `arg help:"Software index of the fabric device."`
	PhyPortID uint8  `arg help:"Physical port ID within the domain."`
	LogPortID uint8  `arg help:"Logical port ID within the domain."`
}

UnbindCmd defines the Bind CLI command and parameters

func (*UnbindCmd) Run

func (cmd *UnbindCmd) Run() error

Run will run the Unbind command

type VfResetCmd

type VfResetCmd struct {
	Device string `arg help:"The switchtec device." type:"existingFile" env:"SWITCHTEC_DEV"`
	PDFID  string `arg help:"PDFID of the end-point."`
}

func (*VfResetCmd) Run

func (cmd *VfResetCmd) Run() error

Jump to

Keyboard shortcuts

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