A07 Production Reference

Productions can be used to create/derive new signals: combine multiple sources, extract statistical information , do mathematical calculations or to filter samples.

 

This article is based on impulse 1.8.

Core Productions

  • Signal Scripts

    Use Javascript to create new/derived signals

    Signal scripts allow the users to analyze and interpret signals in many ways. Combine signals using mathematical operations, generate references, implement protocol parsers, extract statistical informations or search for conflicts automatically.(see 12 Signal Scripts

    The typical goal of a script is to read the content of source signals and create one output signal. A simple script looks like this:

    // input: an array of all input signals
    // in0: primary input of type ISamplePointer,IReadableSamples
    // in1..: additional inputs of type ISamplePointer,IReadableSamples
    // out: output signal of type IFloatSamplesWriter
    // console: console output of type MessageConsoleStream
    // iter: iterator of type ISamplesIterator
    // progress: progess control of type  IScriptProgress
    
    progress.cont();
    while ( iter.hasNext()) {
        var current <:Long:> = iter.next(out);
        out.write(current, false, input[0].floatValue() +  input[1].floatValue());
    }
    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Function
    Parameters
    • Standard parameters only
  • Logic Extract

    Extract/modify bits from logic data

    Logic Extract lets you extract ,swap and invert bits.

    A common resource root can be defined and used as base in all adapters.

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Function
    • If extract flag is set to true, this production will extract the bits (no of bits in count)starting at the given bit position. If swap is enabled, extracted bits will be swapped (after extraction). If invert is enabled, logical 1 and 0 bits will be inverted.If more than 1 source is given, only the first will be recognized.
    Parameters
    • Extract: Enables extraction.
    • Bit pos: Bit pos to start extraction (right alligned).
    • Count: No of bits to extract.
    • Swap: Swaps extract bits.
    • Invert: Logical 1 and 0 bits will be inverted.
  • Logic Combiner

    Combines multiple logic signals into one

    If the following inputs are given:

    • in0: 4bits (aaaa)
    • in1: 2bits (bb)
    • in2: 1bits (c)

    The output signal of this production will be in the form: cbbaaaa

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Function
    • Combines multiple logic signals into one. The first input value is added right alligned (from bit 0), the following inputs will be added to the left. With each change in any of the input signals, a new ouput sample will be added.
    Parameters
    • None
  • Member Extract

    Extract members from struct or array signals

    Extract a member, identified by the member name or index and creates a new signal of a given signal type.

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Function
    • For each change in the input signal, this production tries to extract the given member (by name or index) and creates a new sample of the selected signal type.
    Parameters
    • Signal type: Select the output signal type of your script (Float, String, Logic, Integer, ..).
    • Signal descriptor: The signal descriptor describes the signal type in more details (e.g the bit width of a logic vector).
    • Member: Member name or index.
  • Text Filter

    Filters samples based on the text content

    Filters all samples that dont match a given expression. The expression can be a simple text (hits if text is included in the text value of the sample) or a regular expression (hits when expression matches).

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Function
    • For each input sample, the prodution checks if the filter expression mathes and adds the sample to the output signal if it does.
    • If Regular flag is not set, the expression text needs to be included in the text value of the sample.
    • If Regular flag is set, the expression is evaluated as a regular pattern and applied to the sample text value.
    • If the Member field is not empty, the production uses the text value of the the member (name or index) of a struct or array sample.
    Parameters
    • Member: Name or index of the member.
    • Filter: Regular or simple filter xpression.
    • Regular: If checked, the filter expression is evaluated as a regular pattern.
  • Text Extract

    Extracts information from text samples

    This production does 2 steps: Filters all non relevant samples and extract textual information from the relevant ones. Ths information will be converted into a given output signal type.

    Non regular example:

    Samples value: 'This is a log with value: 13 and another'

    • Signal type:Integer
    • Extract: 'value:'
    • Regular: false

    Regular example:

    Samples value: 'This is a log with value:13-18'

    • Signal type:Integer
    • Extract: '.*value\:([0-9]+).*'
    • Regular: true
    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Function
    • For each input sample, the prodution checks if the filter expression mathes and continues processing if it does. If the Filter field is empty, no filtering will be applied.
    • If Regular flag is not set, the Extract expression text needs to be included in the text value of the sample. The text following this expression, surrounded by whitespaces, will be extracted.
    • If Regular flag is set, the expression is evaluated as a regular pattern and applied to the sample text value. Group(1) value will be extracted. (see Regular Expressions)
    • If the Member field is not empty, the production uses the text value of the the member (name or index) of a struct or array sample.
    Parameters
    • Member: Name or index of the member.
    • Filter: Regular or simple filter xpression.
    • Regular: If checked, the filter expression is evaluated as a regular pattern.