flux trace

flux trace is an open source trace format for large scale multi-core projects. The project contains emitter sources in C-language and reference parse routines (java).

flux requirement: impulse version >= 1.8

Multi-core

Multi-core

flux is designed for large scale multi-core architectures.
  • Easily combine outputs from multiple cores
  • Synchronize multiple domains
  • Hierarchical scopes to organize all cores/traces
Scalable Compression

Scalable Compression

flux is a dense binary format. Optionally you can use compression to additionally pack the signal data.
  • Uses LZ4 and FastLz compression (optionally)
  • Scalable speed and compression
Multiple Domains

Multiple Domains

You may define your signals based on non-time domains like frequency, index, voltage, ....
  • Time and non-time domains
  • Multiple domains in one trace
Extendable Signal Types

Extendable Signal Types

flux supports events, text, binary, numerical and structured data types.
  • Event, Logic
  • Integer, Float
  • Text, Binary
  • User structures and Arrays
  • Assign custom descriptors
Custom Buffers

Custom Buffers

Buffers define how to keep and handle trace data within your core. You may use existing buffer types (ring-buffer, steam-buffer) or define your own.
  • Stream buffer
  • Ring buffer (latest data)
  • Integrate own buffer types
Embedded/External Signal Definition

Embedded/External Signal Definition

You may embed signal definitions in flux traces or keep them separate.
  • Embed signal definitions to store all information in one file
  • Keep signal definitions external to reduce footprint.
Open/Free sources

Open/Free sources

flux is an open source project (EPL). You may use it in any commercial/non-commercial application free of charge.
  • Project under Eclipse Public License
  • Commercial usage not restricted
  • 3rd party sources
    • LZ4: BSD 2-Clause License
    • FastLZ: open source (see header)
Low Footprint

Low Footprint

Integrate flux by adding one single file (without LZ4)
  • Small footprint (xxkb)
  • Core code without dependencies to c-lib or other external libraries

Analog and digital signals

Structured data (e.g. xy, statistical data)

Hierarchical Logs

Domain specific data and derived formats

Using flux

  • Introduction

    When you are working with flux, you will be faced with the following terms. Here's a short introduction:

    Buffers

    Buffers are used to store, organize and handle the trace data. You may create multiple buffers of different type. Each trace needs to be connected to one buffer. 

    Handler
    Buffers may have handlers. In the first examples, we are using the flxWriteToFile handler. This handler writes the content to a file as soon there is not enough buffer space available or when calling the flush method. You may define your own handler (e.g. write the trace output to a custom interface).
    Traces

    A trace combines a set of signals and scopes (hierarchy of items). You may create multiple traces. Each trace is identified by an integer value.
    The output of multiple traces can be easily combined (e.g. the output from multiple cores).

    Items 

    Items can be signals or scopes. Each item has an integer itemId and a parentId. the parentId points to any scope item. The root scope item has the id=0.

    Entry

    Entries are binary representation (chunks of bytes) of item definitions or value changes, compiled by the flux methods and sent to the trace buffers and output. Each entry is identified by a tag and followed by a tag specific structure. 

    flux geometry - maxItemId and maxEntrySize
    • maxItemId defines the largest id used for an item. This parameter is used on emitter and receiver side to set-up required structures.
    • maxEntrySize defines the maximum allowed size of an entry. On receiver and emitter side, this parameter is used  to prepare the buffers (each entry should fit completely into a buffer).

    Steps to create a trace

    • Prepare the memory
    • Create buffers and trace object
    • Adding items (signals and scopes) - optional
    • Open a trace sequence (e.g start at 10ms)
      • Write head
      • Write legend data (enumeration and member information) - optional
      • Iterate over domain (e.g. 10-20ms)
        • Write samples
    • Close the sequence (e.g end at 20ms)
    • You may open/close additional sequences ...

    Adding items and writing legend data are optional steps. If you have this information already on receiver-side, there is no need to send. Get to the next chapter (Hello flux) to see a first example.

    How to get flux sources

    All flux source and all examples are available in the impulse extension toolkit. Install the toolkit together with impulse and import the plug-in as a source project into your workspace.

  • Hello flux (examples 1-4)

    example1

    Hello flux

    Example 1 creates the simple uncompressed trace and writes it into a file.

    Preparing the memory

    The first step in setting up a flux trace is calculating the required memory. The core of flux does not use any c-library methods. The required memories for buffers and tables need to be passed as arguments to the flxCreateXXXXBuffer and flxCreateTrace methods. In this example (and most others) we use the macros FLX_BUFFER_BYTES and FLX_TRACE_BYTES to calculate the memory size for buffer and trace and define static memory chunks.

    Createing buffers and trace objects

    In this example,  we use a simple flat buffer, created by the method flxCreateFixedBuffer. The third and fourth arguments are the 'write to file' handler and the file object. For the trace creation we need the following arguments:

    • the traceId,
    • the max itemId,
    • the maxEntrySize value,
    • the trace object memory and size (this is for trace handling, not for the trace data itself)
    • and the initial buffer (may be changed later) to store the trace data. 
    #define MAX_ITEM_ID 2 // maximum id of scope/signal
    #define MAX_ENTRY_SIZE 4096
    
    	// output file
    	FILE *out = fopen("flux.example.recTr", "wb");
    
    	// calculate required memory for trace and buffers
    	unsigned bufferSize = FLX_BUFFER_BYTES(MAX_ENTRY_SIZE);
    	unsigned traceSize = FLX_TRACE_BYTES(0, MAX_ITEM_ID);
    
    	// static memory
    	unsigned char memoryBuffer[bufferSize];
    	unsigned char memoryTrace[traceSize];
    
    	// buffer
    	flxBuffer buffer = flxCreateFixedBuffer(memoryBuffer, bufferSize,
    			flxWriteToFile, out);
    
    	// trace
    	flxTrace trace = flxCreateTrace(0, MAX_ITEM_ID, MAX_ENTRY_SIZE, memoryTrace,
    			traceSize, buffer);
    

    Adding items

    The trace object is prepared and we can start to add content. With flxAddHead we start the trace with a label and description of the following trace. The method flxAddSignal adds a signal to the trace. The arguments are:

    • the trace object,
    • itemId for the signal,
    • parentId, here 0 for the root scope,
    • a name and description (2 arguments),
    • the type of the signal
    • and a signal descriptor (not used in this example)

    Open and close

    With flxOpen we start a trace sequence and finalize it with flxClose. Both methods are used to define the domain range and the process. The parameters of flxOpen are:
    • the trace object,
    • itemId to be opened (0 == root; we open all items)
    • domainBase ("ns": the smallest delta between two samples is 1 ns )
    • start position (0ns)
    • sample rate (0: discrete process)
    And flxClose has:
    • the trace object,
    • itemId to be opened (0 == root; we close all items)
    • end position (50000 * 10 ns)
    To open an item id != 0, you need to offer a larger memory space to the trace object (more complex handling). You do this by setting the first argument of FLX_TRACE_BYTES to 1.
     
    	// head
    	flxAddHead(trace, "example", "flux example");
    
    	// add signals
    	// parent 0 is root
    	flxAddSignal(trace, 1, 0, "integer", "an integer", FLX_TYPE_INTEGER, 0);
    	flxAddSignal(trace, 2, 0, "float", "a float", FLX_TYPE_FLOAT, 0);
    
    	// open
    	flxOpen(trace, 0, "ns", 0, 0);
        
    	// generate example trace
    	for (n = 0; n < 500000; n++) {
    
    		// time in ns
    		flxdomain current = n * 10;
    
    		// integer
    		iVal = n % 444;
    		flxWriteIntAt(trace, 1, 0, current, 0, &iVal, sizeof(int), 0);
    
    		// float - same time - use domain=0; isDelta=1
    		fVal = sin(n / 1000.0);
    		flxWriteFloatAt(trace, 2, 0, 0, 1, &fVal, sizeof(float));
    	}
    
    	// close
    	flxClose(trace, 0, n * 10);
    

    The flxWriteXXXAt methods are intended to add events and value changes to a signal. The domain position (e.g. when a change occurs) can be given absolute or relative. If you choose an absolute domain position, the value must to be equal or larger than the one used in a previous write (and larger than the open position). A relative domain position (means relative to a previous write) must be larger or equal to 0. The parameters:

    • the trace object,
    • itemId of the signal,
    • the conflict flag (samples with enabled conflict flags are painted red in impulse),
    • domain position,
    • isRelative flag (1: relative, 0:absolute),
    • pointer to the value,
    • and finally the size of the value in bytes.


    example2

    To be handled ...

    The previous example used the flxWriteToFile handler of flux. In the embedded area, you probably will use a dedicated channel for trace data. To do so, you just need to add a handler function like below:
     

    	flxresult myHandler(flxbyte command, void* buffer, flxbint* len,
    			flxbyte* bytes, void*user) {
    	
    		// just write the data to a file
    		fwrite(bytes, *len, 1, (FILE*) user);
    		return FLX_OK;
    	}
    

    The parameters you need are:

    • flxbint* len: The length of data in the buffer.
    • flxbyte* bytes: A pointer to the data.
    • void* user: The user data pointer (optional).
    To apply the handler to any buffer, just apply the function pointer as parameter to the flxCreateXXXBuffer function. Optionally you can add a user pointer, in this example the FILE object pointer.
     
    	// static memory
    	unsigned char memoryBuffer[bufferSize];
    	unsigned char memoryTrace[traceSize];
    
    	// buffer
    	flxBuffer buffer = flxCreateFixedBuffer(memoryBuffer, bufferSize,
    			myHandler, out);
    

    Scopes and numeric data

    example3

    The method flxAddScope adds a scope item to the trace. Scopes shall be used to organize large amounts of signals. The arguments are:

    • the trace object,
    • itemId for the scope,
    • parentId, here 0 for the root scope,
    • a name,
    • and a description
    In this example, we add signals for different types of integer and float values. As you can see in the first part of the code, flux doesn't care about it in the declaration. If you declare an integer signal, you can write values of any length into.
    	// head
    	flxAddHead(trace, "example", "flux example");
    
    	// add integer signals
    	flxAddScope(trace, 1, 0, "Integers", "Scope Description");
    	flxAddSignal(trace, 2, 1, "a char", "Signal Description", FLX_TYPE_INTEGER, 0);
    	flxAddSignal(trace, 3, 1, "an integer", "Signal Description", FLX_TYPE_INTEGER, 0);
    	flxAddSignal(trace, 4, 1, "a short", "Signal Description", FLX_TYPE_INTEGER, 0);
    	flxAddSignal(trace, 5, 1, "a llong", 0 /* no description*/, FLX_TYPE_INTEGER, 0);
    
    	// add float signals
    	flxAddScope(trace, 11, 0, "Floats", "another Scope");
    	flxAddSignal(trace, 12, 11, "a float", 0, FLX_TYPE_FLOAT, 0);
    	flxAddSignal(trace, 13, 11, "a double", 0, FLX_TYPE_FLOAT, 0);
    

    The actual size of a value (if it is a bytes or an 64 bit integer) is added as a separate parameter after the value pointer. For float signal, the size is limited to 4 (float) or 8(double), for integer it can be any size (size>=1).

    // iterate over n
    
    	// values
    	unsigned char i0 = n % 8;
    	int i1 = n;
    	unsigned short i2 = n * 3;
    	long long = n * n;
    	float f1 = sin(n / 1000.);
    	double f2 = cos(n / 100.);
        
    	// write integer values of multiple types
    	flxWriteIntAt(trace, 2, 0, n * 10, 0, &i0, sizeof(char), 0);
    	flxWriteIntAt(trace, 3, 0, 0, 1, &i1, sizeof(int), 1);
    	flxWriteIntAt(trace, 4, 0, 0, 1, &i2, sizeof(short), 0);
    	flxWriteIntAt(trace, 5, 0, 0, 1, &i3, sizeof(long long), 1);
    
    	// write float values of multiple types (5ns later)
    	flxWriteFloatAt(trace, 12, 0, 5, 1, &f1, sizeof(float));
    	flxWriteFloatAt(trace, 13, 0, 0, 1, &f2, sizeof(double));
    

    example4

    Text, enumeration and binary data

    Text and binary signal handling is similar to the handling of integer signals. You just need a pointer and a size.
     

    	// head
     	flxAddHead(trace, "example", "flux example");
    
    	// add integer signals
    	flxAddScope(trace, 1, 0, "Other", "Scope Description");
    	flxAddSignal(trace, 2, 1, "a text", "Signal Description", FLX_TYPE_TEXT, 0);
    	flxAddSignal(trace, 3, 1, "an enumeration event", "Signal Description", FLX_TYPE_EVENT, 0);
    	flxAddSignal(trace, 4, 1, "a binary", "Signal Description", FLX_TYPE_BINARY, 0);
    
    	// open
    	flxOpen(trace, 0, "ns", 0, 0);
    
    	// write enums for signal 3 (event)
    	flxWriteEnumDef(trace, 3, FLX_ENUM_GLOBAL, "Yes", 1);
    	flxWriteEnumDef(trace, 3, FLX_ENUM_GLOBAL, "No", 0);
    

    Events are different. When you write am event, you always use an unsigned int (flxuint). The textual representation of the enumeration is added using the flxWriteEnumDef function. The parameters are:

    • the trace object,
    • itemId for the signal,
    • the enumeration scope, here FLX_ENUM_GLOBAL for global scope,
    • the text representation,
    • and the enumeration value
    FLX_ENUM_GLOBAL means global for a signal, not global for the trace or sequence. 
    // iterate over n
    
    	// values
    	int eVal = n & 1;
    	char tVal[32];
    	double fVal = cos(n / 100.);
    	sprintf(tVal, "val: %f", fVal);
    
    	// writes a text
    	flxWriteTextAt(trace, 2, 0, n * 10, 0, tVal, strlen(tVal));
    
    	// write an enum event yes/no
    	flxWriteEventAt(trace, 3, 0, 0, 1, eVal);
    
    	// write the bytes of a double value
    	flxWriteBinaryAt(trace, 4, 0, 0, 1, (flxbptr) &fVal, 8);
    

  • Extended data types (examples 5-8)

    example5

    Structured data

    Signals of type structure can transport a set of values (members) with each change. This member set may vary from sample to sample.  The following types are supported:

    • FLX_STRUCTTYPE_TEXT : Textual data
    • FLX_STRUCTTYPE_ENUM : Enumeration data - corresponds to global enumeration type
    • FLX_STRUCTTYPE_INTEGER : Any size integer
    • FLX_STRUCTTYPE_FLOAT : Float or double values
    • FLX_STRUCTTYPE_BINARY : Binary data
    • FLX_STRUCTTYPE_LOCAL_ENUM : Enumeration data - corresponds to member enumeration type
    • FLX_STRUCTTYPE_MERGE_ENUM :
    • FLX_STRUCTTYPE_MOD_HIDDEN : This flag may be used to describe a member as 'hidden'.
    	// add struct signals
    	flxAddScope(trace, 1, 0, "Other", "Scope Description");
    	flxAddSignal(trace, 2, 1, "Simple Struct", "desc", FLX_TYPE_STRUCT, 0);
    
    	// open
    	flxOpen(trace, 0, "ns", 0, 0);
    
    	// write member defs for signal 2 (struct)
    	struct flxMemberValueStruct members[4];
    	flxInitMember(members + 0, 0, "m0", FLX_STRUCTTYPE_ENUM, 0);
    	flxInitMember(members + 1, 1, "m1", FLX_STRUCTTYPE_INTEGER, "default<df=hex>");
    	flxInitMember(members + 2, 2, "m2", FLX_STRUCTTYPE_FLOAT, 0);
    	flxInitMember(members + 3, 3, "m3", FLX_STRUCTTYPE_TEXT, 0);
    	flxWriteMemberDefs(trace, 2, members, 4);
    
    	// write enum defs for signal 2 (struct)
    	flxWriteEnumDef(trace, 2, FLX_ENUM_GLOBAL, "Yes", 1);
    	flxWriteEnumDef(trace, 2, FLX_ENUM_GLOBAL, "No", 0);
    

    The c struct flxMemberValueStruct is used to send either the declarative information (using the function flxWriteMemberDefs) as well the sample data (with the function flxWriteMembersAt).
    Before triggering flxWriteMembersAt, you need to set the value of each member. This is done with flxSetMember(flxMemberValue member, void* value, flxuint size, flxuint option, flxbool valid). The option parameter is type specific and currently only used for the integer type as sign flag.

     

    // iterate over n
    
    	// values
    	int eVal = n & 1;
    	double fVal = cos(n / 100.);
    	char tVal[32];
        sprintf(tVal, "val: %f", fVal);
    
    	// fill struct members and write
    	flxSetMember(members + 0, &eVal, sizeof(int), 0, 1);
    	flxSetMember(members + 1, &n, sizeof(int), 0, 1);
    	flxSetMember(members + 2, &fVal, sizeof(double), 0, 1);
    	flxSetMember(members + 3, (void*) tVal, strlen(tVal), 0, 1);
    	flxWriteMembersAt(trace, 2, 0, n * 10, 0, members, 4);
    

    example6

    Arrays

    Array are similar to structures with the difference that all members have the same type. Supported types are integer, float and event. To declare an array signal you need to select the corresponding array type (FLX_TYPE_INTEGER_ARRAY, FLX_TYPE_FLOAT_ARRAY or FLX_TYPE_EVENT_ARRAY) and define a signal descriptor with a dimension (dim) declaration.

    	// array signals
    	flxAddScope(trace, 1, 0, "Arrays", "Scope Description");
    	flxAddSignal(trace, 2, 1, "integer array", "2 elements", FLX_TYPE_INTEGER_ARRAY, "default<dim=2>");
    	flxAddSignal(trace, 3, 1, "float array", "2 elements", FLX_TYPE_FLOAT_ARRAY, "default<dim=2>");
    	flxAddSignal(trace, 4, 1, "event array", "2 elements", FLX_TYPE_EVENT_ARRAY, "default<dim=2>");
    
    	// open
    	flxOpen(trace, 0, "ns", 0, 0);
    
    	// write array defs for arrays (may be omitted)
    	flxWriteArrayDef(trace, 2, 0, "x");
    	flxWriteArrayDef(trace, 2, 1, "y");
    	flxWriteArrayDef(trace, 3, 0, "x");
    	flxWriteArrayDef(trace, 3, 1, "y");
    	flxWriteArrayDef(trace, 4, 0, "state");
    	flxWriteArrayDef(trace, 4, 1, "done");
    
    	// write enums for for signal 4  (enum array)
    	flxWriteEnumDef(trace, 4, FLX_ENUM_MEMBER_0 + 0, "Yes", 1);
    	flxWriteEnumDef(trace, 4, FLX_ENUM_MEMBER_0 + 0, "No", 0);
    	flxWriteEnumDef(trace, 4, FLX_ENUM_MEMBER_0 + 1, "Low", 1);
    	flxWriteEnumDef(trace, 4, FLX_ENUM_MEMBER_0 + 1, "High", 0);
        
    

    The declaration of the enum values can be either local (FLX_ENUM_MEMBER_0+n) or global. 
     

    // iterate over n
    
    	// values
    	int iaVal[2];
    	float faVal[2];
    	flxuint eaVal[2];
        
    	// integer array
    	iaVal[0] = n % 16;
    	iaVal[1] = n % 1024;
    	flxWriteIntArrayAt(trace, 2, 0, n*10, 0, iaVal, sizeof(int), 0, 2);
    
    	// float array
    	faVal[0] = sin(n / 1000.);
    	faVal[1] = cos(n / 100.);
    	flxWriteFloatArrayAt(trace, 3, 0, 0, 1, faVal, sizeof(float), 2);
    
    	// event array
    	eaVal[0] = n % 2;
    	eaVal[1] = (n + 1) % 2;
    	flxWriteEventArrayAt(trace, 4, 0, 0, 1, eaVal, 2);
    

    Logic data

    Below you find a small example tracing logic data (verilog,..). A logic bit is made up by one of the following states:

    • #define FLX_STATE_0_BITS  0
    • #define FLX_STATE_1_BITS  1
    • #define FLX_STATE_Z_BITS  2
    • #define FLX_STATE_X_BITS  3
    • #define FLX_STATE_L_BITS  4
    • #define FLX_STATE_H_BITS  5
    • #define FLX_STATE_U_BITS  6
    • #define FLX_STATE_W_BITS  7
    • #define FLX_STATE_D_BITS  8
    • #define FLX_STATE_J_BITS  9

    If you add a signal with type FLX_TYPE_LOGIC you will get a 1 bit logic. To add ad logic vector (e.g. a bus), add a descriptor with a bits declaration (e.g. default<bits=16>).
     

    	// logic signals
    	flxAddScope(trace, 1, 0, "Logics", "yep");
    	flxAddSignal(trace, 2, 1, "bit", "desc", FLX_TYPE_LOGIC, 0);
    	flxAddSignal(trace, 3, 1, "vector", "desc", FLX_TYPE_LOGIC, "default<bits=16>");
    	flxAddScatteredSignal(trace, 4, 1, "scattered", 0, FLX_TYPE_LOGIC, 0, 0, 1);
    	flxAddScatteredSignal(trace, 5, 1, "scattered", 0, FLX_TYPE_LOGIC, 0, 2, 5);
        
    

    Logic data can be either passed as text or array of states (bytes).

    // iterate over n
    
    	// logic data using text
    	flxWriteLogicTextAt(trace, 2, 0, n * 10 , 0, FLX_STATE_0_BITS, n&1?"1":"0", 1);
    	flxWriteLogicTextAt(trace, 3, 0, 0, 1, FLX_STATE_0_BITS, n&1?"0011x1":"111uuu", 6);
    	flxWriteLogicTextAt(trace, 4, 0, 0, 1, FLX_STATE_0_BITS, n&1?"uu":"0u", 2);
    	flxWriteLogicTextAt(trace, 5, 0, 0, 1, FLX_STATE_0_BITS, n&1?"11x1":"1100", 4);
    
    	// logic data using state arrays
    	flxbyte states[4] = {FLX_STATE_1_BITS,FLX_STATE_1_BITS,FLX_STATE_X_BITS,FLX_STATE_X_BITS};
    	flxWriteLogicStatesAt(trace, 3, 0, 5 , 1, FLX_STATE_U_BITS, states, 4);
    

    Associations and labels

    Associations and labels allow you to highlight relations between trace signals or add additional information to samples. Below example defines a  set of event signals using enumeration values.
    If you attach an associations or labels, they are bound to the previously written sample (they don't have own domain positions). An association requires:

    • a target definition (e.g. \Enums\enum1)
    • a style definition (text/color/lineStyle/arrayStyle)
    • a domain delta (relative position at the target signal)
    A label just requires:
    • a style definition (text/color/symbol)
    	// add event signals
    	flxAddScope(trace, 1, 0, "Enums", "Scope Description");
    	flxAddSignal(trace, 2, 1, "enum0", 0, FLX_TYPE_EVENT, "gantt<>");
    	flxAddSignal(trace, 3, 1, "enum1", 0, FLX_TYPE_EVENT, "gantt<>");
    	flxAddSignal(trace, 4, 1, "enum2", 0, FLX_TYPE_EVENT, "gantt<>");
    
    	// open
    	flxOpen(trace, 0, "ns", 0, 0);
    
    	// write enums for signal 2,3,4 (events)
    	flxWriteEnumDef(trace, 2, FLX_ENUM_GLOBAL, "Started", 0xfff1);
    	flxWriteEnumDef(trace, 2, FLX_ENUM_GLOBAL, "Running", 2);
    	flxWriteEnumDef(trace, 3, FLX_ENUM_GLOBAL, "Reading", 1);
    	flxWriteEnumDef(trace, 3, FLX_ENUM_GLOBAL, "Writing", 2);
    	flxWriteEnumDef(trace, 4, FLX_ENUM_GLOBAL, "Fetching", 1);
    	flxWriteEnumDef(trace, 4, FLX_ENUM_GLOBAL, "Pushing", 2);
    
    	// write association and label related enums for signal 2,4 (events)
    	flxWriteEnumDef(trace, 2, FLX_ENUM_ASSOC_STYLE, "Trigger/444444/line/no", 1);
    	flxWriteEnumDef(trace, 2, FLX_ENUM_ASSOC_STYLE, "Reference/00ff00/cubic/normal", 2);
    	flxWriteEnumDef(trace, 2, FLX_ENUM_ASSOC_TARGET, "\\Enums\\enum1", 1);
    	flxWriteEnumDef(trace, 2, FLX_ENUM_ASSOC_TARGET, "\\Enums\\enum2", 2);
    	flxWriteEnumDef(trace, 4, FLX_ENUM_LABEL_STYLE, "My label/444444/star", 1);
    
    // iterate over n
    
    	// write at n * 100ns
    	flxWriteEventAt(trace, 2, 0, n * 100, 0, 0xfff1);
    	flxWriteAssociation(trace, 2, 1, 1, 25);
    	flxWriteEventAt(trace, 3, 0, 0, 1, 0);
    	flxWriteEventAt(trace, 4, 0, 0, 1, 0);
    	flxWriteLabel(trace, 4, 1, 5,5);
    
    	// write at +25ns
    	flxWriteEventAt(trace, 3, 0, 25, 1, 1);
    
    	// write at +5ns
    	flxWriteEventAt(trace, 4, 0, 5, 1, 1);
    
    	// write at +20ns
    	flxWriteEventAt(trace, 2, 0, 20, 1, 1);
    	flxWriteAssociation(trace, 2, 2, 2, 20);
    	flxWriteEventAt(trace, 3, 0, 0, 1, 2);
    	flxWriteEventAt(trace, 4, 0, 0, 1, 2);
    
    	// write at +20ns
    	flxWriteEventAt(trace, 2, 0, 20, 1, 2);
    
    	// write at +20ns
    	flxWriteEventAt(trace, 2, 0, 20, 1, 0);
    

    
    
  • flux API Reference

    Overview

    Details

    Buffer creation and handling

    FLX_BUFFER_BYTES

    Calculates the required memory for a buffer with given resulting bufferSize.

    • bufferSize : The resulting buffer size
    • Returns the required memory size
    #define  FLX_BUFFER_BYTES(bufferSize) (sizeof(struct flxBufferStruct) +  bufferSize)

    flxCreateFixedBuffer

    Creates a new 'fixed' buffer.

    • bytes : Memory pointer for the new buffer
    • len : Size of the memory
    • handle : Buffer handler
    • user : User parameter
    • Returns the newly created buffer
    flxBuffer flxCreateFixedBuffer(flxbptr bytes, flxbint len, flxBufferHandle handle, void *user)

    flxClearBuffer

    Clear the buffer.

    • buffer : Buffer to be cleared
    • null
    void flxClearBuffer(flxBuffer buffer)

    flxGetBufferBytes

    Returns the the number of bytes in the buffer.

    • buffer : Buffer to be used
    • Returns the the number of bytes
    flxbint flxGetBufferBytes(flxBuffer buffer)

    flxFlushBuffer

    Flushes the buffer.

    • buffer : Buffer to be flushed
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxFlushBuffer(flxBuffer buffer)

    Trace creation and handling

    FLX_TRACE_BYTES

    Calculates the required memory for a trace with given multi-open flag and item count.

    • multiOpen : Set to true, if you wan to allow sequence opens on items != 0
    • maxItemId : The maximal item id to be used
    • Returns the required memory size.
    #define  FLX_TRACE_BYTES(multiOpen,maxItemId) (sizeof(struct flxTraceStruct) +  (multiOpen ? sizeof(struct flxTraceItemStruct) * (maxItemId):0))

    flxCreateTrace

    Creates a trace object

    • traceId : Id of the new trace object
    • maxItemId : The maximal item id to be used
    • maxEntrySize : The maximal allowed entry size (e.g. 4096).
    • traceBytes : Required memory for this trace structure
    • traceBytesLen : Size of the given memory
    • buffer : Initial buffe to be used for this trace
    • Returns the newly created trace object
    flxTrace flxCreateTrace(flxid traceId, flxid maxItemId, flxbint maxEntrySize, flxbptr traceBytes, flxbint traceBytesLen,		flxBuffer buffer)

    flxSetBuffer

    Sets a new buffer for the given trace.

    • trace : The tarce object
    • buffer : Buffer to be used as output
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxSetBuffer(flxTrace trace, flxBuffer buffer)

    Adding trace entries

    Items

    flxAddHead

    Writes a head entry. The head entry contains information data about the trace and is also used as file identification.

    • trace : The trace object
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddHead(flxTrace trace, flxtext name, flxtext description)

    flxAddHeadDerived

    Writes a head entry for a derived format. The head entry contains information data about the trace and is also used as file identification.

    • trace : The trace object
    • format4 : Format identification (4 characters)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddHeadDerived(flxTrace trace, flxtext format4, flxtext name, flxtext description)

    flxAddSignal

    Writes a signal item entry.

    • trace : The trace object
    • itemId : The item id for this new item. The id must be unique for this trace and in the range of 1..maxItemId
    • parentId : Defines the parent of this new item (or 0 for the root item) : Defines the parent of this new item (or 0 for the root item)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • signalType : The type of this new signal (FLX_TYPE_...)
    • signalDescriptor : Extended definition of the signal type, usually set to 0 for default
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddSignal(flxTrace trace, flxid itemId, flxid parentId, flxtext name, flxtext description,		flxbyte signalType, flxtext signalDescriptor)

    flxAddScatteredSignal

    Writes an item entry for scattered signals.

    • trace : The trace object
    • itemId : The item id for this new item. The id must be unique for this trace and in the range of 1..maxItemId
    • parentId : Defines the parent of this new item (or 0 for the root item)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • signalType : The type of this new signal (FLX_TYPE_...)
    • signalDescriptor : Extended definition of the signal type, usually set to 0 for default
    • scatteredFrom : Scattered from (e.g. bit position 0)
    • scatteredTo : Scattered to (e.g. bit position 4)
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddScatteredSignal(flxTrace trace, flxid itemId, flxid parentId, flxtext name, flxtext description,		flxbyte signalType, flxtext signalDescriptor, flxuint scatteredFrom, flxuint scatteredTo)

    flxAddSignals

    Writes an item entry for multiple signals.

    • trace : The trace object
    • itemIdFrom : The first item id for this new item set. The id must be unique for this trace and in the range of 1..maxItemId
    • itemIdTo : The last item id for this new item set. The id must be unique for this trace and in the range of 1..maxItemId
    • parentId : Defines the parent of this new item (or 0 for the root item)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • signalType : The type of this new signal (FLX_TYPE_...)
    • signalDescriptor : Extended definition of the signal type, usually set to 0 for default
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddSignals(flxTrace trace, flxid itemIdFrom, flxid itemIdTo, flxid parentId, flxtext name,		flxtext description, flxbyte signalType, flxtext signalDescriptor)

    flxAddSignalReference

    Writes an item entry for a signal reference.

    • trace : The trace object
    • referenceId
    • parentId : Defines the parent of this new item (or 0 for the root item)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddSignalReference(flxTrace trace, flxid referenceId, flxid parentId, flxtext name, flxtext description)

    flxAddScatteredSignalReference

    Writes an item entry for a scattered signal reference.

    • trace : The trace object
    • referenceId
    • parentId : Defines the parent of this new item (or 0 for the root item)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • scatteredFrom : Scattered from (e.g. bit position 0)
    • scatteredTo : Scattered to (e.g. bit position 4)
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddScatteredSignalReference(flxTrace trace, flxid referenceId, flxid parentId, flxtext name,		flxtext description, flxuint scatteredFrom, flxuint scatteredTo)

    flxAddScope

    Writes an item entry for a scope.

    • trace : The trace object
    • itemId : The item id for this new item. The id must be unique for this trace and in the range of 1..maxItemId
    • parentId : Defines the parent of this new item (or 0 for the root item)
    • name : The name of the item
    • description : Descriptive text for this item or 0
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxAddScope(flxTrace trace, flxid itemId, flxid parentId, flxtext name, flxtext description)

    flxIsSignal

    Tests the item type.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • Returns true if the item is a signal
    flxbool flxIsSignal(flxTrace trace, flxid itemId)

    flxIsScope

    Tests the item type.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • Returns true if the item is a scope
    flxbool flxIsScope(flxTrace trace, flxid itemId)

    Sequences - Open & Close

    flxOpen

    Opens a new sequence. This opens the sequence for the references item and all items below (children,...).

    • trace : The trace object
    • itemId : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item)
    • domain : Domain base (e.g. ns, us, Hz,..), or 0 for default.
    • start : Domain position as a multiple of its domain base (e.g. domain base=1ms, units = 100, -> domain value = 100ms)
    • rate : Domain rate as a multiple of its domain base
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxOpen(flxTrace trace, flxid itemId, flxtext domain, flxdomain start, flxdelta rate)

    flxSetDefaultOpenDomain

    Sets the default domain. This is used when using the flxOpen with domain=0

    • trace : The trace object
    • domain : Domain base (e.g. ns, us, Hz,..), or 0 for default.
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxSetDefaultOpenDomain(flxTrace trace, flxtext domain)

    flxIsOpen

    Checks the open state of an item.

    • trace : The trace object
    • itemId : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item)
    • Returns true if a sequence has been opened for the given item.
    flxbool flxIsOpen(flxTrace trace, flxid itemId)

    flxClose

    Closes a sequence. This closes the sequence for the references item and all items below (children,...).

    • trace : The trace object
    • itemId : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item)
    • end : Domain position as a multiple of its domain base (e.g. domain base=1ms , units = 100, -> domain value = 100ms).
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxClose(flxTrace trace, flxid itemId, flxdomain end)

    Enums & Members

    flxWriteEnumDef

    Writes an entry for a enumeration.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • enumeration : Define the enumeration domain (e.g. FLX_ENUM_GLOBAL, FLX_ENUM_MEMBER_0, ..)
    • label : The textual representation of the enum.
    • value : The value : The integer value of the enum. This value must be unique for one enumeration domain.
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteEnumDef(flxTrace trace, flxid itemId, flxuint enumeration, flxtext label, flxuint value)

    flxWriteArrayDef

    Writes an entry for an array definition.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • index : Index of the array member (0..size-1).
    • label : Label of the array member.
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteArrayDef(flxTrace trace, flxid itemId, flxuint index, flxtext label)

    flxInitMember

    Initializes a member structure.

    • member : Member structure of type flxMemberValue
    • memberId : Id of the member (0..N). This id need to be unique for one signal item.
    • label : Label of the struct member.
    • memberType : Data type of this member (FLX_STRUCTTYPE_TEXT, FLX_STRUCTTYPE_ENUM,...)
    • memberDescriptor : Type descriptor or 0 for default.
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxInitMember(flxMemberValue member, flxuint memberId, flxtext label, flxbyte memberType,		flxtext memberDescriptor)

    flxWriteMemberDef

    Writes an entry for a member definition.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • member : Member structure of type flxMemberValue
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteMemberDef(flxTrace trace, flxid itemId, flxMemberValue member)

    flxWriteMemberDefs

    Writes multiple entries for member definition.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • member : Member structure of type flxMemberValue
    • count : No of members in the member array.
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteMemberDefs(flxTrace trace, flxid itemId, flxMemberValue member, flxuint count)

    Writing samples

    flxSetDomainValue

    Sets the domain position.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxSetDomainValue(flxTrace trace, flxid itemId, flxdomain * domain, flxbool isDelta)

    flxWriteNoneAt

    Writes a 'none' samples.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteNoneAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta)

    flxWriteIntAt

    Writes an integer sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • size : Size of the value in bytes
    • signd : 1 if value is a signed integer
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteIntAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta, void *value,		flxbyte size, flxbool signd)

    flxWriteIntArrayAt

    Writes an integer array sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • intsize : Size of the int values (4 or 8) in bytes
    • signd : 1 if value is a signed integer
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteIntArrayAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		void *value, flxbyte intsize, flxbool signd, flxuint count)

    flxWriteFloatAt

    Writes a float sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • size : Size of the value in bytes (4 or 8)
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteFloatAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		void *value, flxbyte size)

    flxWriteFloatArrayAt

    Writes a float array sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • floatsize : Size of the value in bytes (4 or 8)
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteFloatArrayAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		void *value, flxbyte floatsize, flxuint count)

    flxWriteEventAt

    Writes an event sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteEventAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxuint value)

    flxWriteEventArrayAt

    Writes an event array sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteEventArrayAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxuint *value, flxuint count)

    flxWriteTextAt

    Writes a text sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • size : Size of the value in characters
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteTextAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxtext value, flxuint size)

    flxWriteBinaryAt

    Writes a binary sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • size : Size of the value in bytes
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteBinaryAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxbptr value, flxuint size)

    flxWriteLogicStatesAt

    Writes a logic sample using an array of states.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • precedingStates : If the given no of bits less than the defined one, the preceding states will be filled to the left
    • value : The value
    • size : Size of the value in states
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteLogicStatesAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxbyte precedingStates, flxbptr value, flxuint size)

    flxWriteLogicTextAt

    Writes a logic sample using a text.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • precedingStates : If the given no of bits less than the defined one, the preceding states will be filled to the left
    • value : The value
    • size : Size of the value in characters
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteLogicTextAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxbyte precedingStates, flxtext value, flxuint size)

    flxSetMember

    Sets the member values of a struct signal member.

    • member : Member structure of type flxMemberValue
    • value : The value
    • size : Size of the value in bytes
    • option : integer->signed flag
    • valid : Marks this member as valid. In-valid members are not written.
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxSetMember(flxMemberValue member, void* value, flxuint size, flxuint option, flxbool valid)

    flxWriteMembersAt

    Writes a struct sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • conflict : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red
    • domain : Domain base (e.g. ns, us, Hz,..), or null for default.
    • isDelta : If set to true, domain will be taken as positive relative value (0 to keep the domain position)
    • value : The value
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteMembersAt(flxTrace trace, flxid itemId, flxbool conflict, flxdomain domain, flxbool isDelta,		flxMemberValue value, flxuint count)

    Association & Labels

    flxWriteAssociation

    Writes an association entry. An association connects the previously written sample with any other item (path of the item) at a relative position.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • target : Path to the target signal (e.g. "\\scope\\signal")
    • style : Enumeration id of the style description.
    • delta : Delta position
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteAssociation(flxTrace trace, flxid itemId, flxuint target, flxuint style, flxsdelta delta)

    flxWriteLabel

    Writes a label entry. The label is added to the previously written sample.

    • trace : The trace object
    • itemId : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId
    • style : Enumeration id of the style description.
    • x
    • y
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteLabel(flxTrace trace, flxid itemId, flxuint style, flxsint x, flxsint y)

    Control entries

    flxWriteControlReqEntry

    Writes a control request entry into a buffer.

    • buffer : Target of this write entry
    • controlId : Identifies a control function
    • messageId : Identifies a message (may be used to identify the result message)
    • value : The value (set of members)
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteControlReqEntry(flxBuffer buffer, flxid controlId, flxid messageId, flxMemberValue value,		flxuint count)

    flxWriteControlResEntry

    Writes a control result entry into a buffer.

    • buffer : Target of this write entry
    • controlId : Identifies a control function
    • messageId : Identifies a message (may be used to identify the result message)
    • value : The value (set of members)
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteControlResEntry(flxBuffer buffer, flxid controlId, flxid messageId, flxMemberValue value,		flxuint count)

    flxWriteControlRequest

    Writes a control request entry into a trace.

    • buffer : Target of this write entry
    • controlId : Identifies a control function
    • messageId : Identifies a message (may be used to identify the result message)
    • value : The value (set of members)
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteControlRequest(flxTrace trace, flxid controlId, flxid messageId, flxMemberValue value, flxuint count)

    flxWriteControlResult

    Writes a control result entry into a trace.

    • buffer : Target of this write entry
    • controlId : Identifies a control function
    • messageId : Identifies a message (may be used to identify the result message)
    • value : The value (set of members)
    • count : No of array members
    • Returns FLX_OK is succeeded, or FLX_ERROR_ in the error case
    flxresult flxWriteControlResult(flxTrace trace, flxid controlId, flxid messageId, flxMemberValue value, flxuint count)

Legacy recTr Trace Format

The Impulse trace format (*.recTr) is an open format targeting typical embedded system use-cases. The trace data is packed into a binary format. To generate a trace, you can use open-source multi-language emitters (currently C/C++, systemC and Java).

Continue Reading