API for Signals

Part of the Object based program API.

class SignalApi

Returned by

SymbolApi

Returns the SymbolApi namespace.

Returns:

SymbolApi namespace

Return type:

SymbolApi

CreateConstantSegment(duration=1.0, value=0.0)

Creates a constant signal segment

Parameters:
duration : float

Duration of segment

value : float

Amplitude of signal value

Returns:

New ConstantSegment

Return type:

ConstantSegment

CreateDataFileSegment(filePath, dataVectorName, timeVectorName='time', interpolationType='backward', channelPath=None, channelSource=None, groupName=None, groupPath=None, groupSource=None)

Creates a signal segment which references a trace file to use a contained signal

Parameters:
filePath : string

Path of the trace file. Either absolute or relativ to workspace

dataVectorName : string

Name of the signal in the trace file to be used for signal values

timeVectorName : string

Name of the signal in the trace file to be used as time vector

interpolationType : string

Interpolation method (backward, forward, linear)

channelPath : string

Name of the channel path

channelSource : string

Name of the channel source

groupName : string

Name of the group

groupPath : string

Name of the group path

groupSource : string

Name of the group source

Returns:

New DataFileSegment

Return type:

DataFileSegment

CreateExponentialSegment(duration=1.0, start=0.0, stop=1.0, tau=0.5)

Creates an exponential signal segment

Parameters:
duration : float

Duration of segment

start : float

Start of signal

stop : float

Stop of signal

tau : float

Tau of signal

Returns:

New ExponentialSegment

Return type:

ExponentialSegment

CreateIdleSegment(duration=1.0)

Creates an idle signal segment

Parameters:
duration : float

Duration of segment

Returns:

New IdleSegment

Return type:

IdleSegment

CreateLoopSegment(loopCount=1)

Creates a loop signal segment

Parameters:
loopCount : int

Number of loops for segment

Returns:

New LoopSegment

Return type:

LoopSegment

CreateNoiseSegment(duration=1.0, mean=0.0, sigma=1.0, seed=0.0)

Creates a noise signal segment

Parameters:
duration : float

Duration of segment

mean : float

Mean of signal

sigma : float

Sigma of signal

seed : float

Seed of signal

Returns:

New NoiseSegment

Return type:

NoiseSegment

CreateOperationSegment()

Creates an operation signal segment

Returns:

New OperationSegment

Return type:

OperationSegment

CreateOperationSignal(name)

Creates an empty operation signal definition

Parameters:
name : str

Name for the signal

Returns:

New operation signal

Return type:

OperationSignalDescription

CreatePulseSegment(duration=1.0, offset=0.0, amplitude=1.0, period=1.0, dutyCycle=0.5, phase=0.0)

Creates a pulse signal segment

Parameters:
duration : float

Duration of segment

offset : float

Offset of signal

amplitude : float

Amplitude of signal

period : float

Period of signal

dutyCycle : float

DutyCycle of signal

phase : float

Phase of signal

Returns:

New PulseSegment

Return type:

PulseSegment

CreateRampSegment(duration=1.0, startValue=0.0, stopValue=1.0)

Creates a ramp signal segment

Parameters:
duration : float

Duration of segment

startValue : float

Amplitude of signal at the start

stopValue : float

Amplitude of signal at the end

Returns:

New RampSegment

Return type:

RampSegment

CreateRampSlopeSegment(duration=1.0, offset=0.0, slope=1.0)

Creates a ramp slope signal segment

Parameters:
duration : float

Duration of segment

offset : float

Offset of signal at the start

slope : float

Slope of signal

Returns:

New RampSlopeSegment

Return type:

RampSlopeSegment

CreateSawSegment(duration=1.0, offset=0.0, amplitude=1.0, period=1.0, dutyCycle=0.5, phase=0.0)

Creates a saw signal segment

Parameters:
duration : float

Duration of segment

offset : float

Offset of signal

amplitude : float

Amplitude of signal

period : float

Period of signal

dutyCycle : float

DutyCycle of signal

phase : float

Phase of signal

Returns:

New SawSegment

Return type:

SawSegment

CreateSignal(name)

Creates an empty signal definition

Parameters:
name : str

Name for the signal

Returns:

New signal

Return type:

SegmentSignalDescription

CreateSignalValueSegment(timeVector=None, dataVector=None, interpolationType='backward')

Creates a signal segment which explicitly takes a vector of timestamps and corresponding values. The timeVector and dataVector list must be of same length.

Parameters:
timeVector : list[float]

vector of timestamps

dataVector : list[float]

vector of values

interpolationType : string

Interpolation method (backward, forward, linear)

Returns:

New SignalValueSegment

Return type:

SignalValueSegment

CreateSineSegment(duration=1.0, offset=0.0, amplitude=1.0, period=1.0, phase=0.0)

Creates a sine signal segment

Parameters:
duration : float

Duration of segment

offset : float

Offset of signal

amplitude : float

Amplitude of signal

period : float

Period of signal

phase : float

Phase of signal

Returns:

New SineSegment

Return type:

SineSegment

GetSignalNames(filePath, signalGroupName=None)

Returns a list of all signal names (except time signal) within the referenced tracefile.

Parameters:
filePath : string

Path of the trace file. Either absolute or relativ to workspace

signalGroupName : string

Name of the Signal Group

Returns:

The names of all Signals

Return type:

list[str]