recorder register_breakpoint
API Reference Manual  /  7 Simulator-to-Simulator Interfaces  / 

recorder_v2

Description
The recorder_v2 interface is implemented by the recorder, and can be used by any object interacting with the outside world in order to make re-runs of the same simulation behave identically. This is a requirement for reverse execution to work. Objects using this interface must implement the recorded interface themselves.

An object uses it by calling the record method with itself and the data it wishes to record as parameters. The recorder will then save the data and call the input method in the recorded interface on the object.

The playback method returns whether the recorder is currently playing back recorded data. It may be used by the object to determine if output to the outside world should be dropped or not.

SIM_INTERFACE(recorder_v2) {
        void (*record)(conf_object_t *NOTNULL obj,
                       conf_object_t *NOTNULL sender, bytes_t data);
        bool (*playback)(conf_object_t *NOTNULL obj);
};
#define RECORDER_V2_INTERFACE "recorder_v2"

The recorded interface is implemented by objects that wish to use the recorder_v2 interface.

The input method is called with data that has been recorded. The playback parameter is set if the data came from a previous recording, and clear if the data came directly from a call to record in recorder_v2 with live data.

SIM_INTERFACE(recorded) {
        void (*input)(conf_object_t *NOTNULL obj, bytes_t data, bool playback);
};
#define RECORDED_INTERFACE "recorded"

Execution Context
Cell Context for all methods.

recorder register_breakpoint