home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Thomson (Residential)
/
TGSTPv7203.iso
/
mac
/
HIW
/
xml
/
mod_devicefinder.xml
< prev
next >
Wrap
Extensible Markup Language
|
2008-02-11
|
8KB
|
155 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fsm SYSTEM "fsm.dtd">
<!--
Devicefinder module. Shows a progress page and searches for devices.
If more than one device is found, the select device page is shown.
Authentication of the device is handled.
The found devices are associated with their respective adaptormanager,
if not connected through ethernet.
Input properties:
- timeout: time in seconds to look for devices. Default 5.
- serialFilter: Regexp to filter search on serial number. Default '*'
- nameFilter: Regexp to filter search on device name. Default '*'
- interfaceFilter: Interface object to limit search to. Default none.
- adaptorManagerList: List of loaded adaptormanagers. Default empty.
- authenticationMode: [user|isp] Method of device authentication. (required)
'user': The user will be prompted for a password if the device is
password protected.
'isp' : The given username and password are used for authentication,
no user interaction will occur.
- systemUserid: Username for isp authentication.
- systemPassword: Password for isp authentication.
Output properties:
- device: The device that was found/selected, fully authenticated. Only
valid on exit 'foundDevice'.
Exit events:
- foundDevice: A device was found and authenticated.
- foundNoDevices: No devices that matched the filters were found.
- authenticationFailed: The found device could not be authenticated.
Modules referred:
- mod_selectdevice.xml
- mod_devicefinder_nogui.xml
-->
<fsm>
<property key="authenticationMode" required="yes"/>
<property key="systemUserid" required="yes" />
<property key="systemPassword" required="yes" />
<states>
<state type="pageFsm" name="searchDevices">
<!-- This module accepts the following input properties -->
<property key="authenticationMode" required="yes"/>
<property key="autoContinue" value="yes"/>
<property key="autoContinueTime" value="0"/>
<property key="systemUserid" required="yes" />
<property key="systemPassword" required="yes" />
<!-- states -->
<states>
<!-- shows the page -->
<state type="showMoviePage" name="showPageSearchDevices">
<property key="registerPage" value="1"/>
<property key="sweep" value="1"/>
<property key="title" value="tr(Device Check)"/>
<property key="subTitle" value="tr(Please wait, the wizard is checking your Thomson Gateway.)"/>
<property key="info" value="tr(Checking your Thomson Gateway)"/>
<property key="extraInfo" value="tr(Please wait, this can take a few minutes.)"/>
<property key="movieFile" value="Images/devicecheck.mng"/>
</state>
<!-- does the actual work -->
<state file="mod_devicefinder_nogui.xml" name="devicefinder" weight="20"/>
<!-- authenticate with user provided username/password -->
<state type="deviceAuthHandler" name="deviceAuthHandler"/>
</states>
<!-- This module has the following output events -->
<events>
<event name="foundMultipleDevices"/>
<event name="foundNoDevices"/>
<event name="foundDevice"/>
<event name="authenticationFailed"/>
</events>
<!-- transitions -->
<transitions>
<transition startstate="showPageSearchDevices"/>
<!-- go to search -->
<transition fromstate="showPageSearchDevices" tostate="devicefinder" event="continue">
<propertymap target="timeout" function="$fsm.timeout"/>
<propertymap target="nameFilter" function="$fsm.nameFilter"/>
<propertymap target="serialFilter" function="$fsm.serialFilter"/>
<propertymap target="adaptorManagerList" function="$fsm.adaptorManagerList"/>
<propertymap target="interfaceFilter" function="$fsm.interfaceFilter"/>
<propertymap target="systemUserid" function="$fsm.systemUserid"/>
<propertymap target="systemPassword" function="$fsm.systemPassword"/>
</transition>
<!-- single device found, and authenticated, exit -->
<transition fromstate="devicefinder" toexit="foundDevice" event="foundDevice">
<!-- output --><propertymap target="fsm.device" function="$device"/>
<!-- output --><propertymap target="fsm.deviceList" function="$deviceList"/>
</transition>
<!-- multiple devices found, exit -->
<transition fromstate="devicefinder" toexit="foundMultipleDevices" event="foundMultipleDevices">
<!-- output --><propertymap target="fsm.deviceList" function="$deviceList"/>
</transition>
<!-- no devices found, exit -->
<transition fromstate="devicefinder" toexit="foundNoDevices" event="foundNoDevices"/>
<!-- single found, but not authenticated, authenticate with user provided username/password -->
<transition fromstate="devicefinder" tostate="deviceAuthHandler" event="authenticationFailed">
<!-- output --><propertymap target="fsm.deviceList" function="$deviceList"/>
<!-- output --><propertymap target="fsm.device" function="$device"/>
<propertymap target="device" function="$device"/>
<propertymap target="authenticationMode" function="$fsm.authenticationMode"/>
<propertymap target="systemUserid" function="$fsm.systemUserid"/>
<propertymap target="systemPassword" function="$fsm.systemPassword"/>
</transition>
<!-- authentication succeeded, exit-->
<transition fromstate="deviceAuthHandler" toexit="foundDevice" event="authenticated">
<!-- output --><propertymap target="fsm.device" function="$device"/>
</transition>
<!-- authentication failed or canceled by user-->
<transition fromstate="deviceAuthHandler" toexit="authenticationFailed" event="authenticationFailed|canceled"/>
</transitions>
</state><!-- searchDevices -->
<!-- in case of multiple found devices, show page to select -->
<state file="mod_selectdevice.xml" name="pageSelectDevice"/>
</states>
<events>
<event name="foundNoDevices"/>
<event name="foundDevice"/>
<event name="authenticationFailed"/>
</events>
<!-- transitions -->
<transitions>
<transition startstate="searchDevices">
<propertymap target="authenticationMode" function="$fsm.authenticationMode"/>
<propertymap target="systemUserid" function="$fsm.systemUserid"/>
<propertymap target="systemPassword" function="$fsm.systemPassword"/>
<propertymap target="timeout" function="$fsm.timeout"/>
<propertymap target="nameFilter" function="$fsm.nameFilter"/>
<propertymap target="serialFilter" function="$fsm.serialFilter"/>
<propertymap target="adaptorManagerList" function="$fsm.adaptorManagerList"/>
</transition>
<transition fromstate="searchDevices" toexit="foundDevice" event="foundDevice">
<!-- output --><propertymap target="fsm.device" function="$device"/>
</transition>
<transition fromstate="searchDevices" toexit="foundNoDevices" event="foundNoDevices"/>
<transition fromstate="searchDevices" toexit="authenticationFailed" event="authenticationFailed"/>
<!-- select a device -->
<transition fromstate="searchDevices" tostate="pageSelectDevice" event="foundMultipleDevices">
<propertymap target="deviceList" function="$deviceList"/>
<propertymap target="authenticationMode" function="$fsm.authenticationMode"/>
<propertymap target="systemUserid" function="$fsm.systemUserid"/>
<propertymap target="systemPassword" function="$fsm.systemPassword"/>
</transition>
<transition fromstate="pageSelectDevice" toexit="foundDevice" event="finished">
<!-- output --><propertymap target="fsm.device" function="$selectedDevice"/>
</transition>
<transition fromstate="pageSelectDevice" toexit="authenticationFailed" event="authenticationFailed"/>
</transitions>
</fsm>