Skip to content

Commit b9c948c

Browse files
authored
First few docs in the mini-doc series. (#534)
* Buffering mini documentation * Iterating * Iterating * Update buffering.md * iterating * Adding auth integration info * preserving ongoing work * More content added * Minor - adding layering diagram * Updating based on feedback * PR feedback and state transitions with threading model
1 parent f57f1a3 commit b9c948c

16 files changed

+587
-0
lines changed

docs/Content_View_Storage.png

31 KB
Loading

docs/Continuation_model.png

254 KB
Loading

docs/Continuation_model.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
title Async API threading model in PIC
2+
3+
loop Continuation model
4+
state over Application: CreateStream (async)
5+
note left of Application: Application thread calling PIC
6+
PIC->PIC: Allocate and initialize internals
7+
PIC->PIC: Step State machine to DescribeStream
8+
PIC->CallbackProvider: DescribeStreamCallback
9+
CallbackProvider->Networking: Schedule a DescribeStream call
10+
note right of Networking: The call is handled by a Networking thread.
11+
Networking->CallbackProvider: Successfully scheduled
12+
CallbackProvider->PIC: Success
13+
PIC->Application: Success
14+
Networking->Networking: HTTP Call completed
15+
Networking->CallbackProvider: DescribeStream completed
16+
note left of CallbackProvider: The Networking has completed the call with a success or failure result.
17+
CallbackProvider->PIC: DescribeStreamResult
18+
PIC->PIC: Step the state machinery
19+
note right of PIC: On failure of the call re-try. On success, if the stream is missing call CreateStream
20+
PIC->CallbackProvider: CreateStreamCallback
21+
CallbackProvider->Networking: Schedule CreateStream call
22+
Networking->CallbackProvider: Success
23+
CallbackProvider->PIC: Success
24+
note right of PIC: The DescribeStreamResult Network thread returns.
25+
PIC->CallbackProvider: DescribeStreamResult Success
26+
CallbackProvider->Networking: Success, release thread
27+
Networking->Networking: HTTP Call completed
28+
Networking->CallbackProvider: CreateStream completed
29+
note left of CallbackProvider: The Networking has completed the call with a success or failure result.
30+
CallbackProvider->PIC: CreateStreamResult
31+
PIC->PIC: Step the state machinery
32+
note right of PIC: On failure of the call re-try. On success, move to Next state
33+
PIC->CallbackProvider: TagStreamCallback
34+
CallbackProvider->Networking: Schedule TagStream call
35+
Networking->CallbackProvider: Success
36+
CallbackProvider->PIC: Success
37+
note right of PIC: The CreateStreamResult Network thread returns.
38+
PIC->CallbackProvider: CreateStreamResult Success
39+
CallbackProvider->Networking: Success, release thread
40+
opt Iterating over the other states in a similar way
41+
PIC->CallbackProvider: Iterating over states/API calls
42+
CallbackProvider->Network:
43+
Network->CallbackProvider:
44+
CallbackProvider->PIC:
45+
end
46+
Networking->CallbackProvider: GetEndpointResult
47+
CallbackProvider->PIC: GetEndpointResult (success)
48+
state over PIC: STREAM_READY state
49+
PIC->CallbackProvider: StreamReady callback
50+
CallbackProvider->Application: Stream ready
51+
Application->Application: Returning when CreateStreamSync API is called
52+
option footer=bar

docs/Layering_and_Interfaces.png

14.1 KB
Loading

docs/Layering_and_Interfaces.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Layering of the Producer assets and interfaces
2+
3+
+---------------+-----------------------+
4+
| GStreamer | Android/Java client | <- MediaSource interfaces
5+
| c888 | c588 |
6+
+---------------+-----------------------+
7+
| C++ SDK | |
8+
+---------------+ JNI/Java adapter | <- Producer interfaces
9+
| C SDK | c555 |
10+
+---------------+-----------------------+
11+
| |
12+
| PIC | <- Core logic
13+
| c594 |
14+
+---------------------------------------+

docs/Realtime_and_Live.png

39.1 KB
Loading

docs/Realtime_e2e.png

19.5 KB
Loading

docs/Realtime_e2e.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
Device/Producer Service KVS Consumer Client
3+
4+
+-------------+-------------+--------------------+ +----------------+ +--------------------+-------------+-------------+
5+
| | | HTTP Client cFDA | | | | Parser cFDA | | |
6+
| Produced | Produced +--------------------+ +------> | KVS Realtime | +------> +------+------+------+ Consumed | Consumed |
7+
| Frame N + 1 | Frame N |Frame |Frame |Frame | <------+ | end-to-end | <------+ |Frame |Frame |Frame | Frame N - 1 | Frame N - 2 |
8+
| c888 | c888 | Bits | Bits | Bits | HTTP | c888 | HTTP | Bits | Bits | Bits | c888 | c888 |
9+
+-------------+-------------+------+------+------+ with +----------------+ with +------+------+------+-----+-------+-----+-------+
10+
endless endless | |
11+
payload payload | Call | Call
12+
Data flow | back | back
13+
:============> v v
14+
+-------+ +-------+
15+
| | | |
16+
| Frame | | Frame |
17+
| Func | | Func |
18+
| cFF9 | | cFF9 |
19+
+-------+ +-------+
13.8 KB
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Stream state machine states and transitions
2+
3+
4+
5+
6+
+----+ +----+ +----+ +----+ +----+ +----+
7+
| | | | | | | | | | | |
8+
| v | v | v | v | v | v
9+
+----+-----------+ +----+-----------+ +----+-----------+ +----+-----------+ +----+-----------+ +----+-----------+ +----------------+
10+
| | | | | | | | | | | | | |
11+
Create ===> | DescribeStream +----->+ TagStream +----->+ GetEndpoint +----->+ Ready +----->+ PutStream +----->+ Streaming +----->+ Stopped | ===> Free
12+
| c888 | | c888 | | c888 | | c888 | | c888 | | c888 | | c888 |
13+
+----------------+ +----+-----------+ +----+-----------+ +----------------+ +----+-----------+ +----+-----------+ +----+-----------+
14+
| ^ | ^ | ^ ^ | | |
15+
| | v | v | | v v |
16+
| +------------------------|-----------------------------------------------------------------------------------------------------------------+
17+
v |
18+
+------------------+ |
19+
| | |
20+
| CreateStream +---------------+
21+
| c888 |
22+
+----+-------------+
23+
| ^
24+
| |
25+
+-----+

0 commit comments

Comments
 (0)