The procedure for requesting AWR support has changed. Please read all about the new AWR product support process.
Page tree
Skip to end of metadata
Go to start of metadata

The following functions parse measurement strings identically to the main code. For example, working with the following measurement the functions work as described below:

Pulse Signal.HS:Vtime(PORT_1,1)[*]
  • getMeasType returns the measurement type (i.e. "HS" in the example above)

  • getMeasSource returns the measurement data source (i.e. "Pulse Signal" in the example above)

  • getMeasName returns the measurement name (i.e. "Vtime" int he example above)

 

 

 Function getMeasType(eqn As String) As String

        Dim tok As String

        tok = getLeftHalf(eqn,":")
        tok = getRightHalf(tok,".")

        getMeasType = tok

End Function
Function getMeasSource(eqn As String) As String

        Dim tok As String

        tok = getLeftHalf(eqn,":")
        tok = getLeftHalf(tok,".")

        getMeasSource = tok

End Function
Function getMeasName(eqn As String) As String

        Dim tok As String

        tok = getRightHalf(eqn,":")
        tok = getLeftHalf(tok,"[")
        tok = cleanString(tok,"DB(")
        tok = cleanString(tok,"Re(")
        tok = cleanString(tok,"Im(")
        tok = cleanString(tok,"Ang(")
        tok = cleanString(tok,"AngU(")
        tok = cleanString(tok,"Conj(")
        tok = cleanString(tok,"|")
        tok = getLeftHalf(tok,"(")

        getMeasName = tok

End Function
Function getLeftHalf(tok As String, sep As String) As String

        Dim temp As String
        temp = tok

        If (InStr(tok,sep)) Then
                temp = Split(tok,sep)(0)
        End If

        getLeftHalf = temp

End Function
Function getRightHalf(tok As String, sep As String) As String

        Dim temp As String
        temp = tok

        If (InStr(tok,sep)) Then
                temp = Split(tok,sep)(1)
        End If

        getRightHalf = temp

End Function
Function cleanString(tok As String, searchStr As String) As String

        Dim temp As String
        temp = tok

        If (InStr(tok,searchStr)) Then
                temp = Split(tok,searchStr)(1)
                temp = Left(temp,Len(temp)-1)
        End If

        cleanString = temp

End Function