事件请求处理程序(Event Handler)

logger.LogInformation("Handle request:{0}",context.RequestId);MemoryStream copy=new MemoryStream();await input.CopyToAsync(copy);copy.Seek(0,SeekOrigin.Begin);return copy;} static void Main(string[]args){} } } 示例解析如下...

请求处理程序(Handler)

logger.LogInformation("Handle request:{0}",context.RequestId);MemoryStream copy=new MemoryStream();await input.CopyToAsync(copy);copy.Seek(0,SeekOrigin.Begin);return copy;} static void Main(string[]args){} } } 示例解析如下...

使用WaitCondition与WaitConditionHandle进行信号通知

Type:ALIYUN:ROS:WaitCondition Properties:Handle:Ref:InstallNginxWaitConditionHandle Timeout:60 InstallNginxWaitConditionHandle:Type:ALIYUN:ROS:WaitConditionHandle Outputs:{ } Metadata:{ } 模板逻辑:在ECS实例中运行安装Nginx...

MQTT接入

返回值说明 值 说明 0 成功失败 IOT_MQTT_Subscribe_Sync 接口原型 int IOT_MQTT_Subscribe_Sync(void*handle,const char*topic_filter,iotx_mqtt_qos_t qos,iotx_mqtt_event_handle_func_fpt topic_handle_func,void*pcontext,int timeout...

使用示例

示例代码:aiot_ota_setopt(ota_handle,AIOT_OTAOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_OTAOPT_MQTT_HANDLE mqtt_handle 远程配置 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。设置远程配置的指令...

设备影子

函数声明如下:/*@brief Create a data type registered to the server.*@param[in]handle:The handle of device shadow.*@param[in]pattr:The parameter which registered to the server.*@retval SUCCESS_RETURN:Success.*@retval other:...

使用示例

示例代码:aiot_ntp_setopt(ntp_handle,AIOT_NTPOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_NTPOPT_MQTT_HANDLE mqtt_handle NTP服务 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。设置时区。示例代码:...

OCI

Initialize&Allocate Service Context Handle*/HANDLE_ERROR(*errhp,OCIHandleAlloc(*envhp,(dvoid*)&(*svchp),OCI_HTYPE_SVCCTX,(size_t)0,(dvoid*)0));Initialize&Allocate Session Handle*/HANDLE_ERROR(*errhp,OCIHandleAlloc(*envhp,...

示例代码说明

示例代码:aiot_ota_setopt(ota_handle,AIOT_OTAOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_OTAOPT_MQTT_HANDLE mqtt_handle OTA 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置OTA升级指令消息的回调...

使用示例

示例代码:aiot_logpost_setopt(logpost_handle,AIOT_LOGPOSTOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_LOGPOSTOPT_MQTT_HANDLE mqtt_handle 日志上报 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置...

设备影子

返回值说明 值 说明 NULL 失败 非NULL Shadow句柄 IOT_Shadow_Destroy 接口原型 iotx_err_t IOT_Shadow_Destroy(void*handle);接口说明 断开网络连接,销毁Shadow模块所有资源。参数说明 参数 数据类型 方向 说明 handle void*输入 Shadow...

使用示例

添加关联的MQTT句柄*/aiot_compress_setopt(compress_handle,AIOT_COMPRESSOPT_MQTT_HANDLE,mqtt_handle);设置压缩等级。设置压缩等级,压缩等级为1~9,压缩等级越高,压缩效果越好,但内存和时间消耗越高*/uint8_t compress_level=1;aiot_...

ble_host

函数原型 int ble_stack_gatt_indicate(int16_t conn_handle,int16_t char_handle,const uint8_t*data,uint16_t len)输入参数 args description conn_handle 连接句柄,在连接成功后分配 char_handle 属性句柄,在注册服务时分配 data 上报...

使用Lua插件

handle:streamInfo():dynamicMetadata():set("envoy.lua","request_body",requestBody)end function envoy_on_response(response_handle)local headers=response_handle:headers()local headersStr=""local contentType local ...

示例代码说明

示例代码:aiot_ota_setopt(ota_handle,AIOT_OTAOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_OTAOPT_MQTT_HANDLE mqtt_handle OTA 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置OTA升级指令消息的回调...

OTA升级

参数说明 参数 数据类型 方向 说明 handle void*输入 OTA句柄 version const char*输入 版本号 返回值说明 值 说明 0 成功失败 IOT_OTA_ReportProgress 接口原型 int IOT_OTA_ReportProgress(void*handle,IOT_OTA_Progress_t progress,...

使用示例

示例代码:aiot_ra_setopt(ra_handle,AIOT_RAOPT_MQTT_HANDLE,mqtt_handle);aiot_ra_setopt(ra_handle,AIOT_RAOPT_NETWORK_CRED,(void*)&cred);aiot_ra_setopt(ra_handle,AIOT_RAOPT_EVENT_HANDLER,(void*)ra_event_cb);for(int i=0;i...

使用示例

示例代码:aiot_bootstrap_setopt(bootstrap_handle,AIOT_BOOTSTRAPOPT_MQTT_HANDLE,(void*)mqtt_handle);相关参数:配置项 示例 说明 AIOT_BOOTSTRAPOPT_MQTT_HANDLE mqtt_handle 当设备接收到物联网平台下推的设备分发消息,触发该回调...

示例代码说明

示例代码:aiot_ota_setopt(ota_handle,AIOT_OTAOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_OTAOPT_MQTT_HANDLE mqtt_handle OTA 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置OTA升级指令消息的回调...

功能说明

}/创建美颜引擎/rootPath 美颜资源路径:queen_res的上级⽬录(不传默认为exe⽬录)queen_engine_t handle_beauty;if(QUEEN_RESULT_CODE_OK!queen_engine_create(&handle_beauty,rootPath,"123456")){ return;} 启⽤效果并设置效果参数。开启...

使用示例

示例代码:aiot_devinfo_setopt(devinfo_handle,AIOT_DEVINFOOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_DEVINFOOPT_MQTT_HANDLE mqtt_handle 设备标签。配置消息回调。示例代码:aiot_devinfo_setopt(devinfo_handle,...

使用示例

示例代码:aiot_subdev_setopt(subdev_handle,AIOT_SUBDEVOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例 说明 AIOT_SUBDEVOPT_MQTT_HANDLE mqtt_handle 网关与子设备 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置...

使用示例

示例代码:aiot_ra_setopt(ra_handle,AIOT_RAOPT_MQTT_HANDLE,mqtt_handle);aiot_ra_setopt(ra_handle,AIOT_RAOPT_NETWORK_CRED,(void*)&cred);aiot_ra_setopt(ra_handle,AIOT_RAOPT_EVENT_HANDLER,(void*)ra_event_cb);for(int i=0;i...

使用示例

示例代码:aiot_dm_setopt(dm_handle,AIOT_DMOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例值 说明 AIOT_DMOPT_MQTT_HANDLE mqtt_handle 物模型 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。编写物模型消息的回调函数...

HTTP接入

参数说明 参数 数据类型 方向 说明 handle void*输入 HTTP Context 返回值说明 值 说明 0 成功失败 IOT_HTTP_SendMessage 接口原型 int IOT_HTTP_SendMessage(void*handle,iotx_http_message_param_t *msg_param);接口说明 当HTTP连接云端...

C版本SDK

typedef int(*get_properties_callback)(device_handle_t dev_handle,leda_device_data_t properties[],int properties_count,void*usr_data);set_properties_callback/*设置属性(对应设备产品物模型属性定义)的回调函数,需驱动开发者...

SE芯片驱动API

se_open_session 函数原型:irot_result_t se_open_session(void*handle)。功能描述:与SE芯片建立会话连接。参数描述:[IN]handle,会话句柄。返回值:成功时返回0;其他返回值,请参考 设备端错误码。se_transmit 函数原型:irot_result_...

C版本SDK

typedef int(*get_properties_callback)(device_handle_t dev_handle,leda_device_data_t properties[],int properties_count,void*usr_data);set_properties_callback/*设置属性(对应设备产品物模型属性定义)的回调函数,需驱动开发者...

使用示例

void demo_http_recv_handler(void*handle,const aiot_http_recv_t *packet,void*userdata){ switch(packet->type){ case AIOT_HTTPRECV_STATUS_CODE:{/*TODO:以下代码如果不被注释,SDK收到HTTPS报文时,会通过这个用户回调打印HTTPS状态码,...

MQTT动态注册使用示例

void demo_dynregmq_recv_handler(void*handle,const aiot_dynregmq_recv_t*packet,void*userdata){ switch(packet->type){/*TODO:回调中需保存packet指向的空间内容,回调返回后,这些空间会被释放。case AIOT_DYNREGMQRECV_DEVICEINFO_WL:...

使用示例

void demo_coap_recv_handler(void*handle,const aiot_coap_recv_t*packet,void*userdata){ switch(packet->type){ case AIOT_COAPRECV_RESPONSE:{/*TODO:以下代码如果不被注释,SDK收到COAP报文时,会通过这个用户回调打印COAP报文的code,...

PyODPS DataFrame的代码运行环境

如果在handle函数体中引用在handle外import的包可能会报错,因为在不同环境中,包的结构可能不同,而cloudpickle会将本地包的引用代入MaxCompute Executor,导致报错,因而建议import在handle函数体中进行。由于使用cloudpickle,如果在...

成功步骤

本文介绍了成功步骤和其相关使用示例。介绍 成功(Succeed)步骤用来提前结束一系列串行步骤,类似于编程语言中的 return。...type:pass name:pass2 goto:handle_failure-type:succeed name:final-type:pass name:handle_failure

使用示例

示例代码:aiot_task_setopt(task_handle,AIOT_TASKOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例值 说明 AIOT_TASKOPT_MQTT_HANDLE mqtt_handle 设备任务 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置消息回调。...

在ASM中通过EnvoyFilter添加HTTP响应头

elseif response_handle:headers():get("Content-Security-Policy")then if not hasFrameAncestors(response_handle)then csp=response_handle:headers():get("Content-Security-Policy");csp=csp.;frame-ancestors none;response_handle:...

在ASM中通过EnvoyFilter添加HTTP响应头

elseif response_handle:headers():get("Content-Security-Policy")then if not hasFrameAncestors(response_handle)then csp=response_handle:headers():get("Content-Security-Policy");csp=csp.;frame-ancestors none;response_handle:...

HTTPS接入使用示例

void demo_http_recv_handler(void*handle,const aiot_http_recv_t *packet,void*userdata){ switch(packet->type){ case AIOT_HTTPRECV_STATUS_CODE:{/*TODO:以下代码如果不被注释,SDK收到HTTPS报文时,会通过这个用户回调打印HTTPS状态码,...

使用示例

示例代码:aiot_shadow_setopt(shadow_handle,AIOT_SHADOWOPT_MQTT_HANDLE,mqtt_handle);相关参数:配置项 示例值 说明 AIOT_SHADOWOPT_MQTT_HANDLE mqtt_handle 设备影子 功能的请求基于MQTT连接,通过该配置项,关联MQTT连接句柄。配置...

基于ODBC的应用开发

初始化环境 SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&env);SQLSetEnvAttr(env,SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3,SQL_IS_INTEGER);建立连接 SQLAllocHandle(SQL_HANDLE_DBC,env,&dbc);SQLSetConnectAttr(dbc,SQL_...

C Link SDK组件说明

关联MQTT*/aiot_linkspeech_setopt(linkspeech_handle,AIOT_LSOPT_MQTT_HANDLE,mqtt_handle);配置音频文件目录。通过 work_dir 定义文件目录,语料下载及组合播报时,需使用该目录。设置音频文件保存目录*/aiot_linkspeech_setopt...
共有15条 < 1 2 3 4 ... 15 >
跳转至: GO
产品推荐
云服务器 安全管家服务 安全中心
这些文档可能帮助您
弹性公网IP 短信服务 人工智能平台 PAI 金融分布式架构 对象存储 物联网平台
新人特惠 爆款特惠 最新活动 免费试用