source: ION/trunk/Lirec/CompManagerRulesTest.xml @ 145

Revision 143, 1.9 KB checked in by michael.kriegel, 11 years ago (diff)
  • made loading of competencies and architecture components dynamic (not requiring code changes), instead they are specified in xml files now
  • added support for background competencies (competencies started automatically with the architecture and running all the time in the background, ideal for sensing competencies)
  • added classes for easy implementation of competencies that communicate with a remote program via tcp and an ExampleCompetency?
  • added LGPL preamble to all files
  • updated documentation to reflect all changes above
Line 
1<?xml version="1.0" ?>
2
3<CompetencyManagerRules>
4       
5
6        <!-- this is a set of rules for testing the competency execution system,
7         uses the test competencies in package lirec.level2.competencies.test -->
8
9
10        <!-- Rule 1: this plan should fail, as the only competency with test type 1
11                 always fails, it should also be chosen before rule 3 because it is more specific,
12                 provided that the action has one parameter with the value "test" -->
13
14        <Rule>
15               
16                <MindAction Name="TestAction">
17                                <Parameter No="1" Value="test" />
18                </MindAction>           
19               
20                <CompetencyExecutionPlan>
21                        <Competency ID="1" Type="TestType1">
22                        </Competency>
23                </CompetencyExecutionPlan>
24               
25        </Rule>
26
27        <!-- Rule 2: this plan should not be tried by competency manager, because although
28                it is more specific than plan 3, in our test case the parameter will not match -->
29
30        <Rule>
31               
32                <MindAction Name="TestAction">
33                                <Parameter No="1" Value="someValueThatWillNotMatch" />
34                </MindAction>           
35               
36                <CompetencyExecutionPlan>
37                        <Competency ID="1" Type="TestType4">
38                        </Competency>
39                </CompetencyExecutionPlan>
40               
41        </Rule>
42
43
44        <!-- Rule 3: this plan should be tried by competency manager after above fails -->
45
46        <Rule>
47                       
48                <MindAction Name="TestAction">
49                                <Parameter No="1" Value="*" />
50                </MindAction>           
51               
52                <CompetencyExecutionPlan>
53                        <Competency ID="1" Type="TestType2">
54                             <CompetencyParameter Name="RandomOutName" Value="$parameter1" />
55                        </Competency>
56
57                        <Competency ID="2" Type="TestType3" Dependency="1">
58                             <CompetencyParameter Name="RandomInName" Value="$parameter1" />
59                        </Competency>
60                </CompetencyExecutionPlan>
61               
62        </Rule>
63       
64        <!-- Rule 4: this is the rule for testing the second mind action,  -->
65
66        <Rule>
67                       
68                <MindAction Name="TestAction2">
69                </MindAction>           
70               
71                <CompetencyExecutionPlan>
72                        <Competency ID="1" Type="TestType4">
73                        </Competency>
74                </CompetencyExecutionPlan>
75               
76        </Rule>
77
78
79
80</CompetencyManagerRules>
Note: See TracBrowser for help on using the repository browser.