CommandTransport Class (Windows Embedded CE 6.0)

1/5/2010

Represents a communication mechanism from the desktop application to the smart device application.

Namespace: Microsoft.RemoteToolSdk.PluginComponents
Assembly: Microsoft.RemoteToolSdk (in microsoft.remotetoolsdk.dll)

Syntax

public class CommandTransport
'Declaration
Public Class CommandTransport

Remarks

The T:Microsoft.RemoteToolSdk.PluginComponents.CommandPacket object is used to define the blob of data sent on this CommandTransport.

There are four different ways CommandPacket objects can be trasmitted:

  • M:Microsoft.RemoteToolSdk.PluginComponents.CommandTransport.ProcessCommand(Microsoft.RemoteToolSdk.PluginComponents.CommandPacket, Microsoft.RemoteToolSdk.PluginComponents.PluginData)

    A CommandPacket is sent from the desktop app to the device app. The device app fills out a return CommandPacket, and the desktop app recieves this "return value". This is a synchronous call, the code on the desktop will block until the device app returns a value. Think of it as a method call with a return value.

  • M:Microsoft.RemoteToolSdk.PluginComponents.CommandTransport.SendCommand(Microsoft.RemoteToolSdk.PluginComponents.CommandPacket, Microsoft.RemoteToolSdk.PluginComponents.PluginData)

    A CommandPacket is sent from the desktop app to the device app. This call is asynchronous; program control immediately returns to the code calling SendCommand. The device side app does not return a value. Think of it as an asynchronus method call with a void return value.

  • M:Microsoft.RemoteToolSdk.PluginComponents.CommandTransport.ReceiveCommand(Microsoft.RemoteToolSdk.PluginComponents.PluginData)

    The desktop app will wait for a command packet to arrive from the device. This call is synchronous; program control blocks until the device app sends a command. If you want to receive commands asynchronously, use the CommandReceived event.

  • E:Microsoft.RemoteToolSdk.PluginComponents.CommandTransport.CommandReceived

    This event is fired when a CommandPacket is recevied from the device app. Your code can set an event handler to be notified when packets arrive. Since this is asynchronous, this is the preferred method.

Inheritance Hierarchy

System.Object
  Microsoft.RemoteToolSdk.PluginComponents.CommandTransport

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

CommandTransport Members
Microsoft.RemoteToolSdk.PluginComponents Namespace