Returns a structure containing a waveform from an analyzer input port. This command is specific for building analyzers.
Syntax |
Description |
---|---|
signalIn = getmonitorwaveform(port,domain=”time”); |
For a scripted element, this command returns a structure containing a waveform from an analyzer input port. Results can be provided in “time” or “frequency’ domains. This command is specific for building analyzers. |
Implementation Details
Digital signal waveform:
The waveform contains the signal bitrate and two vectors: the time and amplitude values.
#digital signal waveform bitrate time=matrix; value=matrix;
Electrical signal frame:
The waveform contains the signal value and its bandwidth. Frequency or time domain values are available.
#electrical signal frame bandwidth=struct bandwidth.frequency bandwidth.sample_rate bandwidth.time_window value=struct value.amplitude = matrix value.frequency = matrix
Optical signal frame:
The waveform contains the signal channel. The signal channel is a cell which contains the bandwidth, value and mode structs.
#optical signal frame signal=cell signal.channel=cell signal.channel.bandwidth=struct signal.channel.bandwidth.frequency signal.channel.bandwidth.sample_rate signal.channel.bandwidth.time_window signal.channel.value=struct signal.channel.value.amplitude signal.channel.value.frequency signal.channel.mode=struct signal.channel.mode.label signal.channel.mode.orthogonal_identifier signal.channel.mode.uid
Example
Implements of a ‘wrapup function of a scripted element with one analyzer digital input port:
signalIn = getmonitorwaveform( "input", "time", 3 ); logmessage(toscript(signalIn,false)); setresult( "waveform", signalIn.time, signalIn.value, "time (s)", "amplitude (a.u.)" ); setresult( "bitrate", signalIn.bitrate, "bitrate (bits/s)" );
The digital signal waveform with 32 values for time and amplitude:
SCRIPTED_2: signalIn=struct; signalIn.bitrate=2.5e+009; signalIn.time=matrix(32); signalIn.value=matrix(32);
Implements of a ‘wrapup function of a scripted element with one analyzer electrical input port:
signalIn = getmonitorwaveform( "input", "time", 3 ); logmessage( toscript( signalIn, false ) ); setresult( "waveform", signalIn.value.time, signalIn.value.amplitude, "time (s)", "amplitude (a.u.)" );
The electrical signal waveform with 512 values for time and amplitude:
SCRIPTED_2: signalIn=struct; signalIn.bandwidth=struct; signalIn.bandwidth.frequency=0; signalIn.bandwidth.sample_rate=1.6e+011; signalIn.bandwidth.time_window=3.2e-009; signalIn.value=struct; signalIn.value.amplitude=matrix(512); signalIn.value.frequency=matrix(512);
Implements of a ‘wrapup function of a scripted element with one analyzer optical input port:
signalIn = getmonitorwaveform( "input" ); logmessage( toscript( signalIn, false) ); setresult( "waveform", signalIn.signal{1}.channel{1}.value.time, signalIn.signal{1}.channel{1}.value.amplitude, "time (s)", "amplitude (a.u.)" );
The optical signal waveform with 512 values for time and amplitude:
SCRIPTED_2: signalIn=struct; signalIn.signal=cell(1); signalIn.signal{1}=struct; signalIn.signal{1}.channel=cell(1); signalIn.signal{1}.channel{1}=struct; signalIn.signal{1}.channel{1}.bandwidth=struct; signalIn.signal{1}.channel{1}.bandwidth.frequency=1.931e+014; signalIn.signal{1}.channel{1}.bandwidth.sample_rate=1.6e+011; signalIn.signal{1}.channel{1}.bandwidth.time_window=3.2e-009; signalIn.signal{1}.channel{1}.value=struct; signalIn.signal{1}.channel{1}.value.amplitude=matrix(512); signalIn.signal{1}.channel{1}.value.frequency=matrix(512); signalIn.signal{1}.mode=struct; signalIn.signal{1}.mode.label='X'; signalIn.signal{1}.mode.orthogonal_identifier=1; signalIn.signal{1}.mode.uid='#1';
See Also
pushportdata , cloneportdata , portdatasize , popportframe , pushportframe , getmonitorframe