revtesthelpers

package
v0.0.0-...-d066a84 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeRevDriver

type FakeRevDriver struct {
	SetMotorAImpl     func(float32) error
	SetMotorBImpl     func(float32) error
	StartImpl         func() error
	StopAllMotorsImpl func() error
	HaltImpl          func() error
	ResetEPOImpl      func() error
	GetEPOImpl        func() (bool, error)
	// contains filtered or unexported fields
}

func NewFakeRevDriver

func NewFakeRevDriver() *FakeRevDriver

func (*FakeRevDriver) Connection

func (b *FakeRevDriver) Connection() gobot.Connection

func (*FakeRevDriver) GetEPO

func (b *FakeRevDriver) GetEPO() (bool, error)

func (*FakeRevDriver) Halt

func (b *FakeRevDriver) Halt() error

func (*FakeRevDriver) Name

func (b *FakeRevDriver) Name() string

func (*FakeRevDriver) ResetEPO

func (b *FakeRevDriver) ResetEPO() error

func (*FakeRevDriver) SetMotorA

func (b *FakeRevDriver) SetMotorA(power float32) error

func (*FakeRevDriver) SetMotorB

func (b *FakeRevDriver) SetMotorB(power float32) error

func (*FakeRevDriver) SetName

func (b *FakeRevDriver) SetName(n string)

func (*FakeRevDriver) Start

func (b *FakeRevDriver) Start() error

func (*FakeRevDriver) StopAllMotors

func (b *FakeRevDriver) StopAllMotors() error

type I2cFakeConnection

type I2cFakeConnection struct {
	CloseImpl          func() error
	ReadImpl           func(p []byte) (n int, err error)
	WriteImpl          func(p []byte) (n int, err error)
	ReadByteImpl       func() (val byte, err error)
	ReadByteDataImpl   func(reg uint8) (val uint8, err error)
	ReadWordDataImpl   func(reg uint8) (val uint16, err error)
	WriteByteImpl      func(val byte) (err error)
	WriteByteDataImpl  func(reg uint8, val uint8) (err error)
	WriteWordDataImpl  func(reg uint8, val uint16) (err error)
	WriteBlockDataImpl func(reg uint8, b []byte) (err error)
	ConnectImpl        func() error
	FinalizeImpl       func() error
	NameImpl           func() string
	SetNameImpl        func(string)
}

func NewI2cFakeConnection

func NewI2cFakeConnection() *I2cFakeConnection

func (*I2cFakeConnection) Close

func (c *I2cFakeConnection) Close() error

func (*I2cFakeConnection) Connect

func (c *I2cFakeConnection) Connect() error

func (*I2cFakeConnection) Finalize

func (c *I2cFakeConnection) Finalize() error

func (*I2cFakeConnection) Name

func (c *I2cFakeConnection) Name() string

func (*I2cFakeConnection) Read

func (c *I2cFakeConnection) Read(p []byte) (n int, err error)

func (*I2cFakeConnection) ReadByte

func (c *I2cFakeConnection) ReadByte() (val byte, err error)

func (*I2cFakeConnection) ReadByteData

func (c *I2cFakeConnection) ReadByteData(reg uint8) (val uint8, err error)

func (*I2cFakeConnection) ReadWordData

func (c *I2cFakeConnection) ReadWordData(reg uint8) (val uint16, err error)

func (*I2cFakeConnection) SetName

func (c *I2cFakeConnection) SetName(n string)

func (*I2cFakeConnection) Write

func (c *I2cFakeConnection) Write(p []byte) (n int, err error)

func (*I2cFakeConnection) WriteBlockData

func (c *I2cFakeConnection) WriteBlockData(reg uint8, b []byte) (err error)

func (*I2cFakeConnection) WriteByte

func (c *I2cFakeConnection) WriteByte(val byte) (err error)

func (*I2cFakeConnection) WriteByteData

func (c *I2cFakeConnection) WriteByteData(reg uint8, val uint8) (err error)

func (*I2cFakeConnection) WriteWordData

func (c *I2cFakeConnection) WriteWordData(reg uint8, val uint16) (err error)

type I2cTestAdaptor

type I2cTestAdaptor struct {
	GetConnectionImpl func(address int, bus int) (device i2c.Connection, err error)
}

func NewI2cTestAdaptor

func NewI2cTestAdaptor(conn *I2cFakeConnection) *I2cTestAdaptor

func (*I2cTestAdaptor) GetConnection

func (t *I2cTestAdaptor) GetConnection(address int, bus int) (device i2c.Connection, err error)

func (*I2cTestAdaptor) GetDefaultBus

func (t *I2cTestAdaptor) GetDefaultBus() int

Jump to

Keyboard shortcuts

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