This repository was archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
package rpc | ||
|
||
type OtaVersionRequest struct{} | ||
|
||
type OtaVersionResponse map[string]any | ||
|
||
type OtaUploadRequest struct{} | ||
|
||
type OtaUploadResponse StreamId | ||
|
||
type OtaResultRequest struct { | ||
Version string `json:"version"` | ||
} | ||
|
||
type OtaResultResponse struct{} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package rpc | ||
|
||
type SerialId struct { | ||
Id string `json:"id"` | ||
} | ||
|
||
type SerialItem struct { | ||
Id string `json:"id"` //COM1 COM2 /dev/ttyS1 | ||
Name string `json:"name,omitempty"` | ||
Options SerialOptions `json:"options"` | ||
} | ||
|
||
type SerialOptions struct { | ||
BaudRate int `json:"baud_rate,omitempty"` // 9600 115200 ... | ||
DataBits int `json:"data_bits,omitempty"` // 7 8 | ||
StopBits int `json:"stop_bits,omitempty"` // 1 2 | ||
ParityMode string `json:"parity_mode,omitempty"` // N E O 0 1 | ||
} | ||
|
||
type SerialListRequest struct{} | ||
|
||
type SerialListResponse []SerialItem | ||
|
||
type SerialOpenRequest SerialItem | ||
|
||
type SerialOpenResponse struct{} | ||
|
||
type SerialCloseRequest SerialId | ||
|
||
type SerialCloseResponse struct{} | ||
|
||
type SerialWatchRequest SerialId | ||
|
||
type SerialWatchResponse StreamId | ||
|
||
type SerialPipeRequest SerialId | ||
|
||
type SerialPipeResponse StreamId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package rpc | ||
|
||
type StreamId struct { | ||
Id string `json:"id"` | ||
} | ||
|
||
type Stream struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package rpc | ||
|
||
type TcpId struct { | ||
Id string `json:"id"` | ||
} | ||
|
||
type TcpItem struct { | ||
Id string `json:"id"` | ||
Name string `json:"name,omitempty"` | ||
Options TcpOptions `json:"options"` | ||
} | ||
|
||
type TcpOptions struct { | ||
IsServer bool `json:"is_server,omitempty"` | ||
Host string `json:"host"` | ||
Port int `json:"port"` | ||
} | ||
|
||
type TcpListRequest struct{} | ||
|
||
type TcpListResponse []TcpItem | ||
|
||
type TcpCreateRequest TcpItem | ||
|
||
type TcpCreateResponse struct{} | ||
|
||
type TcpDeleteRequest TcpId | ||
|
||
type TcpDeleteResponse struct{} | ||
|
||
type TcpRestartRequest TcpId | ||
|
||
type TcpRestartResponse struct{} | ||
|
||
type TcpWatchRequest TcpId | ||
|
||
type TcpWatchResponse StreamId | ||
|
||
type TcpPipeRequest TcpId | ||
|
||
type TcpPipeResponse StreamId |