Reading SZL lists

The CPUs of the 300 and 400 family provide lists of their internal states and properties. German Siemens terminology calls them SZL (System-ZustandsListen). These lists are what your programming Software reads when showing the diagnostic buffer, the state of run/stop, the amount of memory and much more. LIBNODAVE provides the function:
	daveReadSZL(daveConnection * dc, int ID, int index, void * buf);
to read these lists.
ID 0, index 0 retrieves a list of available SZL-IDs on your PLC. I don't know how to find out the available or meaningful indices. In most cases, index 0 is the whole list, while other indices retrieve parts of it.
Use testMPI -z for some examples and testMPI -a for the complete contents of your PLCs SZL-lists (with index 0, so there may exist lists that do not have an index 0).
Refer do Siemens documentation for the meaning of IDs and indices.