mockdevice

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StatusSetList = []string{
	"Running",
	"Idle",
	"Busy",
	"Error",
}

StatusSetList Status Set List

Functions

func StartMockDevice

func StartMockDevice(availableFuncs []string, instructionHandler instructionHandlerFunc)

StartMockDevice Start MockDevice

Types

type Driver added in v0.1.1

type Driver interface {
	// contains filtered or unexported methods
}

Driver MockDevice Driver interface include main function and instruction handler

type MockDevice

type MockDevice struct {
	Name string
	// contains filtered or unexported fields
}

MockDevice basic info

func New

func New(deviceName string, devicePort string, availableFuncs []string, instructionHandler instructionHandlerFunc) (*MockDevice, error)

New new mock device

func (*MockDevice) Start

func (md *MockDevice) Start(stopCh <-chan struct{}) error

Start start http server

Jump to

Keyboard shortcuts

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