probe_subscribe recorder_v2
API Reference Manual  /  7 Simulator-to-Simulator Interfaces  / 

recorder

Description
This interface is deprecated; please use the recorder_v2 instead.

To initiate recording, the object should call the attach method with the recorder, the object itself, and an input handler as parameters. This is done once, typically when the object instance is created.

When the object receives data from outside the simulator, it should call the input method with a dbuffer_t containing the raw data in unspecified form, along with an extra word of user data. The data parameter can be NULL if not needed.

The input_from_recorder function is called with input data to the object. When using live input, it is called with data given to input; when playing back, it is called with recorded data. An object should never use its input directly but only what it receives from input_from_recorder.

The playback function returns true if the recorder is currently playing back recorded data and false if not.

The dbuffer_t parameters retain their respective ownership. The input_from_recorder function must not modify the contents without cloning it first.

typedef void (*recorder_input_handler_t)(conf_object_t *obj, dbuffer_t *data,
                                         uint32 uint_data);

SIM_INTERFACE(recorder) {
        recorder_t *(*attach)(conf_object_t *rec, conf_object_t *obj,
                              recorder_input_handler_t input_from_recorder);
        void (*detach)(conf_object_t *rec, recorder_t *r);
        void (*input)(conf_object_t *rec, recorder_t *r,
                      dbuffer_t *data, uint32 uint_data);
        bool (*playback)(conf_object_t *rec);
};
#define RECORDER_INTERFACE "recorder"

Execution Context
Cell Context for all methods.

probe_subscribe recorder_v2