~aleteoryx/muditaos

ref: 71fa4c5578eb2ea57899e63c3aa5c42461502483 muditaos/module-cellular/modem/doc/scripts/atstream.pu -rw-r--r-- 730 bytes
71fa4c55 — Paweł Joński [BH-721] Fix and add new rrule generator methods 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@startuml

start


:pass data to ATStream via write;

if (isReady) then 
	:return error (could be call reset, to get new data);
	Stop;
endif

:add new data to buffer;


    if (AT Return at the begin) then (yes)	
		:Set "Return at the begin" flag;
		if (Expected line count= 0) then (yes)
		:(isReady=true);
			Stop;
		endif
	else (no)
	endif
	
	:Count lines from last position;
	
    if ("Return at the begin" flag is set) then (yes)
	   if (More lines then expected) then (yes)
	   :(isReady=true);
		Stop;
	   endif
	else (no)
	 if (AT Return at the end) then (yes)
		:(isReady=true);
		Stop;
	 endif
	endif
	
	:Stream still wait for data (isReady=false);
	Stop;
	







@enduml