Studio:AutoScript: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 60: Line 60:
| valign="top" align="left" width="150" |  
| valign="top" align="left" width="150" |  
[[#Ascript.Arguments.Item|object]]&nbsp;'''Item''' (<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
[[#Ascript.Arguments.Item|object]]&nbsp;'''Item''' (<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
| valign="top" | Method<br>
| valign="top" | Method<br>
| valign="top" | Retrieves the argument at the given index.<br>
| valign="top" | Retrieves the argument at the given index.<br>
Line 95: Line 96:
| valign="top" align="left" width="150" |  
| valign="top" align="left" width="150" |  
[[#Ascript.Constants.Item|object]]&nbsp;'''Item''' (<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
[[#Ascript.Constants.Item|object]]&nbsp;'''Item''' (<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
| valign="top" | Method<br>
| valign="top" | Method<br>
| valign="top" | Retrieves the constant at the given index.<br>
| valign="top" | Retrieves the constant at the given index.<br>
Line 145: Line 147:
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| Name  
| Name
| Property,<br>'''Read-only''',<br>String
| Property,<br>'''Read-only''',<br>bool
| The function's name.
| Function's name.
|-
|-
| [[#Ascript.Functions.Item.Owner|Owner]]  
| [[#Ascript.Functions.Item.Owner|Owner]]  
Line 186: Line 188:
| Name  
| Name  
| Property,<br>'''Read-only''',<br>bool  
| Property,<br>'''Read-only''',<br>bool  
| TBD.
| Owner name.
|-
|-
| OutPointers  
| OutPointers  
Line 196: Line 198:
| STRIDE Unique IDentifier assigned by compiler.
| STRIDE Unique IDentifier assigned by compiler.
|-
|-
| '''void Register (void)'''  
| HRESULT'''&nbsp;Register (void)'''  
| Method  
| Method  
| Function's user object.
| TBD.
|-
| '''HRESULT RegisterOverride (void)'''
| Method
| TBD.
|-
|-
| '''void Return (void)'''  
|  
HRESULT'''Return ('''
 
&nbsp;&nbsp; bool* result
 
''')'''
 
| Method  
| Method  
| Function's user object.
| TBD.
|-
|-
| ReturnValue  
| ReturnValue  
Line 216: Line 228:
| Contains "Function".
| Contains "Function".
|-
|-
| '''void Unregister (void)'''  
| HRESULT'''&nbsp;Unregister (void)'''  
| Method  
| Method  
| Function's user object.
| Function's user object.
|-
|-
| '''void UnregisterOverride (void)'''  
| HRESULT'''&nbsp;UnregisterOverride (void)'''  
| Method  
| Method  
| Function's user object.
| Function's user object.
Line 235: Line 247:
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| '''void Call (void)'''  
| HRESULT'''&nbsp;Call (void)'''  
| Method  
| Method  
| Function's user object.
| TBD.
|-
|-
| '''void CallBypassOverride (void)'''  
| HRESULT'''CallBypassOverride (void)'''  
| Method  
| Method  
| Function's user object.
| Function's user object.
|-
|-
| '''void CallBypassOverrideNonBlocking (void)'''  
| HRESULT'''CallBypassOverrideNonBlocking (void)'''  
| Method  
| Method  
| Function's user object.
| Function's user object.
|-
|-
| '''void CallNonBlocking (void)'''  
| HRESULT'''CallNonBlocking (void)'''  
| Method  
| Method  
| Function's user object.
| Function's user object.
|-
|-
| '''void IsOverrideRegistered (void)'''
| IsOverrideRegistered  
| Property,<br>'''Read-only''',<br>bool  
| Property,<br>'''Read-only''',<br>bool  
| TBD.
| TBD.
Line 298: Line 310:
| valign="top" align="left" width="150" |  
| valign="top" align="left" width="150" |  
[[#Ascript.Messages.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>)
[[#Ascript.Messages.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>)
| valign="top" | Method<br>
| valign="top" | Method<br>
| valign="top" | Retrieves the message at the given index.<br>
| valign="top" | Retrieves the message at the given index.<br>
Line 339: Line 352:
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| '''void Broadcast (void)'''  
| HRESULT'''&nbsp;Broadcast (void)'''  
| Method  
| Method  
| Broadcast method.
| Broadcast method.
|-
|-
| '''void Register (void)'''  
| HRESULT'''Register (void)'''  
| Method  
| Method  
| Register method.
| Register method.
|-
|-
| '''void RegisterOverride (void)'''  
| HRESULT '''RegisterOverride (void)'''  
| Method  
| Method  
| Register override method.
| Register override method.
|-
|-
| '''void SendRsp (void)'''  
| HRESULT '''SendRsp (void)'''  
| Method  
| Method  
| Send response method.
| Send response method.
|-
|-
| '''void Unregister (void)'''  
| HRESULT '''Unregister (void)'''  
| Method  
| Method  
| Unregister method.
| Unregister method.
|-
|-
| '''void UnregisterOverride (void)'''  
| HRESULT '''UnregisterOverride (void)'''  
| Method  
| Method  
| Unregister method.
| Unregister override method.
|}
|}


Line 374: Line 387:
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| '''void SendAndRead (void)'''  
| HRESULT'''&nbsp;SendAndRead (bool* value)'''  
| Method  
| Method  
| Send and read method.
| Send and read method.
|-
|-
| '''void SendAndReadBypassOverride (void)'''  
|  
HRESULT'''&nbsp;SendAndReadBypassOverride ('''
 
bool* value
 
''')'''
 
| Method  
| Method  
| Send and read bypass override method.
| Send and read bypass override method.
|-
|-
| '''void SendCmd (void)'''  
| HRESULT'''&nbsp;SendCmd (void)'''  
| Method  
| Method  
| Send command method.
| Send command method.
|-
|-
| '''void SendCmdBypassOverride (void)'''  
|  
HRESULT'''SendCmdBypassOverride ('''
 
&nbsp;&nbsp; bool* value
 
''')'''
 
| Method  
| Method  
| Send command bypass override method.
| Send command bypass override method.
|-
|-
| '''void Subscribe (void)'''  
| HRESULT'''Subscribe (void)'''  
| Method  
| Method  
| Subscribe method.
| Subscribe method.
|-
|-
| '''void Unsubscribe (void)'''  
| HRESULT '''Unsubscribe (void)'''  
| Method  
| Method  
| Unsubscribe method.
| Unsubscribe method.
|}
|}
<br>


=== <br><br>Ascript.TestUnits<br> ===
=== <br><br>Ascript.TestUnits<br> ===
Line 413: Line 436:
| valign="top" align="left" width="150" |  
| valign="top" align="left" width="150" |  
[[#Ascript.TestUnits.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
[[#Ascript.TestUnits.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
| valign="top" | Method<br>
| valign="top" | Method<br>
| valign="top" | Retrieves the test unit at the given index.<br>
| valign="top" | Retrieves the test unit at the given index.<br>

Revision as of 23:36, 3 July 2008

 

Introduction 

Ascript is the definitive hierarchy of methods, objects, and properties provided by Autosense. While Autosense helps the user find the script methods/data desired in a script, Ascript is the definitive source of what is available from STRIDE when using Autosense.

Automation API

Ascript

When creating a script, the user types in Ascript followed by dot '.' to get Autosense to display. The user may select methods to be used within his script. The user may access property data within his script. this API is the definitive API for Autosense. The following table outlines the main objects and collections available to the user.

Member
Type
Description
Arguments Collection Collection of arguments.
Constants Collection Collection of constants.
Database Object  Database settings.
Functions Collection Collection of functions.
Messages Collection Collection of messages.
Test Units Collection Collection of test units.
Timers Collection Collection of timers.


Ascript.Arguments

Arguments is a collection of arguments contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the argument at the given index.



Ascript.Arguments.Item

An individual argument is accessed from the collection using the item(#) interface.

Member
Type
Description
Value  Property,
Read-only,
String
The argument value.


Ascript.Constants

Constants is a collection of constants contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the constant at the given index.



Ascript.Constants.Item

An individual constant is accessed from the collection using the item(#) interface.

Member
Type
Description
Value  Property,
Read-only,
String
The value of the constant.



Ascript.Database

Database is an object containing properties related to the database managed by Ascript.

Member
Type
Description
Path
Property,
Read-only,
String
The path to the database.


Ascript.Functions

Accessing Ascript.Functions properties requires getting ahold of an actual function object. Ascript.Functions is actually a collection. Accessing a single function is performed via ascript.Functions.Item.[property]. Below is a table of function attributes that may be retrieved:

Member
Type
Description
Name Property,
Read-only,
bool
Function's name.
Owner Property,
Read-only,
Object
Function's owner object.
SUID Property,
Read-Only,
integer
STRIDE Unique IDentifier assigned by compiler.
Type Property,
Read-Only,
String
Contains "Function".
User Property
Read-Only,
Object
Function's user object.


Ascript.Functions.Item.Owner

Member
Type
Description
IsOverrideRegistered Property,
Read-Only,
bool
TBD.
IsRegistered Property,
Read-only,
bool
TBD.
Name Property,
Read-only,
bool
Owner name.
OutPointers Property,
Read-only,
?
TBD.
ParameterList Property,
Read-only,
integer
STRIDE Unique IDentifier assigned by compiler.
HRESULT Register (void) Method TBD.
HRESULT RegisterOverride (void) Method TBD.

HRESULTReturn (

   bool* result

)

Method TBD.
ReturnValue Property,
Read-only,
integer
STRIDE Unique IDentifier assigned by compiler.
SUID Property,
Read-only,
integer
STRIDE Unique IDentifier assigned by compiler.
Type Property,
Read-only,
String
Contains "Function".
HRESULT Unregister (void) Method Function's user object.
HRESULT UnregisterOverride (void) Method Function's user object.


Ascript.Functions.Item.User

Member
Type
Description
HRESULT Call (void) Method TBD.
HRESULTCallBypassOverride (void) Method Function's user object.
HRESULTCallBypassOverrideNonBlocking (void) Method Function's user object.
HRESULTCallNonBlocking (void) Method Function's user object.
IsOverrideRegistered Property,
Read-only,
bool
TBD.
IsRegistered Property,
Read-only,
bool
TBD.
Name Property,
Read-only,
bool
TBD.
OutPointers Property,
Read-only,
?
TBD.
ParameterList Property,
'Read-only,
integer
STRIDE Unique IDentifier assigned by compiler.
ReturnValue Property,
Read-only,
integer
STRIDE Unique IDentifier assigned by compiler.
SUID Property,
Read-only,
,integer
STRIDE Unique IDentifier assigned by compiler.
Type Property,
Read-only,
String
Contains "Function".



Ascript.Messages

Messages is a collection of messages contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the message at the given index.



Ascript.Messages.Item

Member
Type
Description
Owner Property,
Read-only,
Object
Message's owner object.
SMID Property,
Read-only,
integer
STRIDE Message IDentifier assigned by compiler.
SUID Property,
Read-only,
integer
STRIDE Unique IDentifier assigned by compiler.
User Property,
Read-only,
Object
Message's user object.


Ascript.Messages.Item.Owner
Member
Type
Description
HRESULT Broadcast (void) Method Broadcast method.
HRESULTRegister (void) Method Register method.
HRESULT RegisterOverride (void) Method Register override method.
HRESULT SendRsp (void) Method Send response method.
HRESULT Unregister (void) Method Unregister method.
HRESULT UnregisterOverride (void) Method Unregister override method.


Ascript.Messages.Item.User
Member
Type
Description
HRESULT SendAndRead (bool* value) Method Send and read method.

HRESULT SendAndReadBypassOverride (

bool* value

)

Method Send and read bypass override method.
HRESULT SendCmd (void) Method Send command method.

HRESULTSendCmdBypassOverride (

   bool* value

)

Method Send command bypass override method.
HRESULTSubscribe (void) Method Subscribe method.
HRESULT Unsubscribe (void) Method Unsubscribe method.



Ascript.TestUnits

TestUnits is a collection of test units contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the test unit at the given index.



Ascript.TestUnits.Item

An individual test unit is accessed from the collection using the item(#) interface.

Member
Type
Description
void Run (void)  Method Method to run the test unit.
Suite  Property,
object
The test unit test suite.



Ascript.Timers

Timers is a collection of timers contained and managed through Ascript.

Member
Type
Description
object Add (
    object timerObject
)
Method
Adds a new timer object.
object Item (
    integer index
)
Method
Retrieves the Timer object for the given index.
object Remove (
    integer index
)
Method
Removes the timer at the given index.



Ascript.Timers.Item

An individual timer is accessed from the collection using the item(#) interface.

Member
Type
Description
Active Property,
Read-only,
bool
Contains true if timer is actively running.
Id Property,
Read-only,
long
Contains timer identifier.
Duration Property,
long
Timer duration in milliseconds.
Periodic Property,
bool 
Contains true if the timer is periodic.
void Start (void) Method
Starts the timer.
void Stop (void) Method
Stops the timer.