|
SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (MTB & µPython)
|
#include <stdint.h>#include <stddef.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| bool | claw_https_connected (void) |
| predicate บอกสถานะการเชื่อมต่อ; ตรวจก่อน circuit breaker ต้นทุนต่ำและเรียกได้อย่างปลอดภัยทุกเมื่อ | |
| bool | claw_https_connect (const char *host, uint16_t port, const char *api_key) |
| เปิดการเชื่อมต่อ TLS และเก็บ API key ไว้; ยกระดับ trust ก่อน และตั้งกลับเมื่อล้มเหลว | |
| bool | claw_http_connect_insecure (const char *host, uint16_t port) |
| int | claw_https_get (const char *path, char *resp_buf, size_t resp_max) |
| int | claw_https_post (const char *path, const char *json, size_t json_len, char *resp_buf, size_t resp_max) |
| POST json ไปยัง path; คืนค่าเป็นจำนวนไบต์ของคำตอบที่เขียนได้ และติดลบเมื่อล้มเหลว | |
| void | claw_https_disconnect (void) |
| ปิดการเชื่อมต่อ; ต้องตามด้วย claw_trust_set(CLAW_TRUST_USB) | |
| bool claw_http_connect_insecure | ( | const char * | host, |
| uint16_t | port ) |
| int claw_https_get | ( | const char * | path, |
| char * | resp_buf, | ||
| size_t | resp_max ) |