Documentation

xPCApplication Class

Access to real-time application loaded on target computer

Syntax

public sealed class xPCApplication : xPCBaseNotification

Description

Namespace: MathWorks.xPCTarget.FrameWork

Syntax Language: C#

public sealed class xPCApplication : xPCBaseNotification initializes a new instance of the xPCApplication class.

Methods

MethodDescription
xPCApplication.StartStart real-time application execution
xPCApplication.StopStop real-time application execution

Events

EventsDescription
xPCApplication.StartedEvent after xPCApplication.Start is complete
xPCApplication.StartingEvent before xPCApplication.Start executes
xPCApplication.StoppedEvent after xPCApplication.Stop is complete
xPCApplication.StoppingEvent before xPCApplication.Stop executes

Properties

PropertiesC# Declaration SyntaxDescriptionException

AverageTeT

public double AverageTeT {get;}

Get the average task execution time. The first element contains the average TET number; the second element contains how long it took to achieve the TET time.

Task execution time (TET) measures how long it takes the kernel to run for one base-rate time step. For a multirate model, use the profiler to find out what the execution time is for each rate.

xPCException — When problem occurs, query xPCException object Reason property.

CPUOverload

public bool CPUOverload {get;}

Get state of CPU overload flag.

xPCException — When problem occurs, query xPCException object Reason property.

ExecTime

public double ExecTime {get;}

Get execution time.

xPCException — When problem occurs, query xPCException object Reason property.

Logger

public xPCAppLogger Logger {get;}

Get reference to the real-time application logging object.

 

MaximumTeT

public double MaximumTeT {get;}

Get the maximum task execution time. The first element contains the maximum TET number; the second element contains how long it took to achieve the TET time.

xPCException — When problem occurs, query xPCException object Reason property.

MinimumTeT

public double MinimumTeT {get;}

Get the minimum task execution time. The first element contains the minimum TET number; the second element contains how long it took to achieve the TET time.

xPCException — When problem occurs, query xPCException object Reason property.

Name

public string Name {get;}

Get the current name of the loaded real-time application

xPCException — When problem occurs, query xPCException object Reason property.

Parameters

public xPCParameters Parameters {get;}

Get reference to the xPCParameters object.

 

SampleTime

public double SampleTime {get; set;}

Get or set sample time.

Note

Some blocks produce incorrect results when you change their sample time at run time. If you include such blocks in your model, the software displays a warning message during model build. To avoid incorrect results, change the sample time in the original model, and then rebuild and download the model.

xPCException — When problem occurs, query xPCException object Reason property.

Scopes

public xPCScopes Scopes {get;}

Get collection of scopes assigned to the real-time application.

 

Signals

public xPCSignals Signals {get;}

Get reference to xPCSignals object.

 

Status

public xPCAppStatus Status {get;}

Get simulation status. See xPCAppStatus Enumerated Data Type.

xPCException — When problem occurs, query xPCException object Reason property.

StopTime

public double StopTime {get; set;}

Get and set stop time.

xPCException — When problem occurs, query xPCException object Reason property.

Target

public xPCTargetPC Target {get;}

Get reference to parent xPCTargetPC object.

 

Introduced in R2011b

Was this topic helpful?