| Both sides previous revisionPrevious revisionNext revision | Previous revision | 
| giraffplus:context-recognition [2013-11-20 14:52]  –  jonas | giraffplus:context-recognition [2013-11-20 14:55] (current)  –  jonas | 
|---|
|   | ====== Context Recognition API ====== | 
|   | ... | 
|   |  | 
| ====== XML Format ====== | ====== XML Format ====== | 
 |  | 
| ''%%<?xml version='1.0' encoding='UTF-8' ?>%%''  | ===== Sample rule for test site SE2 =====  | 
| ''%%<rules xsi:noNamespaceSchemaLocation='rule_schema.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>%%'' | <code>  | 
|   | <?xml version='1.0' encoding='UTF-8' ?>  | 
|   | <rules xsi:noNamespaceSchemaLocation='rule_schema.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>  | 
|   |   | 
|   | <preproc name='TunstallTrueFalse' in='Bed - Bedroom @ testsite_se_2' out='_in_bed' args=''/>  | 
|   | <preproc name='TunstallPIRSimple' in='PIR - TV Room @ testsite_se_2' out='_motion_bed' args=''/>  | 
|   | <preproc name='TunstallTrueFalse' in='TV - TV Room @ testsite_se_2' out='_tv_on' args=''/>  | 
|   | <preproc name='TunstallPIRSimple' in='PIR - TV Room @ testsite_se_2' out='_in_tv_room' args=''/>  | 
|   |   | 
|   | <rule out="_watching_tv">  | 
|   | 	<constraint from="_watching_tv" type="during" args="" to="_tv_on" />  | 
|   | 	<constraint from="_watching_tv" type="during" args="" to="_in_tv_room" />  | 
|   | </rule> | 
 |  | 
| ''%%<preproc name='TunstallTrueFalse' in='Bed - Bedroom @ testsite_se_2' out='_in_bed' args=''/>%%''  | <extractor name='max' in='_in_bed' out='in_bed' />  | 
| ''%%<preproc name='TunstallPIRSimple' in='PIR - TV Room @ testsite_se_2' out='_motion_bed' args=''/>%%''  | <extractor name='max' in='_motion_bed' out='motion_bed' />  | 
| ''%%<preproc name='TunstallTrueFalse' in='TV - TV Room @ testsite_se_2' out='_tv_on' args=''/>%%''  | <extractor name='max' in='_tv_on' out='tv_on' />  | 
| ''%%<preproc name='TunstallPIRSimple' in='PIR - TV Room @ testsite_se_2' out='_in_tv_room' args=''/>%%'' | <extractor name='max' in='_watching_tv' out='watching_tv' /> | 
 |  | 
| ''%%<rule out="_watching_tv">%%''  | </rules>  | 
| ''%%	<constraint from="_watching_tv" type="during" args="" to="_tv_on" />%%''  | </code> | 
| ''%%	<constraint from="_watching_tv" type="during" args="" to="_in_tv_room" />%%''  |  | 
| ''%%</rule>%%'' |  | 
 |  | 
| ''%%<extractor name='max' in='_in_bed' out='in_bed' />%%'' |   | 
| ''%%<extractor name='max' in='_motion_bed' out='motion_bed' />%%'' |   | 
| ''%%<extractor name='max' in='_tv_on' out='tv_on' />%%'' |   | 
| ''%%<extractor name='max' in='_watching_tv' out='watching_tv' />%%'' |   | 
| ''%%</rules>%%'' |   |