mock

package
v0.0.3-rc0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductKey    = "a1NHTWLlMny"
	ProductSecret = "qv30SFtpGf3tSBfP"
	DeviceName    = "mygateway"
	DeviceSecret  = "6ed85dfb2ec5cd3746104cc3b2e0b188"
)

just for test

View Source
const (
	SensorProductKey    = "a15aMYCIe4I"
	SensorProductSecret = "fkrQaPSraQTHcXbQ"
	SensorDeviceName    = "mysensor"
	SensorDeviceSecret  = "1a5a0ffd6b06e402740067cbbc7de2ee"
)

Variables

View Source
var SensorTerad = infra.MetaTetrad{
	"a15aMYCIe4I",
	"fkrQaPSraQTHcXbQ",
	"mysensor",
	"",
}
View Source
var SensorTriad = infra.MetaTriad{
	"a15aMYCIe4I",
	"mysensor",
	"1a5a0ffd6b06e402740067cbbc7de2ee",
}

Functions

func Init

func Init(triad infra.MetaTriad) *aiot.MQTTClient

func ThingEventPropertyPost

func ThingEventPropertyPost(client *aiot.MQTTClient)

Types

type Alarm

type Alarm struct {
	High int `json:"high"`
}

type Instance

type Instance struct {
	GatewayVersion string  `json:"gateway_version"`
	SystemInfo     string  `json:"system_info"`
	CpuUsage       float32 `json:"cpu_usage"`
	MemoryUsage    float32 `json:"memory_usage"`
	MemoryTotal    float64 `json:"memory_total"`
	MemoryFree     float64 `json:"memory_free"`
	CpuCoreNumber  int32   `json:"cpu_core_number"`
	DiskUsage      float32 `json:"disk_usage"`
	LightSwitch    int     `json:"light_switch"`
}

func InstanceValue

func InstanceValue() Instance

type SensorInstance

type SensorInstance struct {
	CurrentTemperature float64 `json:"CurrentTemperature"`
	CurrentHumidity    float64 `json:"CurrentHumidity"`
}

func SensorInstanceValue

func SensorInstanceValue() SensorInstance

Jump to

Keyboard shortcuts

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