1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32
33 34 35
36 import xdc.runtime.Types;
37 import xdc.runtime.Log;
38
39 /*!
40 * ======== ILoggerSnapshot ========
41 * Interface to service LogSnapshot events
42 *
43 * A loggerSnapshot is responsible for recording, transmitting, or otherwise
44 * handling `{@link LogSnapshot#EventDesc LogSnapshot Events}` generated by clients of the
45 * `{@link LogSnapshot}` module. The `LogSnapshot` module uses modules that implement the
46 * `ILoggerSnapshot` interface to record the log events. Most application code will
47 * use the `LogSnapshot` module instead of directly calling the specific `ILoggerSnapshot`
48 * module implementation.
49 *
50 * All loggerSnapshot implementations must inherit from this interface. The
51 * derived implementations must implement the functions defined in this
52 * interface but may also add additional configuration parameters and
53 * functions.
54 *
55 * Since this interface inherits {@link xdc.runtime.ILogger}, loggerSnapshots
56 * can also be used to support events logged by the `{@link Log}` module and other
57 * modules that log events based on the ILogger interface.
58 */
59 interface ILoggerSnapshot inherits IUIATransfer {
60
61 instance:
62 /*!
63 * ======== writeMemoryRange ========
64 * Log an event along with values from a range of memory addresses
65 *
66 * If the mask in the specified `LogSnapshot` event has any bit set which is
67 * also set in the current module's diagnostics mask, then this call to
68 * write will "raise" the given `LogSnapshot` event.
69 *
70 * Note that this API supports null terminated strings, arrays of characters and
71 * memory mapped registgers as well as blocks of memory. The LogSnapshot module provides macros that
72 * map the appropriate values to the writeMemoryRange API's arguments
73 *
74 * @param(evt) event to be logged
75 * @param(snapshotId) 0 = no other snapshot groups, Use value from
76 * LogSnapshot.getSnapshotId() for all snapshots to be grouped.
77 * @param(fileName) __FILE__ result
78 * @param(lineNum) __LINE__ result
79 * @param(fmt) a `printf` style format string
80 * @param(startAdrs) value for first format conversion character
81 * @param(lengthInMAUs) value for second format conversion character
82 *
83 * @see Log#Event
84 * @see Log#EventDesc
85 * @see Text#ropeText
86 * @see Types#getEventId
87 */
88 @DirectCall
89 Void writeMemoryRange(Log.Event evt, Types.ModuleId mid, UInt32 snapshotId,
90 IArg fileName, IArg LineNum, IArg fmt, IArg startAdrs,
91 UInt32 lengthInMAUs);
92 }