2,367
个编辑
更改
无编辑摘要
iotCloud = (function (global) {
var Client = function(host,token,code,type){
console.log("test");
}
//公共方法输出
Client.prototype = {
set onDeviceMessage(cb){ return this._setOnDeviceMessage(cb); },
set onDeviceMessage(cb){ return this._setOnDeviceMessage(cb); },
//此时的onStatusCb是client对外的成员变量,恰巧和内部的成员同名
set onStatusCb(cb){ return this._setOnStatusCb(cb); }
}
Client.prototype.send = function(ep,msg){
this._send(ep,msg);
}
Client.prototype.getDeviceStatus = function(ep,cb){
this._getDeviceStatus(ep,cb);
}
//v2.0改版需求,应用通过平台下发命令需要知晓发送情况,例如是否已送达,送达时间等等。
Client.prototype.Send2Platform = function(ep,msgId,msg,cb){
this._send2platform(ep,msgId,msg,cb);
}
// Module contents.
return {
Client: Client
};
})(window);
var Client = function(host,token,code,type){
console.log("test");
}
//公共方法输出
Client.prototype = {
set onDeviceMessage(cb){ return this._setOnDeviceMessage(cb); },
set onDeviceMessage(cb){ return this._setOnDeviceMessage(cb); },
//此时的onStatusCb是client对外的成员变量,恰巧和内部的成员同名
set onStatusCb(cb){ return this._setOnStatusCb(cb); }
}
Client.prototype.send = function(ep,msg){
this._send(ep,msg);
}
Client.prototype.getDeviceStatus = function(ep,cb){
this._getDeviceStatus(ep,cb);
}
//v2.0改版需求,应用通过平台下发命令需要知晓发送情况,例如是否已送达,送达时间等等。
Client.prototype.Send2Platform = function(ep,msgId,msg,cb){
this._send2platform(ep,msgId,msg,cb);
}
// Module contents.
return {
Client: Client
};
})(window);