Digi TX54 User Manual page 695

Hide thumbs Also See for TX54:
Table of Contents

Advertisement

Applications
d. Click Add.
e. Click OK.
3. Click Examples > SCI > Data Service > Send Request.
Code similar to the following will be displayed in the HTTP message body text box:
<sci_request version="1.0">
<data_service>
<targets>
<device id="00000000-00000000-0000FFFF-A83CF6A3"/>
</targets>
<requests>
<device_request target_name="myTarget">
</device_request>
</requests>
</data_service>
</sci_request>
Note
The value of the target_name parameter in the device_request element must
correspond to the target parameter of the device_request.register function in the Python
script. In this example, the two are the same.
4. Click Send.
Once that the request has been sent to the device, the handler on the device is executed.
On the device, you will receive the following output:
n
>>> received request
>>>
In Remote Manager, you will receive a response similar to the following:
n
<sci_reply version="1.0">
<data_service>
status="0">OK</device_request>
</data_service>
</sci_request>
Example: Use digidevice.cli with digidevice.device_request
In this example, we will use the digidevice.cli module in conjunction with the digidevice.device_
request module to return information about multiple devices to Remote Manager.
1. Create a Python application, called showsystem.py, that uses the digidevice.cli module to
create a response containing information about device and the device_request module to
respond with this information to a request from Remote Manager:
TX54 User Guide
my payload string
my payload string
for target myTarget
<device id="00000000-00000000-0000FFFF-A83CF6A3"/>
<requests>
<device_request target_name="myTarget"
</requests>
</device>
Digidevice module
695

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tx64

Table of Contents