GseosRecorder
Previous  Top  Next

The GseosRecorder module exposes the Python interface to the GSEOS Recorder functionality.
The status of the Recorder module can be queried with IsRecording() and IsPlayingBack(). Use StartRecording() and StopRecording() to start and stop the Recorder respectively.

To modify the blocks to be recorded or to be played back you can use the following functions:
AddRecordBlock(), RemoveRecordBlock(), AddPlaybackBlock(), and RemovePlaybackBlock(). GetRecordBlocks() and GetPlaybackBlocks() return lists with the blocks currently on the record/playback list.

To access and change the file prefix and the Recorder data path you can use GetPrefix(), SetPrefix(), and GetDataPath(), and SetDataPath(). The SetPrefix() and SetDataPath() functions will also write the new value to the gseos.ini file so it will be preserved across invocations of the software.

Getting status information on playback data
In order to get status information about played back data blocks you can refer to the RecBlockStatus block. If you select this block in the playback list it will be generated for every played back block (except the RecBlockStatus block itself, of course).
The RecBlockStatus block should be defined in the system.blk file, if you don't have this block defined the mechanism to get status information on recorded data is disabled.

The RecBlockStatus is not a block that is recorded but a block that gets generated for every played back block and contains meta-data for that block. The time field contained in the RecBlockStatus block indicates the time the block was recorded and can be decoded with the Python time.localtime() function. It denotes the number of seconds since Jan, 1 1970. The Name item holds the name of the block that was played back. If you write a script to evaluate the RecBlockStatus block you can either use the name or the Handle item. The handle item will result in the same number for every block as long as the block definition is the same. So you should cache the handle and map the proper name to the handle the first time you encounter a new handle. From that point on you can use the handle instead of the block name which should make for faster processing. Keep in mind that the association between block name and handle can be different for every run of GSEOS.