Studio:Transport Server Component: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
m (Text replace - 'Category:Reference' to 'Category:Studio:Reference')
 
(83 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__FORCETOC__  
__FORCETOC__  
== The Host Transport Services  ==
The Host Transport Services define an interface that enables the STRIDE Runtime on your host to send data to and receive data from the target. The STRIDE Transport Server connects the Transport DLL to the STRIDE Runtime running on the host platform, thus providing indirect access to the target from [[STRIDE Studio]], [[AutoScript]], and other STRIDE applications. Several common transports are already supported within the STRIDE Transport Server, including serial and TCP/IP.
[[Image:Transport diagram.gif|center|Host Transport Services Diagram]]
The Host Transport Services are defined in "transport.h" and each Transport DLL must implement the interfaces derived from the IStrideTransport class.
Refer to the [[Media:s2sTransport.pdf|STRIDE Host Runtime Transport Specification]] document for a more detailed description of the Host Transport Services.


== The Transport Server  ==
== The Transport Server  ==


The Transport Server fields client requests to a target. The client communicates to the Transport Server. The Transport Server communicates to the target runtime of a target.  
The Transport Server is an out-of-process COM server that fields client requests to a target and provides connection management, loopback and diagnostic features. The client communicates to the Transport Server. The Transport Server communicates to the target runtime of a target.  
 
To access the transport server, a client first registers with to it using a process id (PID). This is done transparently for script clients using the script wrapper named '''STRIDE.transport'''. In JScript getting ahold of the transport server may be done as follows:
 
<source lang="javascript">
var tpserver = new ActiveXObject("STRIDE.transport");
</source>
 
== Transport Server API  ==
This section contains all the applicable API to reference transport server functionality.
=== transport  ===
This is the root-level object. It provides direct access to the top-level transport objects.
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
| width="190" bgcolor="#66ff99" | '''Member'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
| HRESULT '''Init ('''<br>&nbsp;&nbsp;long ProcessId,<br>&nbsp;&nbsp;boolean pVal<br>''')'''
| Method
| Method to initialize the transport server.
|-
| HRESULT '''Terminate ('''<br>&nbsp;&nbsp;long ProcessId<br>''')'''
| Method
| Method to terminate the transport server.
|-
| [[Transport Server Component#transport.Connection|Connection]]
| Property,<br>'''Read-only''',<br>Object
| The Connection object.
|}


To access the transport server, a client first registers with to it using a process id (PID). This is done transparently for script clients using the script wrapper named '''STRIDE.transport'''.
<br>


=== Automation API  ===


=== transport._TSEvents  ===
==== transport._TSEvents  ====


This is an outgoing connection point interface that is optionally implemented by clients that wish to be notified of connection related events.  
This is an outgoing connection point interface that is optionally implemented by clients that wish to be notified of connection related events.  
Line 15: Line 53:
{| cellspacing="0" cellpadding="10" width="100%" border="1"
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="190" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| OnConnect()  
| HRESULT '''OnConnect (void)'''
| Method/Event
| Method  
| Fired when the transport connection state changes from disconnected to connected.
| Event method fired when the transport connection state changes from disconnected to connected.
|-
|-
| OnDisconnect()  
| HRESULT '''OnDisconnect (void)'''
| Method/Event
| Method  
| Fired when the transport connection state changes from connected to disconnected.
| Event method fired when the transport connection state changes from connected to disconnected.
|-
|-
| OnEvent(string message)  
| HRESULT '''OnEvent ('''<br>&nbsp;&nbsp; TSEventType type,<br>&nbsp;&nbsp; TSEventLevel level,<br>&nbsp;&nbsp; String message<br>''')'''
| Method/Event
| Method  
| Fired when there is a reportable event in the transport communication.
| Event method fired when there is a reportable event in the transport communication.
|}
|}


=== transport.Connection  ===
<br>
 
==== transport.Connection  ====


This is the root object for all connection-related functionality.  
This is the root object for all connection-related functionality.  
Line 38: Line 78:
{| cellspacing="0" cellpadding="10" width="100%" border="1"
{| cellspacing="0" cellpadding="10" width="100%" border="1"
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="190" bgcolor="#66ff99" | '''Member'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| [[Transport Server Component#transport.Connection.Transports.Item|ActiveTransport]]  
| [[Transport Server Component#transport.Connection.Transports.Item|ActiveTransport]]  
| Property,<br>'''Read-Only''',<br>Object  
| Property,<br>Object
| Returns the current active transport object or null if none is active.
| Contains the current active transport object or null if none is active.
|-
|
{| class="FCK__ShowTableBorders" border="0"
|-
| bool Connect(
|-
| &nbsp;&nbsp;&nbsp;int timeout[optional],
|-
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
| boolean '''Connect ('''<br>&nbsp;&nbsp; int timeout [optional],<br>&nbsp;&nbsp; boolean* stat<br>''')'''
|}
 
| Method  
| Method  
| Attempts to create a runtime connection to a target using the active transport. The timeout value (in milliseconds) is passed to the runtime connection request and it fails if timeout is exceeded. Default timeout is 5 seconds (5000). Returns true if connection succeeded, false if either the transport or runtime connection failed.
| Attempts to create a runtime connection to a target using the active transport. The timeout value (in milliseconds) is passed to the runtime connection request and it fails if timeout is exceeded. Default timeout is 5 seconds (5000). Returns true if connection succeeded, false if either the transport or runtime connection failed.
|-
|-
|  
| boolean '''ConnectAsync ('''<br>&nbsp;&nbsp;&nbsp;boolean monitor[optional],<br>&nbsp;&nbsp;&nbsp;int transportTimeout[optional],<br>&nbsp;&nbsp;&nbsp;int runtimeTimeout,<br>&nbsp;&nbsp;&nbsp;boolean* stat<br>''')'''
{| class="FCK__ShowTableBorders" border="0"
|-
| bool ConnectAsync(
|-
| &nbsp;&nbsp;&nbsp;bool monitor[optional],
|-
| &nbsp;&nbsp;&nbsp;int transportTimeout[optional],
|-
| &nbsp;&nbsp;&nbsp;int runtimeTimeout,
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
|}
 
| Method  
| Method  
| Makes an asynchronous connection request. A background thread is started to attempt to establish the connection. If monitor is true, the thread will run continuously and attempt to reconnect whenever the connection is lost. If monitor is false (the default) the background thread will exit once a connection is initially established.
| Makes an asynchronous connection request. A background thread is started to attempt to establish the connection. If monitor is true, the thread will run continuously and attempt to reconnect whenever the connection is lost. If monitor is false (the default) the background thread will exit once a connection is initially established.
|-
|-
| [[Transport Server Component#transport.Connection.Database|Database]]  
| [[Transport Server Component#transport.Connection.Database|Database]]  
| Object  
| Property,<br>Object
| Database settings.
| Database settings.
|-
|-
|  
| boolean '''Disconnect ('''<br>&nbsp;&nbsp;&nbsp;boolean* stat <br>''')'''
{| class="FCK__ShowTableBorders" border="0"
|-
| bool Disconnect(
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
|}
 
| Method  
| Method  
| Attempts to disconnect the runtime and the transport from the target. Returns true if successfully disconnected.
| Attempts to disconnect the runtime and the transport from the target. Returns true if successfully disconnected.
|-
|-
|  
| boolean '''DisconnectAsync ('''<br>&nbsp;&nbsp;&nbsp;boolean* stat<br>''')'''
{| class="FCK__ShowTableBorders" border="0"
|-
| bool DisconnectAsync(
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
|}
 
| Method  
| Method  
| Initiates the request to disconnect from the target, but does not wait fo an acknowledgement of the disconnect request from runtime. Returns true if disconnect request initiated.
| Initiates the request to disconnect from the target, but does not wait fo an acknowledgement of the disconnect request from runtime. Returns true if disconnect request initiated.
|-
|-
| IBlockDataDump  
| IBlockDataDump  
|
| Property,<br>boolean
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| bool
|}
 
| Turns IBlock dumps on or off. Default is off. If enabled, all IBlocks that are sent and received will be dumped to the STRIDE application log and to a predefined tracepoint.
| Turns IBlock dumps on or off. Default is off. If enabled, all IBlocks that are sent and received will be dumped to the STRIDE application log and to a predefined tracepoint.
|-
|-
| IsConnected  
| IsConnected  
|
| Property,<br>'''Read-only''',<br>boolean
{| class="FCK__ShowTableBorders" border="0"
| Contains true if transport server is connected.
|-
| Property,
|-
| bool,
|-
| '''Read-only'''
|}
 
| Returns the current connection state.
|-
|-
| [[Transport Server Component#transport.Connection.Loopback|Loopback]]  
| [[Transport Server Component#transport.Connection.Loopback|Loopback]]  
| Object&nbsp;
| Property,<br>Object  
| Loopback settings.
| Loopback settings.
|-
| [[Transport Server Component#transport.Connection.Ping|Ping]]
| Property,<br>Object
| Ping settings.
|-
|-
| [[Transport Server Component#transport.Connection.Statistics|Statistics]]  
| [[Transport Server Component#transport.Connection.Statistics|Statistics]]  
| Object  
| Property,<br>Object
| Statistics settings.
| Statistics settings.
|-
|-
| TargetRuntimeVersion  
| TargetRuntimeVersion  
|
| Property,<br>String
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| string,
|-
| '''Rea<span id="fck_dom_range_temp_1214607482948_341"></span><span id="fck_dom_range_temp_1214607482948_478"></span>d-only'''&nbsp;
|}
 
| Returns the runtime version string.
| Returns the runtime version string.
|-
|-
| [[Transport Server Component#transport.Connection.Ping|Ping]]
| TransportDataDump
| Object
| Property,<br>boolean
| Ping settings.
| Turns raw data dumps on or off. Default is off. If enabled, all SLAP messages that are sent and received by the transport will be dumped to the STRIDE application log and to a predefined tracepoint.
|-
|-
| [[Transport Server Component#transport.Connections.Transports|Transports]]  
| [[Transport Server Component#transport.Connection.Transports|Transports]]  
| Collection  
| Collection  
| Collection of transports.
| Collection of transports.
|-
|-
| TransportsLocation  
| TransportsLocation  
|
| Property,<br>String
{| class="FCK__ShowTableBorders" border="0"
| The current directory for transport DLLs. Changing this value will immediately change the values in the Transports collection and will cause the current connection (if any) to be closed.
|-
| Property,
|-
| string
|}
 
| Sets/gets the current directory for transport DLLs. Changing this value will immediately change the values in the Transports collection and will cause the current connection (if any) to be closed.
|-
| TransportDataDump
|
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| bool
|}
|}


| Turns raw data dumps on or off. Default is off. If enabled, all SLAP messages that are sent and received by the transport will be dumped to the STRIDE application log and to a predefined tracepoint.
<br>
|}


=== transport.Connection.Database  ===
===== transport.Connection.Database  =====


This is the interface for database settings.  
This is the interface for database settings.  
Line 185: Line 152:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| IsLoaded&nbsp;
| IsLoaded  
|
| Property,<br>'''Read-only''',<br>boolean
{| class="FCK__ShowTableBorders" border="0"
| Contains true if the database is loaded.
|-
| Property,
|-
| bool,
|-
| '''Read-only'''
|}
 
| Returns true if the database is loaded.
|-
|
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| HRESULT Load(
| HRESULT '''Load ('''<br>&nbsp;&nbsp;&nbsp;String FullPath,<br>&nbsp;&nbsp;&nbsp;boolean stat<br>''')'''
|-
| &nbsp;&nbsp;&nbsp;BSTR FullPath,
|-
| &nbsp;&nbsp;&nbsp;bool stat)
|}
 
| Method  
| Method  
| Loads the database.
| Loads the database.
|-
|-
| Path&nbsp;  
| Path&nbsp;  
|
| Property,<br>'''Read-only''',<br>String
{| class="FCK__ShowTableBorders" border="0"
| Contains the path to the database.
|-
| Property,
|-
| string
|-
| '''Read-only'''
|}
 
| Returns the path to the database.
|-
|-
|
| HRESULT '''Unload ('''<br>&nbsp;&nbsp;&nbsp;boolean stat<br>''')'''
{| class="FCK__ShowTableBorders" border="0"
|-
| HRESULT Unload(
|-
| &nbsp;&nbsp;&nbsp;bool stat)
|}
 
| Method  
| Method  
| Unloads the database.
| Unloads the database.
|}
|}


=== transport.Connection.Loopback  ===
<br>
 
===== transport.Connection.Loopback  =====


This is the interface for loopback settings.  
This is the interface for loopback settings.  
Line 246: Line 181:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
| Sent
|
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
| Contains the number of loopbacks attempted.
|-
|-
| DataErrors  
| DataErrors  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| Contains the number of data errors.
| Contains the number of data errors.
|-
| TimeoutErrors
|
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
| Contains the number of timeout errors.
|-
|-
| Interval  
| Interval  
|
| Property,<br>unsigned long  
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|}
 
| The interval value in milliseconds.
| The interval value in milliseconds.
|-
|-
| Timeout
| Sent
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
| Contains the number of loopbacks attempted.
|-
| Property,
|-
|-
| unsigned long
| HRESULT '''Start ('''<br>&nbsp;&nbsp; boolean* pVal<br>''')'''
|}
 
| The timeout value in milliseconds.
|-
| HResult Start(bool* pVal)  
| Method  
| Method  
| Start the loopback processing.
| Start the loopback processing.
|-
|-
| HResult Stop(bool* pVal)  
| HRESULT '''Stop ('''<br>&nbsp;&nbsp; boolean* pVal<br>''')'''
| Method  
| Method  
| Stops&nbsp;the loopback processing.
| Stops&nbsp;the loopback processing.
|-
| Timeout
| Property,<br>unsigned long
| The timeout value in milliseconds.
|-
| TimeoutErrors
| Property,<br>'''Read-only''',<br>unsigned long
| Contains the number of timeout errors.
|}
|}


=== transport.Connection.Ping  ===
<br>
 
===== transport.Connection.Ping  =====


This is the interface for ping settings. All ping settings are automatically persisted in the registry and restored when the transport server is instantiated.  
This is the interface for ping settings. All ping settings are automatically persisted in the registry and restored when the transport server is instantiated.  
Line 326: Line 222:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Enabled  
| Enabled  
|
| Property,<br>boolean
{| class="FCK__ShowTableBorders" border="0"
| Runtime switch to turn ping messages on or off. This setting is persisted and restored automatically.
|-
| Property,
|-
| bool
|}
 
| Turns the runtime ping messages on or off. This setting is persisted and restored automatically.
|-
|-
| Interval  
| Interval  
|
| Property,<br>int
{| class="FCK__ShowTableBorders" border="0"
| The time interval between ping messages, in milliseconds.
|-
| Property,
|-
| integer
|}
 
| Sets/gets the time interval between ping messages, in milliseconds.
|-
|-
| RetryCount  
| RetryCount  
|
| Property,<br>int
{| class="FCK__ShowTableBorders" border="0"
| The number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically.
|-
| Property,
|-
| integer
|}
 
| Sets/gets the number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically.
|-
|-
| Timeout  
| Timeout  
|
| Property,<br>int
{| class="FCK__ShowTableBorders" border="0"
| The timeout value for the ping message in milliseconds. If a response is not received within this time, the ping fails.
|-
| Property,
|-
| integer
|}
|}


| Sets/gets the timeout value for the ping message in milliseconds. If a response is not received within this time, the ping fails.
<br>
|}


=== transport.Connection.Statistics  ===
===== transport.Connection.Statistics  =====


This is the interface for statistic settings.  
This is the interface for statistic settings.  
Line 381: Line 251:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
Line 397: Line 267:
|}
|}


=== transport.Connection.Statistics.IBlocks  ===
<br>
 
====== transport.Connection.Statistics.IBlocks  ======


This is the interface for IBlock settings.  
This is the interface for IBlock settings.  
Line 404: Line 276:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Sent  
| Sent  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| The number of IBlocks sent.
| The number of IBlocks sent.
|-
|-
| Received  
| Received  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| The number of IBlocks received.
| The number of IBlocks received.
|-
|-
| HResult Reset()  
| HRESULT '''Reset (void)'''
| Method  
| Method  
| Resets the counts to zero.
| Resets the counts to zero.
|}
|}


=== transport.Connection.Statistics.SequenceErrors  ===
<br>
 
====== transport.Connection.Statistics.SequenceErrors  ======


This is the interface for sequence error settings.  
This is the interface for sequence error settings.  
Line 445: Line 301:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Host  
| Host  
|  
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
| Number of Host errors.
|-
|-
| Property,
| HRESULT '''Reset (void)'''  
|-
| Method
| unsigned long
| Resets the host/target sequence error counts.
|-
| '''Read-only'''
|}
 
| Number of Host errors.
|-
|-
| Target  
| Target  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| Number of Target errors.
| Number of Target errors.
|-
|-
| HResult Reset()
| HRESULT '''Update (void)'''
| Method
| Resets the host/target sequence error counts.
|-
| HResult Update()  
| Method  
| Method  
| Updates the host/target error counts.
| Updates the host/target error counts.
|}
|}


=== transport.Connection.Statistics.TargetResources  ===
<br>
 
====== transport.Connection.Statistics.TargetResources  ======


This is the interface for the target resource settings  
This is the interface for the target resource settings  
Line 490: Line 330:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
| EmbeddedPointers
| Property,<br>'''Read-only''',<br>unsigned long
| Contains the number of embedded pointers.
|-
|-
| MessageQueue  
| MessageQueue  
|  
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
| Contains the number of message queues.
|-
|-
| Property,
| HRESULT '''Reset (void)'''
| Method
| Resets the counts.
|-
|-
| unsigned long
| STIDs
|-
| Property,<br>'''Read-only''',<br>unsigned long
| '''Read-only'''
| Contains the number of STIDs.
|}
 
| Contains the number of message queues.
|-
|-
| Subscribers  
| Subscribers  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| Contains the number of subscribers.
| Contains the number of subscribers.
|-
| EmbeddedPointers
|
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
| Contains the number of embedded pointers.
|-
| STIDs
|
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
| Contains the number of STIDs.
|-
|-
| SUIDs  
| SUIDs  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| Contains the number of SUIDs.
| Contains the number of SUIDs.
|-
| SUIDOverrides
|
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
| Contains the number of SUID overrides.
|-
|-
| SUIDFilters  
| SUIDFilters  
|
| Property,<br>'''Read-only''',<br>unsigned long
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| unsigned long
|-
| '''Read-only'''
|}
 
| Contains the number of SUID filters.
| Contains the number of SUID filters.
|-
|-
| HResult Reset()
| SUIDOverrides
| Method
| Property,<br>'''Read-only''',<br>unsigned long
| Resets the counts.
| Contains the number of SUID overrides.
|-
|-
| HResult Update()  
| HRESULT '''Update (void)'''
| Method  
| Method  
| Updates the counts to their current value.
| Updates the counts to their current value.
|}
|}


=== transport.Connection.Transports  ===
<br>
 
===== transport.Connection.Transports  =====


This is the collection of currently available transports.  
This is the collection of currently available transports.  
Line 600: Line 379:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Count  
| int '''Count (void)'''&nbsp;
|
| Property,<br>'''Read-only''',<br>int
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| integer,
|-
| '''Read-only'''
|}
 
| Gives the number of transport items in the collection.
| Gives the number of transport items in the collection.
|-
|-
| [[Transport Server Component#transport.Connection.Transports.Item|Item(variant index)]]
| [[Transport Server Component#transport.Connection.Transports.Item|Transport]]&nbsp;'''Item ('''<br>&nbsp;&nbsp; int Index<br>''')'''
| Method  
| Method  
| Returns the specified transport item. Index can be a zero-based integer value or a string representing the name of the transport. Each transport advertises a unique name via its API and that’s what we use as the string keys. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null.
| Returns the specified transport item. Index can be a zero-based integer value or a string representing the name of the transport. Each transport advertises a unique name via its API and that’s what we use as the string keys. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null.
|}
|}


=== transport.Connection.Transports.Item  ===
<br>
 
====== transport.Connection.Transports.Item  ======


This is the interface associated with each transport object.  
This is the interface associated with each transport object.  
Line 628: Line 400:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Active  
| Active  
|
| Property,<br>boolean
{| class="FCK__ShowTableBorders" border="0"
| The active status of the transport. Only one transport can be active at any given time, so setting this to true for a transport that is not already active will cause the current active transport to be disconnected. Setting this property to true when the item is already active is a no-op.
|-
| Property,
|-
| bool
|}
 
| Sets/gets the active status of the transport. Only one transport can be active at any given time, so setting this to true for a transport that is not already active will cause the current active transport to be disconnected. Setting this property to true when the item is already active is a no-op.
|-
|-
| File  
| File  
|
| Property,<br>'''Read-only''',<br>String
{| class="FCK__ShowTableBorders" border="0"
| The full file path and name for the corresponding transport DLL.
|-
| Property,
|-
| string,
|-
| '''Read-only'''
|}
 
| Gets the full file path and name for the corresponding transport DLL.
|-
|-
| Name  
| Name  
|
| Property,<br>'''Read-only''',<br>String
{| class="FCK__ShowTableBorders" border="0"
| The name of the transport item.
|-
| Property,
|-
| string,
|-
| '''Read-only'''
|}
 
| Gets the name of the transport item.
|-
|-
| [[Transport Server Component#transport.Connection.Transports.Properties|Properties]]  
| [[Transport Server Component#transport.Connection.Transports.Properties|Properties]]  
| Collection  
| Collection  
| Collection of properties.
| Collection of transport properties for this transport.
|}
|}


=== transport.Connection.Transports.Properties  ===
<br>
 
===== transport.Connection.Transports.Properties  =====


This is the collection of properties for a given transport.  
This is the collection of properties for a given transport.  
Line 680: Line 429:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Count  
| int '''Count (void)'''
|
| Property,<br>'''Read-only''',<br>int
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| integer,
|-
| '''Read-only'''
|}
 
| Gives the number of properties in the collection.
| Gives the number of properties in the collection.
|-
|-
| [[Transport Server Component#transport.Connection.Transports.Properties.Item|Item(variant index)]]
| [[Transport Server Component#transport.Connection.Transports.Properties.Item|TransportProperty]] '''Item ('''<br>&nbsp;&nbsp; int Index<br>''')'''
| Method  
| Method  
| Returns the specified property item. Index can be a zero-based integer value or a string representing the name of the property. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null.
| Returns the specified property item. Index can be a zero-based integer value or a string representing the name of the property. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null.
|}
|}


=== transport.Connection.Transports.Properties.Item  ===
<br>
 
====== transport.Connection.Transports.Properties.Item  ======


This is the interface for a specific transport property.  
This is the interface for a specific transport property.  
Line 708: Line 450:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| AllowableValues  
| AllowableValues  
|
| Property,<br>'''Read-only''',<br>String
{| class="FCK__ShowTableBorders" border="0"
| A pipe-delimited string where each delimited value represents an allowable value for the property. Clients might use this to restrict or validate input.
|-
| Property,
|-
| string,
|-
| '''Read-only'''
|}
 
| Gets a pipe-delimited string where each delimited value represents an allowable value for the property. Clients might use this to restrict or validate input.
|-
|-
| Name  
| Name  
|
| Property,<br>'''Read-only''',<br>String
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| string,
|-
| '''Read-only'''
|}
 
| The name of the property item.
| The name of the property item.
|-
|-
| Value  
| Value  
|
| Property,<br>String
{| class="FCK__ShowTableBorders" border="0"
|-
| Property,
|-
| string
|}
 
| The value of the property. When set, the validation method of the transport will be called. Any failures in validation will be returned as exceptions here.
| The value of the property. When set, the validation method of the transport will be called. Any failures in validation will be returned as exceptions here.
|}
|}
[[Category:Studio]]
[[Category:Studio:Reference]]

Latest revision as of 15:56, 21 August 2009


The Host Transport Services

The Host Transport Services define an interface that enables the STRIDE Runtime on your host to send data to and receive data from the target. The STRIDE Transport Server connects the Transport DLL to the STRIDE Runtime running on the host platform, thus providing indirect access to the target from STRIDE Studio, AutoScript, and other STRIDE applications. Several common transports are already supported within the STRIDE Transport Server, including serial and TCP/IP.

Host Transport Services Diagram

The Host Transport Services are defined in "transport.h" and each Transport DLL must implement the interfaces derived from the IStrideTransport class.

Refer to the STRIDE Host Runtime Transport Specification document for a more detailed description of the Host Transport Services.

The Transport Server

The Transport Server is an out-of-process COM server that fields client requests to a target and provides connection management, loopback and diagnostic features. The client communicates to the Transport Server. The Transport Server communicates to the target runtime of a target.

To access the transport server, a client first registers with to it using a process id (PID). This is done transparently for script clients using the script wrapper named STRIDE.transport. In JScript getting ahold of the transport server may be done as follows:

var tpserver = new ActiveXObject("STRIDE.transport");

Transport Server API

This section contains all the applicable API to reference transport server functionality.

transport

This is the root-level object. It provides direct access to the top-level transport objects.

Member
Type
Description
HRESULT Init (
  long ProcessId,
  boolean pVal
)
Method Method to initialize the transport server.
HRESULT Terminate (
  long ProcessId
)
Method Method to terminate the transport server.
Connection Property,
Read-only,
Object
The Connection object.



transport._TSEvents

This is an outgoing connection point interface that is optionally implemented by clients that wish to be notified of connection related events.

Member
Type
Description
HRESULT OnConnect (void) Method Event method fired when the transport connection state changes from disconnected to connected.
HRESULT OnDisconnect (void) Method Event method fired when the transport connection state changes from connected to disconnected.
HRESULT OnEvent (
   TSEventType type,
   TSEventLevel level,
   String message
)
Method Event method fired when there is a reportable event in the transport communication.


transport.Connection

This is the root object for all connection-related functionality.

Member
Type
Description
ActiveTransport Property,
Object
Contains the current active transport object or null if none is active.
boolean Connect (
   int timeout [optional],
   boolean* stat
)
Method Attempts to create a runtime connection to a target using the active transport. The timeout value (in milliseconds) is passed to the runtime connection request and it fails if timeout is exceeded. Default timeout is 5 seconds (5000). Returns true if connection succeeded, false if either the transport or runtime connection failed.
boolean ConnectAsync (
   boolean monitor[optional],
   int transportTimeout[optional],
   int runtimeTimeout,
   boolean* stat
)
Method Makes an asynchronous connection request. A background thread is started to attempt to establish the connection. If monitor is true, the thread will run continuously and attempt to reconnect whenever the connection is lost. If monitor is false (the default) the background thread will exit once a connection is initially established.
Database Property,
Object
Database settings.
boolean Disconnect (
   boolean* stat
)
Method Attempts to disconnect the runtime and the transport from the target. Returns true if successfully disconnected.
boolean DisconnectAsync (
   boolean* stat
)
Method Initiates the request to disconnect from the target, but does not wait fo an acknowledgement of the disconnect request from runtime. Returns true if disconnect request initiated.
IBlockDataDump Property,
boolean
Turns IBlock dumps on or off. Default is off. If enabled, all IBlocks that are sent and received will be dumped to the STRIDE application log and to a predefined tracepoint.
IsConnected Property,
Read-only,
boolean
Contains true if transport server is connected.
Loopback Property,
Object
Loopback settings.
Ping Property,
Object
Ping settings.
Statistics Property,
Object
Statistics settings.
TargetRuntimeVersion Property,
String
Returns the runtime version string.
TransportDataDump Property,
boolean
Turns raw data dumps on or off. Default is off. If enabled, all SLAP messages that are sent and received by the transport will be dumped to the STRIDE application log and to a predefined tracepoint.
Transports Collection Collection of transports.
TransportsLocation Property,
String
The current directory for transport DLLs. Changing this value will immediately change the values in the Transports collection and will cause the current connection (if any) to be closed.


transport.Connection.Database

This is the interface for database settings.

Member
Type
Description
IsLoaded Property,
Read-only,
boolean
Contains true if the database is loaded.
HRESULT Load (
   String FullPath,
   boolean stat
)
Method Loads the database.
Path  Property,
Read-only,
String
Contains the path to the database.
HRESULT Unload (
   boolean stat
)
Method Unloads the database.


transport.Connection.Loopback

This is the interface for loopback settings.

Member
Type
Description
DataErrors Property,
Read-only,
unsigned long
Contains the number of data errors.
Interval Property,
unsigned long
The interval value in milliseconds.
Sent Property,
Read-only,
unsigned long
Contains the number of loopbacks attempted.
HRESULT Start (
   boolean* pVal
)
Method Start the loopback processing.
HRESULT Stop (
   boolean* pVal
)
Method Stops the loopback processing.
Timeout Property,
unsigned long
The timeout value in milliseconds.
TimeoutErrors Property,
Read-only,
unsigned long
Contains the number of timeout errors.


transport.Connection.Ping

This is the interface for ping settings. All ping settings are automatically persisted in the registry and restored when the transport server is instantiated.

Member
Type
Description
Enabled Property,
boolean
Runtime switch to turn ping messages on or off. This setting is persisted and restored automatically.
Interval Property,
int
The time interval between ping messages, in milliseconds.
RetryCount Property,
int
The number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically.
Timeout Property,
int
The timeout value for the ping message in milliseconds. If a response is not received within this time, the ping fails.


transport.Connection.Statistics

This is the interface for statistic settings.

Member
Type
Description
IBlocks Collection Collection of IBlock statistics.
SequenceErrors Collection Collection of Sequence Errors statistics.
TargetResources Collection Collection of Target Resource statistics.


transport.Connection.Statistics.IBlocks

This is the interface for IBlock settings.

Member
Type
Description
Sent Property,
Read-only,
unsigned long
The number of IBlocks sent.
Received Property,
Read-only,
unsigned long
The number of IBlocks received.
HRESULT Reset (void) Method Resets the counts to zero.


transport.Connection.Statistics.SequenceErrors

This is the interface for sequence error settings.

Member
Type
Description
Host Property,
Read-only,
unsigned long
Number of Host errors.
HRESULT Reset (void) Method Resets the host/target sequence error counts.
Target Property,
Read-only,
unsigned long
Number of Target errors.
HRESULT Update (void) Method Updates the host/target error counts.


transport.Connection.Statistics.TargetResources

This is the interface for the target resource settings

Member
Type
Description
EmbeddedPointers Property,
Read-only,
unsigned long
Contains the number of embedded pointers.
MessageQueue Property,
Read-only,
unsigned long
Contains the number of message queues.
HRESULT Reset (void) Method Resets the counts.
STIDs Property,
Read-only,
unsigned long
Contains the number of STIDs.
Subscribers Property,
Read-only,
unsigned long
Contains the number of subscribers.
SUIDs Property,
Read-only,
unsigned long
Contains the number of SUIDs.
SUIDFilters Property,
Read-only,
unsigned long
Contains the number of SUID filters.
SUIDOverrides Property,
Read-only,
unsigned long
Contains the number of SUID overrides.
HRESULT Update (void) Method Updates the counts to their current value.


transport.Connection.Transports

This is the collection of currently available transports.

Member
Type
Description
int Count (void)  Property,
Read-only,
int
Gives the number of transport items in the collection.
Transport Item (
   int Index
)
Method Returns the specified transport item. Index can be a zero-based integer value or a string representing the name of the transport. Each transport advertises a unique name via its API and that’s what we use as the string keys. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null.


transport.Connection.Transports.Item

This is the interface associated with each transport object.

Member
Type
Description
Active Property,
boolean
The active status of the transport. Only one transport can be active at any given time, so setting this to true for a transport that is not already active will cause the current active transport to be disconnected. Setting this property to true when the item is already active is a no-op.
File Property,
Read-only,
String
The full file path and name for the corresponding transport DLL.
Name Property,
Read-only,
String
The name of the transport item.
Properties Collection Collection of transport properties for this transport.


transport.Connection.Transports.Properties

This is the collection of properties for a given transport.

Member
Type
Description
int Count (void) Property,
Read-only,
int
Gives the number of properties in the collection.
TransportProperty Item (
   int Index
)
Method Returns the specified property item. Index can be a zero-based integer value or a string representing the name of the property. As per our usual policy, out-of-range integer indices will generate exceptions and out-of-range string indices will return null.


transport.Connection.Transports.Properties.Item

This is the interface for a specific transport property.

Member
Type
Description
AllowableValues Property,
Read-only,
String
A pipe-delimited string where each delimited value represents an allowable value for the property. Clients might use this to restrict or validate input.
Name Property,
Read-only,
String
The name of the property item.
Value Property,
String
The value of the property. When set, the validation method of the transport will be called. Any failures in validation will be returned as exceptions here.