/// <summary> /// This method is a helper function to quickly create dynamic stream /// descriptions needed to register a new dynamic stream. The /// descriptions contains information about the stream's name, layout, /// and operations. This method uses the supplied type information. /// </summary> /// <param name="name">A friendly name of the new stream (e.g., /// "Filtered memory accesses").</param> /// <param name="userData">Pointer to a valid StreamTypeDescriptor /// structure, defining the desired type of the new stream.</param> /// <param name="type">A pointer to optional user-defined data that /// should be available when the stream is opened. The data /// must not be freed for the lifetime of the stream.</param> /// <param name="operations">Pointer to a set of operations that /// implement the logic of the dynamic stream.</param> /// <param name="descOut">Pointer to a DynamicStreamDescriptor /// structure that will</param> /// <returns>true if successful, false otherwise. For a more detailed /// error description call StGetLastError().</returns> public static bool StMakeStreamDescriptorDynamicFromType(string name, IntPtr userData, ref StreamTypeDescriptor type, ref DynamicStreamOperations operations, out DynamicStreamDescriptor descOut) { return(NativeMethods.StMakeStreamDescriptorDynamicFromType(name, userData, ref type, ref operations, out descOut)); }
/// <summary> /// This method is a helper function to quickly create dynamic stream /// descriptions needed to register a new dynamic stream. The /// descriptions contains information about the stream's name, layout, /// and operations. /// </summary> /// <param name="name">A friendly name of the new stream (e.g., /// "Filtered memory accesses").</param> /// <param name="entrySize">The size of a single trace entry in bytes. /// Variable-sized entries are not supported.</param> /// <param name="flags">Supplies the flags used for the type of the /// new stream.</param> /// <param name="userData">A pointer to optional user-defined data that /// should be available when the stream is opened. The data must /// not be freed for the lifetime of the stream.</param> /// <param name="operations">Pointer to a set of operations that /// implement the logic of the dynamic stream.</param> /// <param name="descOut">Pointer to a DynamicStreamDescriptor /// structure that will receive the new stream information.</param> /// <returns>true if successful, false otherwise. For a more /// detailed error description call StGetLastError().</returns> public static bool StMakeStreamDescriptorDynamic(string name, uint entrySize, StreamTypeFlags flags, IntPtr userData, ref DynamicStreamOperations operations, out DynamicStreamDescriptor descOut) { return(NativeMethods.StMakeStreamDescriptorDynamic(name, entrySize, flags, userData, ref operations, out descOut)); }
/// <summary> /// Streams are the basic interface to work with data in Simutrace. /// Dynamic streams differ from regular streams in that entries are /// created dynamically by user-defined handler functions. This way /// multiplexers, filters, etc. can be realized. A filter, for example, /// may connect to a regular static stream and pass only those entries /// that meet certain criteria. Accessing the resulting dynamic stream /// does not differ from regular streams. Dynamic streams therefore may /// be used as input for other dynamic streams, building a cascade of /// stream processors. /// </summary> /// <param name="session">The id of the session, whose store should /// register the stream.</param> /// <param name="desc">Pointer to a dynamic stream descriptor defining /// the properties of the new dynamic stream (e.g., the desired /// type of data entries). To create a dynamic descriptor see /// StMakeStreamDescriptorDynamic() or /// StMakeStreamDescriptorDynamicFromType().</param> /// <returns>The id of the new dynamic stream if successful, /// INVALID_STREAM_ID otherwise. For a more detailed error /// description call StGetLastError().</returns> public static uint StStreamRegisterDynamic(uint session, ref DynamicStreamDescriptor desc) { return(NativeMethods.StStreamRegisterDynamic(session, ref desc)); }
public static extern uint StStreamRegisterDynamic(uint session, ref DynamicStreamDescriptor desc);
public static extern bool StMakeStreamDescriptorDynamicFromType( string name, IntPtr userData, ref StreamTypeDescriptor type, ref DynamicStreamOperations operations, out DynamicStreamDescriptor descOut);
public static extern bool StMakeStreamDescriptorDynamic(string name, uint entrySize, StreamTypeFlags flags, IntPtr userData, ref DynamicStreamOperations operations, out DynamicStreamDescriptor descOut);