API for Signals¶
Part of the Object based program API.
- class SignalApi¶
Returned by
-
CreateConstantSegment(duration=
1.0, value=0.0)¶ Creates a constant signal segment
- Parameters:
- Returns:
New ConstantSegment
- Return type:
-
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:
-
CreateExponentialSegment(duration=
1.0, start=0.0, stop=1.0, tau=0.5)¶ Creates an exponential signal segment
- Parameters:
- Returns:
New ExponentialSegment
- Return type:
-
CreateIdleSegment(duration=
1.0)¶ Creates an idle signal segment
- Parameters:
- duration : float¶
Duration of segment
- Returns:
New IdleSegment
- Return type:
-
CreateLoopSegment(loopCount=
1)¶ Creates a loop signal segment
- Parameters:
- loopCount : int¶
Number of loops for segment
- Returns:
New LoopSegment
- Return type:
-
CreateNoiseSegment(duration=
1.0, mean=0.0, sigma=1.0, seed=0.0)¶ Creates a noise signal segment
- Parameters:
- Returns:
New NoiseSegment
- Return type:
- CreateOperationSegment()¶
Creates an operation signal segment
- Returns:
New OperationSegment
- Return type:
- CreateOperationSignal(name)¶
Creates an empty operation signal definition
- Parameters:
- name : str¶
Name for the signal
- Returns:
New operation signal
- Return type:
-
CreatePulseSegment(duration=
1.0, offset=0.0, amplitude=1.0, period=1.0, dutyCycle=0.5, phase=0.0)¶ Creates a pulse signal segment
-
CreateRampSegment(duration=
1.0, startValue=0.0, stopValue=1.0)¶ Creates a ramp signal segment
- Parameters:
- Returns:
New RampSegment
- Return type:
-
CreateRampSlopeSegment(duration=
1.0, offset=0.0, slope=1.0)¶ Creates a ramp slope signal segment
- Parameters:
- Returns:
New RampSlopeSegment
- Return type:
-
CreateSawSegment(duration=
1.0, offset=0.0, amplitude=1.0, period=1.0, dutyCycle=0.5, phase=0.0)¶ Creates a saw signal segment
- CreateSignal(name)¶
Creates an empty signal definition
- Parameters:
- name : str¶
Name for the signal
- Returns:
New signal
- Return type:
-
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:
- Returns:
New SignalValueSegment
- Return type:
-
CreateSineSegment(duration=
1.0, offset=0.0, amplitude=1.0, period=1.0, phase=0.0)¶ Creates a sine signal segment
-
GetSignalNames(filePath, signalGroupName=
None)¶ Returns a list of all signal names (except time signal) within the referenced tracefile.
-
CreateConstantSegment(duration=