|
SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (MTB & µPython)
|
Functions | |
| void | trustm_update_state (trustm_state_t new_state, const char *status_code, const char *detail) |
| เป็น setter ที่แนบเวลากำกับ ไม่ใช่ dispatcher; ให้ตั้งสถานะ WAITING_* ก่อนที่ transport จะเริ่ม | |
| void | trustm_reset_state (void) |
| กลับสู่ IDLE และล้าง correlation id เป็นศูนย์ — นี่คือสิ่งที่จบรอบการทำงาน; ให้เรียกที่ทุกเส้นทางออก | |
| const char * | trustm_current_correlation_id (void) |
| id ของรอบที่กำลังทำงานอยู่ หรือ NULL; NULL หมายถึงให้ทิ้ง bundle ที่เข้ามา — นี่คือการป้องกันการเล่นซ้ำ | |
| uint16_t | trustm_requested_target_oid (void) |
| OID เป้าหมายที่คำขอครั้งล่าสุดระบุไว้; เป็น weak — ให้ตรวจ NULL และถอยไปใช้ 0xE0E1. | |
| uint16_t | trustm_requested_anchor_oid (void) |
| trust anchor ที่คำขอครั้งล่าสุดระบุไว้; เป็น weak — รูปแบบเดียวกัน ค่าเริ่มต้น 0xE0E8 | |
5 ฟังก์ชัน หนึ่งตัวเขียน state machine หนึ่งตัวจบรอบการทำงาน และ 3 ตัวอ่านสิ่งที่คำขอที่กำลังทำงานอยู่ระบุไว้ สี่ใน 5 ตัวถูกใช้แบบ weak (symbol 6 ตัวที่ถูกใช้แบบ weak — ข้อกำหนดการตรวจ NULL) โดยมี trustm_update_state() เป็นข้อยกเว้น
| void trustm_update_state | ( | trustm_state_t | new_state, |
| const char * | status_code, | ||
| const char * | detail ) |
เป็น setter ที่แนบเวลากำกับ ไม่ใช่ dispatcher; ให้ตั้งสถานะ WAITING_* ก่อนที่ transport จะเริ่ม
Move the state machine, and put it back at IDLE. status_code and detail are surfaced on the provisioning screen.
| void trustm_reset_state | ( | void | ) |
กลับสู่ IDLE และล้าง correlation id เป็นศูนย์ — นี่คือสิ่งที่จบรอบการทำงาน; ให้เรียกที่ทุกเส้นทางออก
| const char * trustm_current_correlation_id | ( | void | ) |
id ของรอบที่กำลังทำงานอยู่ หรือ NULL; NULL หมายถึงให้ทิ้ง bundle ที่เข้ามา — นี่คือการป้องกันการเล่นซ้ำ
| uint16_t trustm_requested_target_oid | ( | void | ) |
OID เป้าหมายที่คำขอครั้งล่าสุดระบุไว้; เป็น weak — ให้ตรวจ NULL และถอยไปใช้ 0xE0E1.
The OIDs the in-flight request named, and the id that correlates the platform's reply with it. NULL when nothing is in flight.
| uint16_t trustm_requested_anchor_oid | ( | void | ) |
trust anchor ที่คำขอครั้งล่าสุดระบุไว้; เป็น weak — รูปแบบเดียวกัน ค่าเริ่มต้น 0xE0E8