home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Thomson (Residential)
/
TGSTPv7203.iso
/
mac
/
HIW
/
xml
/
mod_devicefinder_nogui.xml
< prev
next >
Wrap
Extensible Markup Language
|
2008-02-11
|
5KB
|
99 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fsm SYSTEM "fsm.dtd">
<!--
Devicefinder module without any user interface.
If only one device is found, default authentication is done using given username and password.
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.
- 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' or 'authenticationFailed'.
- deviceList: All found devices valid on all exits
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.
- foundMultipleDevices: Multiple devices where found (none are authenticated)
-->
<fsm>
<!-- Input properties and default values -->
<property key="timeout" function="5"/>
<property key="systemUserid" required="yes" />
<property key="systemPassword" required="yes" />
<!-- states -->
<states>
<!-- wait till null addresses disappear -->
<state type="waitNullAddresses" name="waitNullAddresses" weight="5">
<property key="timeout" value="30"/>
</state>
<!-- does the actual work -->
<state type="deviceFinder" name="actionDeviceFinder" weight="10"/>
<!-- in case of a single found device -->
<!-- refresh properties -->
<state type="actionAuthenticateDevice" name="refreshProperties"/>
<!-- authenticate with default username/password -->
<state type="actionAuthenticateDevice" name="authenticate"/>
</states>
<!-- This module has the following output events -->
<events>
<event name="foundMultipleDevices"/>
<event name="foundNoDevices"/>
<event name="foundDevice"/>
<event name="authenticationFailed"/>
</events>
<!-- transitions -->
<transitions>
<!-- wait till null addresses disappear -->
<transition startstate="waitNullAddresses"/>
<!-- go to search -->
<transition fromstate="waitNullAddresses" tostate="actionDeviceFinder" event="finished|timeout">
<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"/>
</transition>
<!-- single device found, refresh its properties -->
<transition fromstate="actionDeviceFinder" tostate="refreshProperties" event="foundSingleDevice">
<!-- output --><propertymap target="fsm.deviceList" function="$deviceList"/>
<propertymap target="device" function="element($deviceList, 0)"/>
</transition>
<!-- no devices found, exit -->
<transition fromstate="actionDeviceFinder" toexit="foundNoDevices" event="foundNoDevices"/>
<!-- multiple devices found, exit -->
<transition fromstate="actionDeviceFinder" toexit="foundMultipleDevices" event="foundMultipleDevices">
<!-- output -->
<propertymap target="fsm.deviceList" function="$deviceList"/>
</transition>
<!-- refreshing properties succeeded, no authentication needed -->
<transition fromstate="refreshProperties" toexit="foundDevice" event="finished">
<!-- output --><propertymap target="fsm.device" function="$device"/>
</transition>
<!-- authenticate with default username/password -->
<transition fromstate="refreshProperties" tostate="authenticate" event="failed|authenticationFailed">
<propertymap target="device" function="$device"/>
<propertymap target="systemUserid" function="$fsm.systemUserid"/>
<propertymap target="systemPassword" function="$fsm.systemPassword"/>
</transition>
<!-- authentication succeeded, exit -->
<transition fromstate="authenticate" toexit="foundDevice" event="finished">
<!-- output --><propertymap target="fsm.device" function="$device"/>
</transition>
<!-- authentication failed, exit -->
<transition fromstate="authenticate" toexit="authenticationFailed" event="failed|authenticationFailed">
<!-- output --><propertymap target="fsm.device" function="$device"/>
</transition>
</transitions>
</fsm>