data_center

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MulanPSL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReplyNone = 0
	ReplyOK   = 1
	ReplyFail = -1
)
View Source
const (
	ResourceSystem = "system"
	ResourceAll    = "resource.all"
)
View Source
const (
	ResourceDeviceTemplate = "dp"
	ResourceAlgo           = "algo"
	ResourceAlgoTask       = "algoTask"
	ResourceTimRules       = "timRules"
	ResourceDeviceRules    = "deviceRules"
	ResourceAdminStates    = "adminStates"
)

存储在影子中的key

View Source
const BindDeviceKey = "device.bind"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminStates

type AdminStates struct {
	Name       string `json:"name"`
	AdminState string `json:"adminState"`
}

type AlgoDevInfo

type AlgoDevInfo struct {
	ProductId  string `json:"productId"`
	DeviceName string `json:"deviceName"`
}

type AlgoInfo

type AlgoInfo struct {
	Description         string                   `json:"description"`
	Device              AlgoDevInfo              `json:"device"`
	Channel             string                   `json:"channel"`
	Algorithm           AlgoTaskInfoAlgo         `json:"algorithm"`
	Command             string                   `json:"command" v:"required"`
	ContainerName       string                   `json:"containerName"`       // 运行容器的名称
	EnvironmentParam    []map[string]interface{} `json:"environmentParam"`    // 运行容器需要的参数
	DockerAdvancedParam string                   `json:"dockerAdvancedParam"` // 运行容器需要的高级参数
	Push                bool                     `json:"pushToCorex"`         // 是否将数据直接推送到云端
	AlgorithmOutput     AlgoOutput               `json:"algorithmOutput"`
	UpdatedAt           int64                    `json:"updatedAt"`
	CreatedAt           int64                    `json:"createdAt"`
}

type AlgoModel

type AlgoModel struct {
	Id      string        `json:"id"`      // 算法云端ID
	LocalId string        `json:"localId"` // 算法设备端本地ID
	Name    string        `json:"name"`    // 算法名称
	Version string        `json:"version"` // 算法版本
	Local   bool          `json:"local"`   //
	Info    AlgoModelInfo `json:"info"`
}

type AlgoModelConfig

type AlgoModelConfig struct {
	Format       string `json:"format"`
	Frame        string `json:"frame"`
	Manufacturer string `json:"manufacturer"`
	Method       string `json:"method"`
}

type AlgoModelInfo

type AlgoModelInfo struct {
	Description   string          `json:"description"`
	Category      int64           `json:"category"`
	FileSize      string          `json:"fileSize"`
	Configuration AlgoModelConfig `json:"configuration"`
	CreatedAt     int64           `json:"createdAt"`
}

type AlgoOutput

type AlgoOutput struct {
	Communication          string                 `json:"communication"`
	CommunicationParameter map[string]interface{} `json:"communicationParameter"`
	Store                  string                 `json:"store"`
	StoreParameter         map[string]interface{} `json:"storeParameter"`
	StreamOutPort          int                    `json:"streamOutPort"`
	StreamOutAddress       string                 `json:"streamOutAddress"`
	Attach                 Attach                 `json:"attach"`
}

type AlgoTask

type AlgoTask struct {
	Id      string   `json:"id"`      // 设备算法任务云端ID
	LocalId string   `json:"localId"` // 设备算法任务本地ID
	Local   bool     `json:"local"`
	Name    string   `json:"name" v:"required"`
	Status  string   `json:"status"`
	ErrMsg  string   `json:"errMsg"`
	StartAt int64    `json:"startAt"`
	Runtime int64    `json:"runtime"`
	Info    AlgoInfo `json:"info"`
}

type AlgoTaskInfoAlgo

type AlgoTaskInfoAlgo struct {
	Id    string `json:"id"`
	Local bool   `json:"local"`
}

type Attach

type Attach struct {
	DeviceInfoOut bool                   `json:"deviceInfoOut"` //是否输出设备信息
	ModelInfoOut  bool                   `json:"modelInfoOut"`  //是否输出模型信息
	UserSetting   map[string]interface{} `json:"userSetting"`   //用户自定义输出
}

type Model

type Model struct {
	Id      string    `json:"id"`      // 云端设备模板ID
	LocalId string    `json:"localId"` // 设备端模板ID
	Local   bool      `json:"local"`
	Version string    `json:"version"` // 设备模板版本号
	Info    ModelType `json:"info"`
}

type ModelType

type ModelType struct {
	Manufacturer string `json:"manufacturer"`
	Type         string `json:"type"`
	Model        string `json:"model"`
}

type Request

type Request struct {
	MessageId   string `json:"messageId"`
	RequestBody interface{}

	// 回复状态 0:未回复 1:已回复
	ReplyStatus int32  `json:"replyStatus"`
	ReplyMsg    string `json:"replyMsg"`
	ReplyBody   interface{}
}

type Resource

type Resource struct {
	// DeviceTemplate 设备模板
	DeviceTemplate []Model `json:"dp"`
	// Algo 算法文件
	Algo []AlgoModel `json:"algo"`
	// AlgoTask 算法任务
	AlgoTask []AlgoTask `json:"-"`
	//AdminStates 设备启用禁用状态
	AdminStates []AdminStates `json:"-"`
}

Jump to

Keyboard shortcuts

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