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 MetaTetrad = infra.MetaTetrad{ ProductKey, ProductSecret, DeviceName, DeviceSecret, }
View Source
var MetaTriad = infra.MetaTriad{ ProductKey, DeviceName, DeviceSecret, }
View Source
var SensorTerad = infra.MetaTetrad{
"a15aMYCIe4I",
"fkrQaPSraQTHcXbQ",
"mysensor",
"",
}
View Source
var SensorTriad = infra.MetaTriad{
"a15aMYCIe4I",
"mysensor",
"1a5a0ffd6b06e402740067cbbc7de2ee",
}
Functions ¶
func ThingEventPropertyPost ¶
func ThingEventPropertyPost(client *aiot.MQTTClient)
Types ¶
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
Click to show internal directories.
Click to hide internal directories.