Main Page/Research/MSB/MyExperience.xml

From phurvitz
< Main Page‎ | Research‎ | MSB
Revision as of 00:38, 18 September 2007 by Phil Hurvitz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Editing the MyExperience.xml file

The MyExperience.xml file (\storage card\myexperience\MyExperience.xml) can be altered to include the subject ID in the SMS header and in the message body. See the section near "Survey Results" as an example where I've added PMH02.

<?xml version="1.0"?>


<myexperience name="CarlTest" version="1.0">

  <actions>
    <action name="SimpleSurvey" type="Survey">
      <property name="EntryQuestionId">WhatActivity</property>
      <property name="TimeOutInterval">00:05:00</property>
      <property name="TimeOutText">
        Hello? We haven't heard from you in a while and it looks like you may have gotten interrupted before finishing your last survey. Please press any key to continue the survey before the time below expires.
      </property>
    </action>

    <action name="SurveyNotification" type="Notification">
      <property name="Title">Survey Prompt</property>
      <property name="Text">
        Please click the OK button to take this survey.\n\nThis form will auto-snooze in 30 seconds.
      </property>
      <property name="ReminderCount">2</property>
    </action>

    <action name="getimoteinfo" type="Carl">
      <!--property name="Message">chartung@cs.washington.edu This is your friendly SMS message</property>
      <property name="PhoneNumber">500</property>
      <property name="PhoneNumber">chartung@cs.washington.edu</property> -->
    </action>

    <action name="SmsAction" type="SendSms2">
      <property name="Message">msb@gis.washington.edu#[Survey Results PMH02]# pmh02,</property>
      <property name="PhoneNumber">500</property>
    </action>

    <action name="Messageme" type="Message">
      <property name="Text">this is my test message</property>
    </action>
  </actions>

  <sensors>
    <sensor name="ManualSensor" type="ManualSensor"></sensor>
    <sensor name="SurveyFinishedSensor" type="SurveyCompletionSensor"></sensor>
    <sensor name="MyTimeSensor" type="TimeSensor">
      <property name="Resolution">Minute</property>
    </sensor>
  </sensors>

  <triggers>
    <trigger name="ManualTrigger" type="Trigger">
      <script>
        manualSensor = GetSensor("ManualSensor");
        <!--if(manualSensor.State = true)
        {
        Execute("getimoteinfo");
        Execute("SmsAction");
        } -->
      </script>
    </trigger>

    <trigger name="HourlyTrigger" type="Trigger">
      <script>
        <!--goes off every minute-->
        hourlytrigger = GetSensor("MyTimeSensor");
        currentMin = GetCurrentDateTime().Minute;
        if (currentMin = 25)
        {
        Execute("SurveyNotification", "SimpleSurvey");
        }
      </script>
    </trigger>

    <trigger name="FinishedSurvey" type="Trigger">
      <script>
        fss = GetSensor("SurveyFinishedSensor");
        if(fss.State = true){
        Execute("getimoteinfo");
        Execute("SmsAction");
        }
      </script>
    </trigger>
  </triggers>
  
  <questions>
    <question id="WhatActivity" text="What activity are you doing now?">
      <property name="NextQuestionId">HowLong</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>Bicycling</option>
          <option>Driving</option>
          <option>Running</option>
          <option>Sitting</option>
          <option>Standing</option>
          <option>Walking</option>
          <option>Working Out</option>
          <option>Work</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
    </question>

    <question id="HowLong" text="How long have you been doing this?">
      <property name="NextQuestionId">LocationType</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>0 - 5 minutes</option>
          <option>6 - 15 minutes</option>
          <option>16 - 30 minutes</option>
          <option>31 - 45 minutes</option>
          <option>46 - 60 minutes</option>
          <option>1 - 2 hours</option>
          <option>2 - 4 hours</option>
          <option>Over 4 hours</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
    </question>

    <question id="LocationType" text="What type of location are you in?">
      <property name="NextQuestionId">CurrentActivity</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>Home or Dorm</option>
          <option>Outside (trail or park)</option>
          <option>Outside (city street)</option>
          <option>Outside (campus)</option>
          <option>Office</option>
          <option>Class</option>
          <option>Car</option>
          <option>Bus</option>
          <option>Restaurant/Cafe/Bar/Tavern</option>
          <option>Store</option>
          <option>Library</option>
          <option>Campus Building</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
    </question>

    <question id="CurrentActivity" text="Is your current activity for...">
      <!--<property name="NextQuestionId">TravelingPurpose</property>-->
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>traveling from one place to another</option>
          <option>work outside the home</option>
          <option>work inside the home</option>
          <option>caring for children</option>
          <option>school</option>
          <option>dining/drinks/coffee</option>
          <option>shopping or errands</option>
          <option>housework or chores</option>
          <option>recreation or leisure</option>
          <option>exercise</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
      <script>
        responsea = GetCurrentResponse("CurrentActivity");
        if (responsea = "traveling from one place to another")
        {
        Goto("TravelingPurpose");
        }
        else
        {
        Goto("Thank you");
        }
      </script>
    </question>

    <!--<question id="Traveling" text="Are you traveling at this time?">
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>yes</option>
          <option>no</option>
        </options>
      </response>
      <script>
        response = GetCurrentResponse("Traveling");
        if (response = "yes")
        {
          Goto("TravelingPurpose");
        }
        else
        {
          Goto("Thank you");
        }
      </script>

    </question>-->


    <question id="TravelingPurpose" text="Is the trip purpose to...">
      <property name="NextQuestionId">TravelingStart</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>commute to/from work</option>
          <option>commute to/from school</option>
          <option>taking child to/from school, daycare, lesson, practice, etc.</option>
          <option>visit friends or family</option>
          <option>errand</option>
          <option>health care appointment</option>
          <option>shopping</option>
          <option>dining/lunch/coffee</option>
          <option>recreation</option>
          <option>pick up/drop off someone</option>
          <option>going to another travel mode</option>
          <option>going home</option>
          <option>exercise</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
    </question>

    <question id="TravelingStart" text="Where did the trip originally start?">
      <property name="NextQuestionId">TravelingEnd</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>home</option>
          <option>work</option>
          <option>school</option>
          <option>friend/family's house</option>
          <option>store</option>
          <option>restaurant/pub/cafe</option>
          <option>child's daycare/school</option>
          <option>health care appointment</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
    </question>

    <question id="TravelingEnd" text="What is the final destination?">
      <property name="NextQuestionId">Chaining</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>home</option>
          <option>work</option>
          <option>school</option>
          <option>friend/family's house</option>
          <option>store</option>
          <option>restaurant/pub/cafe</option>
          <option>child's daycare/school</option>
          <option>health care appointment</option>
          <option>**Skip this Question-> **</option>
        </options>
      </response>
    </question>

    <question id="Chaining" text="Is this a chaining trip?">
      <property name="NextQuestionId">Thank You</property>
      <response widget="TextBoxFilteredList">
        <options>
          <option>*** Skip this Question-> ***</option>
          <option>yes</option>
          <option>no</option>
        </options>
      </response>
    </question>

    <!-- THANK YOU: TERMINATING SCREEN-->
    <question id="Thank you" text="Thank you for adding your activity!  Please press Next-> to finish survey.">
      <response widget="EmptyWidget"/>
    </question>

  </questions>

</myexperience>