The class SDIF-BUFFER allows to gather SDIF objects and makes the connection with "real" SDIF files.
An SDIF-Buffer contains :
The SDIF-BUFFER and its contents can then be saved in a file using SAVE-SDIF-FILE.
SDIF data can also be written in a file using the File-Box tool.
This alternative avoids storing large sets of data in your OM patches and write generated SDIF data on-the-fly during an iterative process.
In order to write data in an SDIF file, the STREAMFILE pointer must be set to "SDIF" first.
The process must then start with a call to SDIF-WRITE-HEADER connected to this pointer (see picture above). SDIF-WRITE-HEADER will write type declarations and name/value tables in the file header, but also some other general data, so it must be called even if there is no type or NVT to write.
Use SDIF-WRITE-FRAME in the rest of your program in order to write the sequence of SDIF frames in the file.