EasyManua.ls Logo

Siemens SIMATIC S7 - Serialization; Transferring a Collection To;From an External Data File; Writetostream Method

Siemens SIMATIC S7
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SIMATIC Automation Tool API for .NET framework
6.6 The IProfinetDeviceCollection class
SIMATIC Automation Tool V2.1 user guide
82 Manual, V2.1.1 07/2016, A5E33042676-AC
6.6.4
Serialization
6.6.4.1
Transferring a collection to/from an external data file
The following methods are provided to enable serializing and transfer of a collection's
contents to/from an external data file. These methods are used by the SIMATIC Automation
Tool application to support user project files.
6.6.4.2
WriteToStream method
Return type
Method name
Result
WriteToStream
Parameters
Name
Data type
Parameter type
Description
stream
Stream
In
The destination for serialized output of the
collection.
This method is used to externally store the contents of the collection. The following example
shows the usage of this method:
retVal = myNetwork.ScanNetworkDevices(out scannedDevices);
if (!retVal.Succeeded)
return;
FileStream f = File.Create("myDataFile.SAT");
retVal = scannedDevices.WriteToStream(f);
f.Close();
This method internally serializes version information, to support forward compatibility of
saved data.
Note
No SIMATIC Automation Tool API classes provide storage for user
-entered passwords.
Therefore, when the contents of the
IProfinetDeviceCollection are serialized to a data file,
no password information will be included in this serialization.

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals