Skip to content

Commit e9832db

Browse files
committed
Finalize documentation #5 and VIPM package #4
- The documentation is now final (Closes #5) - The VIPM package is now final (Closes #4)
1 parent fc68324 commit e9832db

File tree

6 files changed

+83
-19
lines changed

6 files changed

+83
-19
lines changed

README.md

Lines changed: 70 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,79 @@
11
# Iterator Actor
22

33
## Authors
4-
Andrea Vaccaro, Albert Adiyatullin
4+
Andrea Vaccaro, Albert Adiyatullin
5+
LS Instruments AG
56

67
# Description
78

8-
A library implementing a high-level Actor Framework-based Iterator. The caller Actor can configure the Iterator Actor to iteratively execute one of its methods by creating the corresponding Actor Framework.
9+
A library implementing a high-level Actor Framework-based Iterator. The caller Actor can configure the Iterator Actor to iteratively execute one of its methods by creating the corresponding Actor Framework messages.
910

1011
## Main Features
1112

12-
* Fully Actor Framework Based
13-
* Iterate at a certain time period
14-
* Waits on iteration completion
15-
* Prepare and Conclude iterations definable
16-
* Multiple iterator end condition definable: number of iterations, time elapsed,iteration result
13+
* Fully Actor Framework Based.
14+
* Iterate at a certain time period.
15+
* Waits on iteration completion and reports an error to caller if the corresponding timeout is exceeded.
16+
* Prepare and Conclude iterations definable.
17+
* Multiple iterator end condition definable: number of iterations, time elapsed, iteration result.
18+
19+
## Library Walk-Through
20+
21+
### Caller Actor Preparation
22+
Implement the methods that are going to be executed as Prepare, Iterate, Conclude iteration steps. Create the corresponding AF messages.
23+
24+
### Configure and Launch the Iterator
25+
26+
* Place an "Itearator NR Actor.lvclass" constant on the block diagram.
27+
* Place a "Iterator Settings.ctl" constant on the block diagram and type in the relevant desired settings. In this case, as shown in the picture, we wish to perform 100 iterations ("Active Stop Conditions.Number of Iterations" set to TRUE and "Number of Iterations" set to 100).
28+
* Bundle to the resulting cluster the messages created before to the fields "Prepare Msg", "Iterate Msg", "Conclude Msg".
29+
* Wire the "Itearator NR Actor.lvclass" constant to a property node and set the "Settings" property to the "Iterator Settings.ctl" cluster just prepared.
30+
* Launch the just configured "Itearator NR Actor.lvclass" actor by means of the "Launch Nested Actor.vi" AF method and store the Iterator enqueuer.
31+
32+
![](media/Confugure%20and%20Launch.png)
33+
34+
#### Alternative "Active Stop Condition" Configurations
35+
The "Active Stop Condition" cluster can be configured to trigger different stop conditions. The different conditions can be mixed. The other stop conditions are the following:
36+
##### Time Elapsed
37+
If we set the "Time Elapsed" Boolean flag to TRUE the Iterator will stop after the iteration time reaches a value specified by the "Time Before Stop (ms)" value in milliseconds.
38+
##### Iteration Result
39+
If we set the "Iteration Result" Boolean flag to TRUE we can stop the iteration internally by sending the Break message to the Iterator. If the flag is set to FALSE sending the Break message will have no effect.
40+
41+
If the user wants to know about which condition triggered the Iterator stop, he has to subcalss the abstract message "Iterator Report Iterations End Msg.lvclass" that is sent to the caller at the end of the iteration. The concrete implementation should be stored in the active "Iteration Settings.ctl" cluster as illustrated in the previous screenshot. Such message bears the "Stop Reason" enum which clarifies which condition triggered the Iterator stop and the possible iterator errors occurred during the iterator operation.
42+
43+
The "Stop Reason" possible values are the following:
44+
* Number of Iterations.
45+
* Elapsed Time.
46+
* Stop Internally: One of the iteration step execution sent the Break message to the Iterator and the "Iteration Result" stop condition was active.
47+
* Stopped Externally: the caller actor has sent the "Stop Iterations" message to the iterator. This "Stop Reason" is not subject to any stop condition being enabled.
48+
49+
### Errors Reported
50+
#### Errors Reported by the "Iterator Report Iterations End Msg.lvclass" Message
51+
* **code 7900**: Input parameters are not valid.
52+
* **code 7901**: Preparation call timed out.
53+
* **code 7902**: Iteration call timed out.
54+
* **code 7903**: Conclusion call timed out.
55+
56+
#### Errors Reported to the Caller's "Handle Error"
57+
* **code 7904**: Cannot break Iterators configured with "Auto Iteration Notification" OFF.
58+
* **code 7905**: Cannot break, Iterator not iterating.
59+
* **code 7906**: Cannot stop iterations, Iterator not iterating.
60+
* **code 7907**: Cannot start iterations, Iterator already iterating.
61+
62+
### Starting/Stopping Iterations
63+
To start the iterations send the "Start Iterasions Msg.lvclass" to the iterator:
64+
65+
![](media/Start%20Iterations.png)
66+
67+
To stop the iterations send the "Stop Iterasions Msg.lvclass" to the iterator:
68+
69+
![](media/Stop%20Iterations.png)
70+
71+
### Changing Iterator's Setting During its Execution
72+
To change the Iterator settings during its execution the user has to send the "Write Settings Msg.lvclass" to the iterator:
73+
74+
![](media/Change%20Settings.png)
75+
76+
Pay attenton that this will overwrite ***all*** the settings.
77+
### Stopping the Iterator
78+
Since the iterator is generally launched by means of the "Launch Nested Actor.vi" AF method with the Auto-Stop condition set to the default TRUE, the iterator will automatically stop when the caller actor stop. If for any particular reason one wants to explicitly stop the Iterator sending the stop message will do so.
79+

VIPM/Iterator Actor.vipb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2024-11-23 17:34:29" Modified_Date="2024-11-24 00:51:17" Creator="AndreaVaccaro(LSInst" Comments="" ID="05af24817068f2c01028a0bd1f22875c">
1+
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2024-11-23 17:34:29" Modified_Date="2024-11-24 16:59:10" Creator="AndreaVaccaro(LSInst" Comments="" ID="6c8f850186a102c3b4079389099c700a">
22
<Library_General_Settings>
33
<Package_File_Name>LS_Instruments_AG_lib_Iterator_Actor</Package_File_Name>
4-
<Library_Version>1.0.0.4</Library_Version>
4+
<Library_Version>1.0.0.6</Library_Version>
55
<Auto_Increment_Version>false</Auto_Increment_Version>
66
<Library_Source_Folder>..</Library_Source_Folder>
77
<Library_Output_Folder>.</Library_Output_Folder>
@@ -39,18 +39,19 @@
3939
<VI_Package_Configuration_File>Iterator Actor.vipc</VI_Package_Configuration_File>
4040
<Description>
4141
<One_Line_Description_Summary>A library implementing a high-level Actor Framework-based Iterator. </One_Line_Description_Summary>
42-
<Description>A library implementing a high-level Actor Framework-based Iterator. The caller Actor can configure the Iterator Actor to iteratively execute one of its methods by creating the corresponding Actor Framework.
42+
<Description>A library implementing a high-level Actor Framework-based Iterator. The caller Actor can configure the Iterator Actor to iteratively execute one of its methods by creating the corresponding Actor Framework messages.
4343

44-
Main Features
45-
- Fully Actor Framework Based
46-
- Iterate at a certain time period
47-
- Waits on iteration completion
48-
- Prepare and Conclude iterations definable
49-
- Multiple iterator end condition definable: number of iterations, time elapsed,iteration result</Description>
44+
&lt;b&gt; Main Features&lt;/b&gt;
45+
46+
- Fully Actor Framework Based
47+
- Iterate at a certain time period
48+
- Waits on iteration completion and reports an error to caller if the corresponding timeout is exceeded
49+
- Prepare and Conclude iterations definable
50+
- Multiple iterator end condition definable: number of iterations, time elapsed, iteration result</Description>
5051
<Copyright/>
5152
<Packager>Andrea Vaccaro</Packager>
5253
<URL>https://github.com/LS-Instruments/Iterator-Actor</URL>
53-
<Release_Notes/>
54+
<Release_Notes>First release. Visit https://github.com/LS-Instruments/Iterator-Actor to see about features and a library walk-through.</Release_Notes>
5455
</Description>
5556
<Destinations>
5657
<Toolkit_VIs>
@@ -345,7 +346,7 @@ Main Features
345346
<Path>..\Iterator Actor Palette\Open Examples.vi</Path>
346347
<VI_Title/>
347348
</Items_Data>
348-
<GUID>4517DAE6BB9C9D66884C9CD97423C935</GUID>
349+
<GUID>2F74B72F95BE8D418B9D3EA22178747A</GUID>
349350
</Functions_Palette_Data>
350351
<Controls_Palette_Data>
351352
<Parent_Palette_Index>-1</Parent_Palette_Index>
@@ -436,7 +437,7 @@ Main Features
436437
<Path>..\Iterator Actor Palette\Iterator Report Iterations End Msg.vi</Path>
437438
<VI_Title/>
438439
</Items_Data>
439-
<GUID>35721F85D3A5235F49550E4A37D4F90C</GUID>
440+
<GUID>9E6569A84EC2C2D55230F6D87833A327</GUID>
440441
</Controls_Palette_Data>
441442
</Library_Palette_Definition>
442443
</VI_Package_Builder_Settings>

media/Change Settings.png

106 KB
Loading

media/Confugure and Launch.png

121 KB
Loading

media/Start Iterations.png

2.34 KB
Loading

media/Stop Iterations.png

2.41 KB
Loading

0 commit comments

Comments
 (0)