Skip to main content

Automated Test with WaveBPS

WaveBPS includes a TCP/IP server to allow remote control from other applications. The TCP/IP Server offers a text based command set allowing a remote application capture data, save data and collect results. This server is very easily controlled by Vehicle Spy scripts allowing test systems that involve both message simulation and diagnostics to be combined with analog capture and analysis.

The TCP/IP server configuration is available from the image-43 tab. Here you can enable the TCP/IP server with a specific port. You can also enable the TCP/IP server to start when WaveBPS starts. Make sure to allow the WaveBPS and port you choose access though your firewall.

TextAPIDemo

image-59

Figure 1 - The configuration of the TCP/IP server in WaveBPS.

A list of available commands supported is listed in the table 1 below.

Table 1 - Text API commands for WaveBPS Main Object

CommandDescriptionexample
deaccesses the decoder objects collectionde.count? // returns count of decodersde(0).description SPIDecode // sets description of first decoder to SPIDecode
scaccesses the scope object
anaccesses the analysis results collection (one per channel)
startstarts wavebps
stopstops wavebps
refreshguiloads the settings into the gui (call when you load configuration settings)
saveentirerawwaveform "filepath"saves the current waveform to the "filepath"
hascaptureddata?returns whether wavebps has finished captured data
loadconfig "filepath"loads a configuration indicated by "filepath"
an(key or index).getscalar? "scalarname"reads a scalar value such as error count or frame count
savevspybuffer "filepath"saves a vehicle spy buffersavevspybuffer c: est.csv
saveeventlist "filepath"saves the event list to a file namesaveeventlist c:\test.csv
autosaveindicates whether autosave should occur on a filter match captureautosave 1
autorearmindicates whether a filter match capture should rearmautorearm 0
autosavepathsets/returns the autosave pathautosavepath?
decoderchasets/return the index of the decoder for channel adecodercha 1
decoderchbsets/return the index of the decoder for channel b
decoderchcsets/return the index of the decoder for channel c
decoderchdsets/return the index of the decoder for channel d
defaulteventThis is the event filter box as an index
defaulteventfilterThis is the text filter
wavefileplayonmatchreturns/sets whether a wavefile should be played when a trigger is matched
wavefilepathreturns/sets the path of the of the wavefile that is played when a trigger occurs

Table 2 - Decoder Object Properties

CommandDescriptionexample
baudratereturns/sets the baudrate of the decoder
basicdatabasepathreturns/sets the path of the data base for this network
canbittolerancereturns/sets the CAN / CAN FD bit tolerance in percent
descriptionreturns/sets the description of the decoder
decodertypereturns/set the decoder type. The following values are validDWCAN = 0,FlexRay = 1,SWCAN= 2,LSFTCAN= 3,LIN= 4,J1850VPW= 5,KLine= 7,UART= 9,NoDecode= 10,Disabled=12,MathAMinusB= 13,MathAPlusB= 14,I2C= 15,SPI= 16,
databitorderingindicates either endianess of the data items either msb first or last
datalengthbitsindicates the number of bits per data item (works for those decoders who support it such as UART and SPI)
enablemovingaveragefilterenables a 3 point moving average for the detecting thresholds
errordecodelimitreturns/set the number errors before the decoder gives up
enablegmlancanswitchenables message decoding and detection of the GM3110 high speed programming protocol (Automatically switches decoder baud rate)
enableautobaudrateenables an automatic baud rate detection where the estimated baud rate is compared to standard values
enablemanualthresholdenables a manual threshold as opposed to the automatic algorithim
flexraychannelinidcates if the flexray monitored is (A or B or auto). this is required for CRC calculation testing because flexray uses different CRCs on channel a and b.
highbaudratefor swcan indicates the high baud rate that is used when switched
highvoltagethresholdfor swcan is the voltage threshold used to detect transceivers operating in high voltage mode
isinvertedindicates if the manual threshold detection is inverted
idlebitcountthe number of quiet bit times either between messages or before decoding can start
idlengthbitsfor protocols that support it - this indicates the length of the ID in bits. the id is shown in the ID column and is used for database searching
rearmathis is the voltage threshold for rearm of high voltage
rearmbthis is the voltage threshold for rearm of low voltage
spimodethe SPI mode indicates clock polarity and sampling position
thresholdhighthis the threshold for trigger when the waveform is rising
thresholdlowthis is the threshold for trigger when waveform is falling
uartstopbitcountthis is the count of stop bits for a uart decoder
uartparitythis is the parity for for a uart decoder

Table 3 - Scope Object Properties

capturetypeWhat channels should be collected
couplingathe type of coupling used on channel a
couplingbthe type of coupling used on channel b
couplingcthe type of coupling used on channel c
couplingdthe type of coupling used on channel d
capturelengthsamplesthe length of the capture in samples
capturerepeatmodethe type of capture mode : single, multiple, and filter match
probeafactorthe mulitply factor of the probe used for cha
probebfactorthe mulitply factor of the probe used for chb
probecfactorthe mulitply factor of the probe used for chc
probedfactorthe mulitply factor of the probe used for chd
sampleratemicrosecondspersamplethe requested sample rate in microseconds per sample
specialtriggerbitratethe rate used for the can error frame trigger
sampleratefrequencyspecindicates how the gui displays the sample rate
triggersourceindicates the trigger source (0 - none, 1 - cha, 2 - chb, 3 - ext, 4 - chc, 5 - chd)
triggervoltagethe absolute trigger voltage
triggerdirectionsets the direction rising or falling
triggerhystersishystersis in voltage
triggerpercentagesets the trigger point in precentage (pretrigger)
triggertimeoutmsthe time out if the trigger does not occur
triggerspecialtypesets a special trigger mechanism
voltagerangeasets the voltage range for channel a
voltagerangebsets the voltage range for channel b
voltagerangecsets the voltage range for channel c
voltagerangedsets the voltage range for channel d

Table 4 - Analysis Object Properties

getscalarreturns one of the scalar properties by namean(0).getscalar? framecount