Documentation

xPCTargetPC Class

Access target computer

Syntax

public xPCTargetPC()

Description

Namespace: MathWorks.xPCTarget.FrameWork

Syntax Language: C#

public xPCTargetPC() initializes a new instance of the xPCTargetPC class.

Note

RS-232 communication type has been removed. Configure TCP/IP communication instead.

Constructor

ConstructorDescription
xPCTargetPCConstruct xPCTargetPC object.

Methods

MethodDescription
xPCTargetPC.ConnectEstablish connection to target computer
xPCTargetPC.ConnectAsyncAsynchronous request for target computer connection
xPCTargetPC.DisconnectDisconnect from target computer
xPCTargetPC.DisconnectAsyncAsynchronous request to disconnect from target computer
xPCTargetPC.DisposeClean up used resources
xPCTargetPC.LoadLoad real-time application onto target computer
xPCTargetPC.LoadAsyncAsynchronous request to load real-time application onto target computer
xPCTargetPC.PingTest communication between development and target computers
xPCTargetPC.RebootRestart target computer
xPCTargetPC.RebootAsyncAsynchronous request to restart target computer
xPCTargetPC.tcpPingDetermine TCP/IP accessibility of remote computer
xPCTargetPC.UnloadUnload real-time application from target computer
xPCTargetPC.UnloadAsyncAsynchronous request to unload real-time application from target computer

Events

EventDescription
xPCTargetPC.ConnectCompletedEvent when xPCTargetPC.ConnectAsync is complete
xPCTargetPC.ConnectedEvent after xPCTargetPC.Connect is complete
xPCTargetPC.ConnectingEvent before xPCTargetPC.Connect starts
xPCTargetPC.DisconnectCompletedEvent when xPCTargetPC.DisconnectAsync is complete
xPCTargetPC.DisconnectedEvent after xPCTargetPC.Disconnect is complete
xPCTargetPC.DisconnectingEvent before xPCTargetPC.Disconnect starts
xPCTargetPC.DisposedEvent after xPCTargetPC.Dispose is complete
xPCTargetPC.LoadCompletedEvent when xPCTargetPC.LoadAsync is complete
xPCTargetPC.LoadedEvent after xPCTargetPC.Load is complete
xPCTargetPC.LoadingEvent before xPCTargetPC.Load starts
xPCTargetPC.RebootCompletedEvent when xPCTargetPC.RebootAsync is complete
xPCTargetPC.RebootedEvent after xPCTargetPC.Reboot is complete
xPCTargetPC.RebootingEvent before xPCTargetPC.Reboot starts
xPCTargetPC.UnloadCompletedEvent when xPCTargetPC.UnloadAsync is complete
xPCTargetPC.UnloadedEvent after xPCTargetPC.Unload is complete
xPCTargetPC.UnloadingEvent before xPCTargetPC.Unload starts

Properties

PropertyC# Declaration SyntaxDescriptionException

AppFileName

public string AppFileName {get; set;}

Get or set the full path name to the real-time application, without file extension.

 

Application

public xPCApplication Application {get;}

Get reference to an xPCApplication object that you can use to interface with the real-time application. If no communication is established, the property returns a NULL object.

 

CommunicationTimeOut

public int CommunicationTimeOut {get; set;}

Get or set the communication timeout in seconds.

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

Component

public IComponent Component {get;}

Get component associated with the ISite when implemented by a class.

 

Container

public IContainer Container {get;}

Get the IContainer associated with the ISite when implemented by a class.

 

ContainerControl

public ContainerControl ContainerControl {get; set;}

Provide focus-management functionality for controls that can function as containers for other controls.

 

DLMFileName

public string DLMFileName {get; set;}

Get or set the full path to the DLM file name.

Note

AppFileName has superseded this property.

 

Echo

public bool Echo {get; set;}

Get or set the target display on the target computer.

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

FileSystem

public xPCFileSystem FileSystem {get;}

Get a reference to an xPCFileSystem object that you can use to interface with the target file system. If no communication is established, the property returns a NULL object.

 

HostTargetComm

public XPCProtocol HostTargetComm {get; set;}

Get or set the physical medium for communication. See xPCProtocol Enumerated Data Type.

Setting HostTargetComm to RS232 has no effect. Value remains set to TCPIP.

 

IsConnected

public bool IsConnected {get;}

Get connection status (established or not) to a remote target computer.

 

IsConnectingBusy

public bool IsConnectingBusy {get;}

Get ConnectAsync request status (in progress or not).

 

IsDisconnectingBusy

public bool IsDisconnectingBusy {get;}

Get whether a DisconnectAsync request is in progress.

 

IsLoadingBusy

public bool IsLoadingBusy {get;}

Gets LoadAsync request status (in progress or not).

 

IsRebootingBusy

public bool IsRebootingBusy {get;}

Get RebootAsync request status (in progress or not).

 

IsUnloadingBusy

public bool IsUnloadingBusy {get;}

Gets unLoadingAsync request status (in progress or not).

 

SessionTime

public double SessionTime {get;}

Get the length of time Simulink® Real-Time™ kernel has been running on the target computer.

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

Site

public ISite Site {get; set;}

Get or set site of the control.

 

TargetPCName

public string TargetPCName {get; set;}

Get or set a value indicating the target computer name associated with the target computer.

 

TcpIpTargetAddress

public string TcpIpTargetAddress {get; set;}

Get or set a valid IP address for your target computer.

 

TcpIpTargetPort

public string TcpIpTargetPort {get; set;}

Get or set the TCP/IP target port. The default is 22222. This number is higher than the reserved area (for example, the port numbers reserved for telnet or ftp). The software uses this value only for the target computer.

 

Introduced in R2011b

Was this topic helpful?