Code Monkey home page Code Monkey logo

hummingbird-sdk-go's Introduction

hummingbird-sdk-go

介绍

蜂鸟物联网平台官方Go语言SDK。

方法

Online

功能说明

设备连接物联网平台

方法原型

func (d *DriverService) Online (deviceId string) error

Offline

设备离线

  • deviceId 设备Id标识
func (d *DriverService) Offline (deviceId string) error 

GetConnectStatus

功能说明

获取设备连接状态

云平台支持

CreateDevice

创建设备

func (d *DriverService) CreateDevice(device model.AddDevice) (model.Device, error) 

GetDeviceList

获取所有的设备

func (d *DriverService) GetDeviceList() map[string]model.Device 

GetDeviceById

通过设备id获取设备详情

func (d *DriverService) GetDeviceById(deviceId string) (model.Device, bool) 

ProductList

获取当前实例下的所有产品

func (d *DriverService) ProductList() map[string]model.Product 

GetProductById

根据产品id获取产品信息

func (d *DriverService) GetProductById(productId string) (model.Product, bool) 

GetProductProperties

根据产品id获取产品所有属性信息

func (d *DriverService) GetProductProperties(productId string) (map[string]model.Property, bool) 

GetProductPropertyByCode

根据产品id与code获取属性信息

func (d *DriverService) GetProductPropertyByCode(productId, code string) (model.Property, bool) 

GetProductEvents

根据产品id获取产品所有事件信息

func (d *DriverService) GetProductEvents(productId string) (map[string]model.Event, bool) 

GetProductEventByCode

根据产品id与code获取事件信息

func (d *DriverService) GetProductEventByCode(productId, code string) (model.Event, bool) 

GetPropertyServices

根据产品id获取产品所有服务信息

func (d *DriverService) GetPropertyServices(productId string) (map[string]model.Service, bool) 

GetProductServiceByCode

根据产品id与code获取服务信息

func (d *DriverService) GetProductServiceByCode(productId, code string) (model.Service, bool) 

PropertyReport

物模型属性上报 如果data参数中的Sys.Ack设置为1,则该方法会同步阻塞等待云端返回结果。

func (d *DriverService) PropertyReport(deviceId string, data model.PropertyReport) (model.CommonResponse, error) 

EventReport

物模型事件上报

func (d *DriverService) EventReport(deviceId string, data model.EventReport) (model.CommonResponse, error) 

BatchReport

设备批量上报属性和事件

func (d *DriverService) BatchReport(deviceId string, data model.BatchReport) (model.CommonResponse, error) 

PropertySetResponse

设备属性下发响应

func (d *DriverService) PropertySetResponse(deviceId string, data model.CommonResponse) error 

PropertyGetResponse

设备属性查询响应

func (d *DriverService) PropertyGetResponse(deviceId string, data model.PropertyGetResponse) error

ServiceExecuteResponse

设备动作执行响应

func (d *DriverService) ServiceExecuteResponse(deviceId string, data model.ServiceExecuteResponse) error 

GetCustomStorage

根据key值获取驱动存储的自定义内容

func (d *DriverService) GetCustomStorage(keys []string) (map[string][]byte, error)

PutCustomStorage

存储驱动的自定义内容

func (d *DriverService) PutCustomStorage(kvs map[string][]byte) error 

DeleteCustomStorage

根据key值删除驱动存储的自定义内容

func (d *DriverService) DeleteCustomStorage(keys []string) error 

GetAllCustomStorage

获取所有驱动存储的自定义内容

func (d *DriverService) GetAllCustomStorage() (map[string][]byte, error) 

hummingbird-sdk-go's People

Contributors

winc-link avatar

Watchers

 avatar

Forkers

wangningkai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.