設備控制

設備控制

授權的用戶可以通過系統對受控設備進行一些控制操作,這些操作成爲 command,受控設備會在接收到這些 command 後進行處理,並且給出處理結果。用戶也可以通過系統查詢這些 command 的執行結果。

你可以 在此 查看這些 command 的詳細說明

函數列表

Add

Add 向一個受控設備添加一個 command

rpc Add(AddRequest) returns (AddResponse){
    option (google.api.http) = {
        post: "/api/v1/controller/add"
        body: "*"
    };
}

http 路徑:

/api/v1/controller/add

權限要求: root(1) or device_control(140)

Find

Find 用於查詢已經存在的 command

rpc Find(FindRequest) returns (FindResponse){
    option (google.api.http) = {
        get: "/api/v1/controller"
    };
}

http 路徑:

/api/v1/controller

權限要求: root(1) or device_control(140)