Studio:Transport Server Component: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| OnConnect()  
| '''OnConnect()'''
| Method/Event  
| Method/Event  
| Fired when the transport connection state changes from disconnected to connected.
| Fired when the transport connection state changes from disconnected to connected.
|-
|-
| OnDisconnect()  
| '''OnDisconnect ()'''
| Method/Event  
| Method/Event  
| Fired when the transport connection state changes from connected to disconnected.
| Fired when the transport connection state changes from connected to disconnected.
|-
|-
| OnEvent(string message)  
| '''OnEvent('''String message ''')'''
| Method/Event  
| Method/Event  
| Fired when there is a reportable event in the transport communication.
| Fired when there is a reportable event in the transport communication.
Line 49: Line 49:
{| class="FCK__ShowTableBorders" border="0"
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| bool Connect(
| '''bool Connect('''
|-
|-
| &nbsp;&nbsp;&nbsp;int timeout[optional],
| &nbsp;&nbsp;&nbsp;int timeout[optional],
|-
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
| &nbsp;&nbsp;&nbsp;bool* stat''')'''
|}
|}


Line 62: Line 62:
{| class="FCK__ShowTableBorders" border="0"
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| bool ConnectAsync(
| '''bool ConnectAsync('''
|-
|-
| &nbsp;&nbsp;&nbsp;bool monitor[optional],
| &nbsp;&nbsp;&nbsp;bool monitor[optional],
Line 70: Line 70:
| &nbsp;&nbsp;&nbsp;int runtimeTimeout,
| &nbsp;&nbsp;&nbsp;int runtimeTimeout,
|-
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
| &nbsp;&nbsp;&nbsp;bool* stat''')'''
|}
|}


Line 83: Line 83:
{| class="FCK__ShowTableBorders" border="0"
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| bool Disconnect(
| '''bool Disconnect('''
|-
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
| &nbsp;&nbsp;&nbsp;bool* stat''')'''
|}
|}


Line 94: Line 94:
{| class="FCK__ShowTableBorders" border="0"
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| bool DisconnectAsync(
| '''bool DisconnectAsync('''
|-
|-
| &nbsp;&nbsp;&nbsp;bool* stat)
| &nbsp;&nbsp;&nbsp;bool* stat''')'''
|}
|}


Line 204: Line 204:
{| class="FCK__ShowTableBorders" border="0"
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| HRESULT Load(
| '''HRESULT Load('''
|-
|-
| &nbsp;&nbsp;&nbsp;BSTR FullPath,
| &nbsp;&nbsp;&nbsp;BSTR FullPath,
|-
|-
| &nbsp;&nbsp;&nbsp;bool stat)
| &nbsp;&nbsp;&nbsp;bool stat''')'''
|}
|}


Line 230: Line 230:
{| class="FCK__ShowTableBorders" border="0"
{| class="FCK__ShowTableBorders" border="0"
|-
|-
| HRESULT Unload(
| '''HRESULT Unload('''
|-
|-
| &nbsp;&nbsp;&nbsp;bool stat)
| &nbsp;&nbsp;&nbsp;bool stat''')'''
|}
|}


Line 250: Line 250:
|-
|-
| Sent  
| Sent  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of loopbacks attempted.
| Contains the number of loopbacks attempted.
|-
|-
| DataErrors  
| DataErrors  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of data errors.
| Contains the number of data errors.
|-
|-
| TimeoutErrors  
| TimeoutErrors  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of timeout errors.
| Contains the number of timeout errors.
|-
|-
| Interval  
| Interval  
| Property,<br>unsigned long
| Property,<br>unsigned long  
| The interval value in milliseconds.
| The interval value in milliseconds.
|-
|-
| Timeout  
| Timeout  
| Property,<br>unsigned long
| Property,<br>unsigned long  
| The timeout value in milliseconds.
| The timeout value in milliseconds.
|-
|-
| HResult Start(bool* pVal)  
| '''HResult Start('''<br>bool* pVal''')'''
| Method  
| Method  
| Start the loopback processing.
| Start the loopback processing.
|-
|-
| HResult Stop(bool* pVal)  
| '''HResult Stop('''<br>bool* pVal''')'''
| Method  
| Method  
| Stops&nbsp;the loopback processing.
| Stops&nbsp;the loopback processing.
Line 289: Line 289:
|-
|-
| Enabled  
| Enabled  
| Property,<br>bool
| Property,<br>bool  
| Turns the runtime ping messages on or off. This setting is persisted and restored automatically.
| Turns the runtime ping messages on or off. This setting is persisted and restored automatically.
|-
|-
| Interval  
| Interval  
| Property,<br>integer
| Property,<br>integer  
| Sets/gets the time interval between ping messages, in milliseconds.
| Sets/gets the time interval between ping messages, in milliseconds.
|-
|-
| RetryCount  
| RetryCount  
| Property,<br>integer
| Property,<br>integer  
| Sets/gets the number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically.
| Sets/gets the number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically.
|-
|-
| Timeout  
| Timeout  
| Property,<br>integer
| Property,<br>integer  
| Sets/gets the timeout value for the ping message in milliseconds. If a response is not received within this time, the ping fails.
| Sets/gets the timeout value for the ping message in milliseconds. If a response is not received within this time, the ping fails.
|}
|}
Line 339: Line 339:
|-
|-
| Sent  
| Sent  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| The number of IBlocks sent.
| The number of IBlocks sent.
|-
|-
| Received  
| Received  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| 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.
Line 362: Line 362:
|-
|-
| Host  
| Host  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Number of Host errors.
| Number of Host errors.
|-
|-
| Target  
| Target  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Number of Target errors.
| Number of Target errors.
|-
|-
| '''HResult Reset (void)'''
| '''HResult Reset (void)'''  
| Method  
| Method  
| Resets the host/target sequence error counts.
| Resets the host/target sequence error counts.
|-
|-
| '''HResult Update (void)'''
| '''HResult Update (void)'''  
| Method  
| Method  
| Updates the host/target error counts.
| Updates the host/target error counts.
Line 389: Line 389:
|-
|-
| MessageQueue  
| MessageQueue  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of message queues.
| Contains the number of message queues.
|-
|-
| Subscribers  
| Subscribers  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of subscribers.
| Contains the number of subscribers.
|-
|-
| EmbeddedPointers  
| EmbeddedPointers  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of embedded pointers.
| Contains the number of embedded pointers.
|-
|-
| STIDs  
| STIDs  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of STIDs.
| Contains the number of STIDs.
|-
|-
| SUIDs  
| SUIDs  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of SUIDs.
| Contains the number of SUIDs.
|-
|-
| SUIDOverrides  
| SUIDOverrides  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of SUID overrides.
| Contains the number of SUID overrides.
|-
|-
| SUIDFilters  
| SUIDFilters  
| Property,<br>'''Read-only''',<br>unsigned long
| Property,<br>'''Read-only''',<br>unsigned long  
| Contains the number of SUID filters.
| Contains the number of SUID filters.
|-
|-
Line 436: Line 436:
|-
|-
| Count  
| Count  
| Property,<br>'''Read-only''',<br>integer
| Property,<br>'''Read-only''',<br>integer  
| Gives the number of transport items in the collection.
| Gives the number of transport items in the collection.
|-
|-
Line 455: Line 455:
|-
|-
| Active  
| Active  
| Property,<br>bool
| Property,<br>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.
| 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
| Property,,<br>'''Read-only''',<br>String  
| Gets the full file path and name for the corresponding transport DLL.
| Gets the full file path and name for the corresponding transport DLL.
|-
|-
| Name  
| Name  
| Property,<br>'''Read-only''',<br>String
| Property,<br>'''Read-only''',<br>String  
| Gets the name of the transport item.
| Gets the name of the transport item.
|-
|-
Line 482: Line 482:
|-
|-
| Count  
| Count  
| Property,<br>'''Read-only''',<br>integer
| Property,<br>'''Read-only''',<br>integer  
| 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|Item('''variant index''')''']]  
| 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.
Line 501: Line 501:
|-
|-
| AllowableValues  
| AllowableValues  
| Property,<br>'''Read-only''',<br>String
| Property,<br>'''Read-only''',<br>String  
| 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.
| 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
| Property,<br>'''Read-only''',<br>String  
| The name of the property item.
| The name of the property item.
|-
|-
| Value  
| Value  
| Property,<br>String
| Property,<br>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.
|}
|}

Revision as of 21:41, 3 July 2008


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.

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.

Automation API

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
OnConnect() Method/Event Fired when the transport connection state changes from disconnected to connected.
OnDisconnect () Method/Event Fired when the transport connection state changes from connected to disconnected.
OnEvent(String message ) Method/Event 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,
Read-Only,
Object
Returns the current active transport object or null if none is active.
bool Connect(
   int timeout[optional],
   bool* 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.
bool ConnectAsync(
   bool monitor[optional],
   int transportTimeout[optional],
   int runtimeTimeout,
   bool* 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 Object Database settings.
bool Disconnect(
   bool* stat)
Method Attempts to disconnect the runtime and the transport from the target. Returns true if successfully disconnected.
bool DisconnectAsync(
   bool* 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,
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.
IsConnected
Property,
bool,
Read-only
Returns the current connection state.
Loopback Object  Loopback settings.
Statistics Object Statistics settings.
TargetRuntimeVersion
Property,
string,
Read-only 
Returns the runtime version string.
Ping Object Ping settings.
Transports Collection Collection of transports.
TransportsLocation
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
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.

transport.Connection.Database

This is the interface for database settings.

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

transport.Connection.Loopback

This is the interface for loopback settings.

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

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,
bool
Turns the runtime ping messages on or off. This setting is persisted and restored automatically.
Interval Property,
integer
Sets/gets the time interval between ping messages, in milliseconds.
RetryCount Property,
integer
Sets/gets the number of allowable ping failures. Once this number if exceeded, the connection will be closed automatically.
Timeout 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.

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.
Target Property,
Read-only,
unsigned long
Number of Target errors.
HResult Reset (void) Method Resets the host/target sequence error counts.
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
MessageQueue Property,
Read-only,
unsigned long
Contains the number of message queues.
Subscribers Property,
Read-only,
unsigned long
Contains the number of subscribers.
EmbeddedPointers Property,
Read-only,
unsigned long
Contains the number of embedded pointers.
STIDs Property,
Read-only,
unsigned long
Contains the number of STIDs.
SUIDs Property,
Read-only,
unsigned long
Contains the number of SUIDs.
SUIDOverrides Property,
Read-only,
unsigned long
Contains the number of SUID overrides.
SUIDFilters Property,
Read-only,
unsigned long
Contains the number of SUID filters.
HResult Reset (void) Method Resets the counts.
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
Count Property,
Read-only,
integer
Gives the number of transport items in the collection.
Item(variant 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,
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 Property,,
Read-only,
String
Gets the full file path and name for the corresponding transport DLL.
Name Property,
Read-only,
String
Gets the name of the transport item.
Properties Collection Collection of properties.

transport.Connection.Transports.Properties

This is the collection of properties for a given transport.

Member
Type
Description
Count Property,
Read-only,
integer
Gives the number of properties in the collection.
Item(variant 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
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 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.