Documentation
¶
Index ¶
- Constants
- Variables
- func Port(dev machine.BlockDevice) *msc
- func SetProductID(productID string)
- func SetProductRev(productRev string)
- func SetVendorID(vendorID string)
- type CBW
- type Error
- type RecorderDisk
- func (d *RecorderDisk) ClearLog()
- func (d *RecorderDisk) EraseBlockSize() int64
- func (d *RecorderDisk) EraseBlocks(startBlock, numBlocks int64) error
- func (d *RecorderDisk) GetLog() []RecorderRecord
- func (d *RecorderDisk) ReadAt(buffer []byte, offset int64) (int, error)
- func (d *RecorderDisk) Record(opCode RecorderOpCode, offset int64, length int, data []byte)
- func (d *RecorderDisk) Size() int64
- func (d *RecorderDisk) WriteAt(buffer []byte, offset int64) (int, error)
- func (d *RecorderDisk) WriteBlockSize() int64
- type RecorderOpCode
- type RecorderRecord
Constants ¶
View Source
const (
Signature = 0x43425355 // "USBC" in little endian
)
Variables ¶
View Source
var MSC *msc
Functions ¶
func SetProductID ¶
func SetProductID(productID string)
func SetProductRev ¶
func SetProductRev(productRev string)
func SetVendorID ¶
func SetVendorID(vendorID string)
Types ¶
type RecorderDisk ¶
type RecorderDisk struct {
// contains filtered or unexported fields
}
RecorderDisk is a block device that records actions taken on it
func NewRecorderDisk ¶
func NewRecorderDisk(dev machine.BlockDevice, count int) *RecorderDisk
NewRecorderDisk creates a new RecorderDisk instance
func (*RecorderDisk) ClearLog ¶
func (d *RecorderDisk) ClearLog()
func (*RecorderDisk) EraseBlockSize ¶
func (d *RecorderDisk) EraseBlockSize() int64
func (*RecorderDisk) EraseBlocks ¶
func (d *RecorderDisk) EraseBlocks(startBlock, numBlocks int64) error
func (*RecorderDisk) GetLog ¶
func (d *RecorderDisk) GetLog() []RecorderRecord
func (*RecorderDisk) ReadAt ¶
func (d *RecorderDisk) ReadAt(buffer []byte, offset int64) (int, error)
func (*RecorderDisk) Record ¶
func (d *RecorderDisk) Record(opCode RecorderOpCode, offset int64, length int, data []byte)
func (*RecorderDisk) Size ¶
func (d *RecorderDisk) Size() int64
func (*RecorderDisk) WriteAt ¶
func (d *RecorderDisk) WriteAt(buffer []byte, offset int64) (int, error)
func (*RecorderDisk) WriteBlockSize ¶
func (d *RecorderDisk) WriteBlockSize() int64
type RecorderOpCode ¶
type RecorderOpCode uint8
const ( RecorderOpCodeRead RecorderOpCode = iota RecorderOpCodeWrite RecorderOpCodeEraseBlocks )
type RecorderRecord ¶
type RecorderRecord struct { OpCode RecorderOpCode Offset int64 Length int Data []byte Time int64 // contains filtered or unexported fields }
func (*RecorderRecord) String ¶
func (r *RecorderRecord) String() (string, bool)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.