config

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFileName = "phicomm-r1-controler.yaml"
View Source
var ConfigFilePath = fmt.Sprintf("./%s", ConfigFileName)
View Source
var ConfigModelVar = &ConfigModel{
	ADBConfig:      &ServerConfig{PathToAdb: ""},
	NetworkDevices: []string{"192.168.123.146:5555"},
}
View Source
var SingleIpPort = ""
View Source
var SingleServicePort = 0

Functions

func InitConfigFile

func InitConfigFile()

func LoadSnapcraftConfigPath

func LoadSnapcraftConfigPath()

func UseConfigFile

func UseConfigFile()

func WriteConfigFile

func WriteConfigFile(ConfigMode *ConfigModel, path string) (err error)

将配置写入指定的路径的文件

Types

type AdbDeviceInfo added in v0.0.19

type AdbDeviceInfo struct {
	Serial string
}

type AndroidAdbDeviceWithOpenIoTHub

type AndroidAdbDeviceWithOpenIoTHub struct {
	SerialID string
	// contains filtered or unexported fields
}

func (*AndroidAdbDeviceWithOpenIoTHub) Reg

func (*AndroidAdbDeviceWithOpenIoTHub) RegMdns

func (ao *AndroidAdbDeviceWithOpenIoTHub) RegMdns()

func (*AndroidAdbDeviceWithOpenIoTHub) RunAdbCommand added in v0.0.5

func (ao *AndroidAdbDeviceWithOpenIoTHub) RunAdbCommand(args []string) (string, error)

执行adb的命令

func (*AndroidAdbDeviceWithOpenIoTHub) RunAdbSellCommandWithSlice added in v0.0.13

func (ao *AndroidAdbDeviceWithOpenIoTHub) RunAdbSellCommandWithSlice(args []string) (string, error)

执行adb shell 命令

func (*AndroidAdbDeviceWithOpenIoTHub) RunCommand added in v0.0.5

func (ao *AndroidAdbDeviceWithOpenIoTHub) RunCommand(cmd string, args ...string) (string, error)

执行adb shell 命令

func (*AndroidAdbDeviceWithOpenIoTHub) StartAPIServer

func (ao *AndroidAdbDeviceWithOpenIoTHub) StartAPIServer()

type ConfigModel

type ConfigModel struct {
	ADBConfig      *ServerConfig
	NetworkDevices []string
}

func (*ConfigModel) KillAdbServer added in v0.0.20

func (cm *ConfigModel) KillAdbServer() (string, error)

func (*ConfigModel) ListDevices added in v0.0.19

func (cm *ConfigModel) ListDevices() (devices []*AdbDeviceInfo, err error)

func (*ConfigModel) RunAdbCmd added in v0.0.19

func (cm *ConfigModel) RunAdbCmd(cmd []string) (string, error)

func (*ConfigModel) StartAdbServer added in v0.0.19

func (cm *ConfigModel) StartAdbServer() (string, error)

type ServerConfig added in v0.0.19

type ServerConfig struct {
	PathToAdb string
}

Jump to

Keyboard shortcuts

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