.. _sardana-recorder-api: ============ Recorder API ============ Recorders are the Sardana plugins in charge of delivering scan data to its destinations, for example a file, the Spock output or a plot. This page is the reference of the recorder-writing API. For a step-by-step recipe on how to develop your own recorder see :ref:`sardana-writing-recorders`. Base classes ------------ Custom recorders are written by subclassing one of the base classes of the `sardana.macroserver.scan.recorder` package: .. currentmodule:: sardana.macroserver.scan.recorder .. autosummary:: DataRecorder BaseFileRecorder DataHandler * `DataRecorder` -- base class of all recorders. Implement its ``_startRecordList``, ``_writeRecord`` and ``_endRecordList`` methods to process scan data records. * `BaseFileRecorder` -- base class for recorders which write data to a file. File recorders are implicitly selected based on the extensions declared in their ``formats`` attribute (see :ref:`scanfile` and :ref:`scanrecorder`). * `DataHandler` -- the fan-out object which dispatches each scan record to all the active recorders. More specialized bases are also available in the same package: ``BaseNEXUS_FileRecorder`` and ``BaseNAPI_FileRecorder`` (defined in `sardana.macroserver.scan.recorder.storage`) for NeXus file recorders and ``BaseSharedMemoryRecorder`` (defined in `sardana.macroserver.scan.recorder.sharedmemory`) for shared memory recorders. Module documentation -------------------- The full autogenerated documentation of the recorder package is available at :doc:`api/sardana/macroserver/scan/recorder`.