(To be removed) Create error rate test console
commtest.ErrorRate will be removed in a future release. Use comm.ErrorRate or bertool instead. For more information, see Compatibility Considerations.
h = commtest.ErrorRate
h = commtest.ErrorRate(sys)
h = commtest.ErrorRate(sys,'PropertyName',PropertyValue,...)
h = commtest.ErrorRate('PropertyName',PropertyValue,...)
h = commtest.ErrorRate returns an error rate test console, h. The error
rate test console runs simulations of a system under test to obtain error rates.
h = commtest.ErrorRate(sys) returns an error rate test console, error
rate test console, h, with each specified property set to the h, with an attached system under
test, SYS.
h = commtest.ErrorRate(sys,'PropertyName',PropertyValue,...) returns an
error rate test console, h, with an attached system under test, sys. Each specified property,
'PropertyName', is set to the specified value, PropertyValue.
h = commtest.ErrorRate('PropertyName',PropertyValue,...) returns an
error rate test console, h, with each specified property 'PropertyName', set to the specified
value, PropertyValue.
The error rate test console object has the properties in the following table. Setting any
property resets the object. A property that is irrelevant is one that you
can set, but its value does not affect measurements. Similarly, you cannot display irrelevant
properties using the disp method. You can write to all properties, except for
the ones explicitly noted otherwise.
| Property | Description |
|---|---|
| Description | 'Error Rate Test Console'. Read-only. |
| SystemUnderTestName | System under test name. Read-only. |
| FrameLength | Specify the length of the transmission frame at each iteration. This property becomes relevant only when the system under test registers a valid test input.
|
| IterationMode | Specify how the object determines simulation points.
Note that for the following sweep parameter settings:
In Indexed Mode, the test console performs simulations for the following sweep parameter sets: (a1, b1, c1) (a2, b2, c1) In Combinatorial Mode, the test console performs simulations for the following sweep parameter sets: (a1, b1, c1) (a1, b2, c1) (a2, b1, c1) (a2, b2, c1) |
| SystemResetMode | Specify the stage of a simulation run at which the system resets.
|
| SimulationLimitOption | Specify how to stop the simulation for each sweep parameter point.
Set To control the simulation
length, set Call the |
| MaxNumTransmissions | Specify the maximum number of transmissions the object counts before stopping the
simulation for a sweep parameter point. This property becomes relevant only when
The |
| MinNumErrors | Specify the minimum number of errors the object counts before stopping the
simulation for a sweep parameter point. This property becomes relevant only when setting the
Specify the type of errors the error count uses by setting the
|
| TransmissionCountTestPoint | Specify and register a test point containing the transmission count that controls
the test console simulation stop mechanism. This property becomes relevant only when setting
|
| ErrorCountTestPoint | Specify and register the name of a test point containing the error count that
controls the simulation stop mechanism. This property is only relevant when setting the
|
The error rate test console object has the following methods:
Runs a simulation.
Runs the number of error rate simulations you specify for a system under test with a specified set of parameter values. If a Parallel Computing Toolbox™ license is available and a parpool is open, then the object distributes the iterations among the number of workers available.
Returns the simulation results.
r = getResults(h) returns the simulation results, r, for the test console, h. r is an object of the type you specify using testconsole.Results. It contains the simulation data for all the registered test points and methods to parse the data and plot it.
Returns a report of the current test console settings.
info(h) displays the current test console settings, such as registered test parameters and registered test points.
Resets the error rate test console.
reset(h) resets test parameters and test probes and then clears all simulation results of test console, h.
Attaches a system to test console.
attachSystem(ho,sys) attaches a valid user-defined system, sys, to the test console, h.
Detaches the system from the test console.
detachSystem(h) detaches a system from the test console, h. This method also clears the registered test inputs, test parameters, test probes, and test points.
Sets test parameter sweep values.
setTestParameterSweepValues(h,name,sweep) specifies a set of sweep values, 'sweep', for the registered test parameter, 'name', in the test console, h. You only specify sweep values for registered test parameters. sweep must have values within the specified range of the test parameter. It can be a row vector of numeric values, or a cell array of char values. Display the valid ranges using the getTestParameterValidRanges method.
setTestParameterSweepValues(h,name1,sweep1,name2,sweep2...) simultaneously specifies sweep values for multiple registered test parameters.
Returns test parameter sweep values.
getTestParameterSweepValues(h,name) gets the sweep values currently specified for the registered test parameter, name, in the test console, h.
Returns the test parameter valid ranges.
getTestParameterValidRanges(h,name) gets the valid ranges for a registered test parameter, name, in the test console, h.
Registers a test point.
registerTestPoint(h, name, actprobe,expprobe) registers a new test point object, name, to the error rate test console, h. The test point must contain a pair of registered test probes, actprobe, and expprobe. actprobe contains actual data, and expprobe contains expected data. The object compares the data from these probes and obtains error rate values. The error rate calculation uses a default error rate calculator function that simply performs one-to-one comparisons of the data vectors available in the probes.
registerTestPoint(h, name, actprobe,expprobe, handle) adds the handle, handle, to a user-defined error calculation function that compares the data in the probes and then obtains error rate results.
The user-defined error calculation function must comply with the following syntax: [ecnt tcnt] = functionName(act, exp, udata) where
ecnt output corresponds to the error count
tcnt output is the number of transmissions used to obtain the error count
act and exp correspond to actual and expected data
The error rate test console sets the inputs to the data available in the pair of test point probes, actprobe, and expprobe.
udata is a data input that the system under test passes to the test console at run time, using the setUserData method. udata contains the data necessary to compute errors, such as delays and data buffers.
The error rate test console passes the data that the system under test logs to the error calculation functions for all the registered test points. Calling the info method returns the names of the registered test points and the error rate calculator functions associated with them. It also returns the names of the registered test probes.
Unregister a test point.
unregisterTestPoint(h,name) removes the test point, name, from the test console, h.