tensorutils

package module
v0.0.0-...-aebdc39 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpDNW   = []byte("\x1BDNW")
	CmdDNW  = NewCommand(OpDNW, nil, nil, nil)
	CmdStop = NewCommand(OpDNW, make([]byte, 4), nil, []byte("\x01\x00"))
)

Functions

func RegisterDevicePairDNW

func RegisterDevicePairDNW(vid, pid string)

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(cmd, arg, data, crc []byte) *Command

func (*Command) Arg

func (c *Command) Arg() []byte

func (*Command) ArgLen

func (c *Command) ArgLen() int

func (*Command) Bytes

func (c *Command) Bytes() []byte

func (*Command) CRC

func (c *Command) CRC() []byte

func (*Command) CRCLen

func (c *Command) CRCLen() int

func (*Command) Cmd

func (c *Command) Cmd() []byte

func (*Command) CmdLen

func (c *Command) CmdLen() int

func (*Command) Data

func (c *Command) Data() []byte

func (*Command) DataLen

func (c *Command) DataLen() int

func (*Command) Len

func (c *Command) Len() int

type DNW

type DNW struct {
	// contains filtered or unexported fields
}

func GetDNW

func GetDNW() (*DNW, error)

GetDNW finds the next device known to be compatible with DNW and claims it

func (*DNW) Close

func (dnw *DNW) Close() error

func (*DNW) Closed

func (dnw *DNW) Closed() bool

func (*DNW) Free

func (dnw *DNW) Free()

func (*DNW) GetBuffer

func (dnw *DNW) GetBuffer() *crunchio.Buffer

func (*DNW) GetID

func (dnw *DNW) GetID() string

func (*DNW) GetPID

func (dnw *DNW) GetPID() string

func (*DNW) GetPort

func (dnw *DNW) GetPort() string

func (*DNW) GetSerial

func (dnw *DNW) GetSerial() string

func (*DNW) GetUSB

func (dnw *DNW) GetUSB() bool

func (*DNW) GetVID

func (dnw *DNW) GetVID() string

func (*DNW) Read

func (dnw *DNW) Read(p []byte) (int, error)

func (*DNW) ReadMsg

func (dnw *DNW) ReadMsg() (*Message, error)

func (*DNW) Write

func (dnw *DNW) Write(p []byte) (int, error)

func (*DNW) WriteCmd

func (dnw *DNW) WriteCmd(cmd *Command) error

func (*DNW) WriteMsg

func (dnw *DNW) WriteMsg(msg *Message) error

type Message

type Message struct {
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(bytes []byte) *Message

func (*Message) Argument

func (msg *Message) Argument() string

func (*Message) Bytes

func (msg *Message) Bytes() []byte

func (*Message) Command

func (msg *Message) Command() string

func (*Message) Device

func (msg *Message) Device() string

func (*Message) String

func (msg *Message) String() string

func (*Message) SubCommand

func (msg *Message) SubCommand() string

Directories

Path Synopsis
cmd
tensor-usbdl command

Jump to

Keyboard shortcuts

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