Studio:Transport Server Component: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__FORCETOC__
__FORCETOC__  
== 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 ==


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'''.  
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.  


=== Automation API ===
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 ===
=== transport._TSEvents ===
This is an outgoing connection point interface that is optionally implemented by clients that wish to be notified of connection related events.


{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffff;"  
This is an outgoing connection point interface that is optionally implemented by clients that wish to be notified of connection related events.
!width="150pt"|'''Option'''
 
!width="120pt"|'''Type'''
{| style="background-color: #ffffff; align: left" cellspacing="0" cellpadding="10" border="1"
!width="350pt"|'''Description'''
|-
| OnConnect()
| Method/Event
| Fired when the transport connection state changes from disconnected to connected.
|-
|-
| OnDisconnect()
! width="150" | '''Option'''
| Method/Event
! width="120" | '''Type'''
| Fired when the transport connection state changes from connected to disconnected.
! width="350" | '''Description'''
|-
|-
| OnEvent(string message)
| OnConnect()
| Method/Event
| Method/Event
| Fired when there is a reportable event in the transport communication.  
| 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 ===
=== transport.Connection ===
This is the root object for all connection-related functionality.


{| border="2" cellpadding="5" cellspacing="0"  
This is the root object for all connection-related functionality.
!width="200pt"|'''Option'''
 
!width="110pt"|'''Type'''
{| cellspacing="0" cellpadding="5" border="2"
!width="300pt"|'''Description'''
|-
|-
| ActiveTransport
! width="220" | '''Option'''
|
! width="110" | '''Type'''
! width="300" | '''Description'''
|-
| ActiveTransport  
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 49: Line 53:
|}
|}
| Returns the current active transport object or null if none is active.
| Returns the current active transport object or null if none is active.
|-  
|-
|
|  
{| border="0"
{| border="0"
|+
|-
| bool Connect(
| bool Connect(
|-
|-
Line 59: Line 63:
|    bool* stat)
|    bool* stat)
|}
|}
| 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.
|-
|-
|
|  
{| border="0"
{| border="0"
|+
|-
| bool ConnectAsync(
| bool ConnectAsync(
|-
|-
Line 75: Line 79:
|    bool* stat)
|    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.
|-
|-
| bool Database
| bool Database  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 88: Line 92:
| TBD.
| TBD.
|-
|-
|
|  
{| border="0"
{| border="0"
|+
|-
| bool Disconnect(
| bool Disconnect(
|-
|-
|    bool* stat)
|    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.
|-
|-
|
|  
{| border="0"
{| border="0"
|+
|-
| bool DisconnectAsync(
| bool DisconnectAsync(
|-
|-
|    bool* stat)
|    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.
|-
|-
| bool ForceBroadcastMessageType()
| bool IBlockDataDump()  
|
|  
{| border="0"
{| border="0"
|+
| Property,
|-
|-
| bool
|}
| This is a runtime option that causes all broadcast messages to be sent to the peer runtime even if no remote subscribers are currently active for the message.
|-
| bool IBlockDataDump()
|
{| border="0"
|+
| Property,
| Property,
|-
|-
Line 128: Line 122:
| 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  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 140: Line 134:
| Returns the current connection state.
| Returns the current connection state.
|-
|-
| bool Loopback
| bool Loopback  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 150: Line 144:
| TBD.
| TBD.
|-
|-
| bool Statistics
| bool Statistics  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 160: Line 154:
| TBD.
| TBD.
|-
|-
| TargetRuntimeVersion
| TargetRuntimeVersion  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 170: Line 164:
| Returns the runtime version string.
| Returns the runtime version string.
|-
|-
| [[Transport_Server_Component#transport.Connection.Ping|Ping]]
| [[Transport Server Component#transport.Connection.Ping|Ping]]  
| subobject
| subobject  
| Ping settings
| Ping settings
|-
|-
| TransportsLocation
| TransportDataDump
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| string
| bool
|}
| 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.
|-
|-
| [[Transport_Server_Component#transport.Connections.Transports|Transports]]
| [[Transport Server Component#transport.Connections.Transports|Transports]]  
| Collection
| Collection  
| Collection of transports  
| Collection of transports
|-
|-
| TransportDataDump
| TransportsLocation
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| bool
| 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.
|}
|}
| 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.  
| 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.Ping ===
=== 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.  


{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffff;" 
{| style="background-color: #ffffff; align: left" cellspacing="0" cellpadding="10" border="1"
!width="110pt"|'''Name'''
|-
!width="100pt"|'''Type'''
! width="110" | '''Name'''  
!width="300pt"|'''Description'''
! width="100" | '''Type'''  
|-  
! width="300" | '''Description'''
| Enabled
|-
|
| Enabled  
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| bool
| 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  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| integer
| integer
|}
|}
| Sets/gets the time interval between ping messages, in milliseconds.
| Sets/gets the time interval between ping messages, in milliseconds.
|-
|-
| RetryCount
| RetryCount  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| integer
| 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  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| integer
| 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.
|}
|}


=== transport.Connections.Transports ===
=== transport.Connections.Transports ===
This is the collection of currently available transports.


{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffff;" 
This is the collection of currently available transports.
!width="110pt"|'''Name'''
 
!width="100pt"|'''Type'''
{| style="background-color: #ffffff; align: left" cellspacing="0" cellpadding="10" border="1"
!width="300pt"|'''Description'''
|-
|-  
! width="110" | '''Name'''  
| Count
! width="100" | '''Type'''  
|
! width="300" | '''Description'''
|-
| Count  
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 266: Line 268:
| '''Read-only'''
| '''Read-only'''
|}
|}
| Gives the number of transport items in the collection.
| Gives the number of transport items in the collection.
|-
|-
| [[Transport_Server_Component#transport.Connections.Transports.Item|Item(variant index)]]
| [[Transport Server Component#transport.Connections.Transports.Item|Item(variant index)]]  
| 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.Connections.Transports.Item ===
=== transport.Connections.Transports.Item ===
This is the interface associated with each transport object.
 
This is the interface associated with each transport object.  


{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffff;" 
{| style="background-color: #ffffff; align: left" cellspacing="0" cellpadding="10" border="1"
!width="110pt"|'''Name'''
|-
!width="100pt"|'''Type'''
! width="110" | '''Name'''  
!width="300pt"|'''Description'''
! width="100" | '''Type'''  
|-  
! width="300" | '''Description'''
| Active
|-
|
| Active  
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| bool
| 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  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 301: Line 307:
| '''Read-only'''
| '''Read-only'''
|}
|}
| 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  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 313: Line 320:
| '''Read-only'''
| '''Read-only'''
|}
|}
| Gets the name of the transport item.
| Gets the name of the transport item.
|-
|-
| [[Transport_Server_Component#transport.Connections.Transports.Properties|Properties]]
| [[Transport Server Component#transport.Connections.Transports.Properties|Properties]]  
| Collection
| Collection  
| Collection of properties
| Collection of properties
|}
|}
=== transport.Connections.Transports.Properties ===
This is the collection of properties for a given transport.


{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffff;" 
=== transport.Connections.Transports.Properties  ===
!width="110pt"|'''Name'''
 
!width="100pt"|'''Type'''
This is the collection of properties for a given transport.
!width="300pt"|'''Description'''
 
|-  
{| style="background-color: #ffffff; align: left" cellspacing="0" cellpadding="10" border="1"
| Count
|-
|
! width="110" | '''Name'''  
! width="100" | '''Type'''  
! width="300" | '''Description'''
|-
| Count  
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 337: Line 348:
| '''Read-only'''
| '''Read-only'''
|}
|}
| Gives the number of properties in the collection.
| Gives the number of properties in the collection.
|-
|-
|[[Transport_Server_Component#transport.Connections.Transports.Properties.Item|Item(variant index)]]
| [[Transport Server Component#transport.Connections.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.
|}
|}


=== transport.Connections.Transports.Properties.Item ===
=== transport.Connections.Transports.Properties.Item ===
This is the interface for a specific transport property.


{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffff;" 
This is the interface for a specific transport property.
!width="110pt"|'''Name'''
 
!width="100pt"|'''Type'''
{| style="background-color: #ffffff; align: left" cellspacing="0" cellpadding="10" border="1"
!width="300pt"|'''Description'''
|-
|-  
! width="110" | '''Name'''  
| AllowableValues
! width="100" | '''Type'''  
|
! width="300" | '''Description'''
|-
| AllowableValues  
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 362: Line 376:
| '''Read-only'''
| '''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.
 
| 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  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
Line 374: Line 389:
| '''Read-only'''
| '''Read-only'''
|}
|}
| Gets the name of the property item.
| Gets the name of the property item.
|-
|-
| Value
| Value  
|
|  
{| border="0"
{| border="0"
|+
|-
| Property,
| Property,
|-
|-
| string
| string
|}
|}
| Gets/sets 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.
 
| Gets/sets 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 19:18, 26 June 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.

Option 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.

Option Type Description
ActiveTransport
Property,
Object,
Read-Only
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.
bool Database
Property,
Object
TBD.
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.
bool 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.
bool Loopback
Property,
Object
TBD.
bool Statistics
Property,
Object
TBD.
TargetRuntimeVersion
Property,
string
Returns the runtime version string.
Ping subobject Ping settings
TransportDataDump
Property,
bool
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.
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.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.

Name 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.Connections.Transports

This is the collection of currently available transports.

Name Type Description
Count
Property,
integer,
Read-only
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.Connections.Transports.Item

This is the interface associated with each transport object.

Name 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,
string,
Read-only
Gets the full file path and name for the corresponding transport DLL.
Name
Property,
string,
Read-only
Gets the name of the transport item.
Properties Collection Collection of properties

transport.Connections.Transports.Properties

This is the collection of properties for a given transport.

Name Type Description
Count
Property,
integer,
Read-only
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.Connections.Transports.Properties.Item

This is the interface for a specific transport property.

Name Type Description
AllowableValues
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
Property,
string,
Read-only
Gets the name of the property item.
Value
Property,
string
Gets/sets 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.