Table of Contents

Theory

External Coupling Overview

External coupling in ADOxx enables the realisation of additional functionality on platform level that is not covered by core of configurable functionality. ADOxx provides the scripting language AdoScript to realise external coupling functionality.

What is AdoScript?

AdoScript is the macro language of ADOxx. It is based on LEO and is build procedural. Through AdoScript the user has access to a rich number of ADOxx functionalities.

AdoScript is a language that allows huge extension possibilities with low programming effort.

Examples:

  • New menu entries
  • Integration of new tools
  • Realisation of specific model checking
  • Realisation of new interfaces
  • Additional add-on-programming

How is AdoScript used?

AdoScript can  be executed on different ways, so it can be used where it is needed:

As menu entry

For manual execution  (e.g. transformation procedures, evaluation scenarios)

In events

If specific actions are executed, an AdoScript can be automatically called. (e.g. a special dialogue replaces the standard dialogue window)

In the Notebook via Programmcall

Similar as for menu entries, but triggered from within the notebook

Automatically over Command Prompt

Trigger during startup of ADOxx and handover of AdoScript through the command prompt

ECHO CC "AdoScript" FREAD file:("batchupd.adoscript") EXECUTE (text)
CC "Application" EXIT | areena -ubatchupd -pbatchupd -dADOxxdb -ssqlserver -e

From AdoScript-Shell

As a debugging and development facilities to test code snipplets

Integration of AdoScript

AdoScript builds on the so-called "Message Port-Concept" - messages are sent to specific ports and return result messages for further usage and application

AdoScript can be integrated with „External coupling" or „Programm call".

AdoScript Message Port Example
   

Programmable through scripting APIs

Method-specific development of functionalities is possible through scripting techniques. Function calls/APIs of the platform (realized in C++) are possible through scripting language AdoScript. AdoScript "Messageports"/APIs are categorized according to components:

Component APIs UI APIs Manipulation APIs Application APIs
Messageport Acquisition Messageport AdoScript Messageport Core Messageport Drawing
Messageport Modeling Messageport CoreUI Messageport DB Messageport Application
Messageport Analysis Messageport Explorer Messageport UsrMgt  
Messageport Simulation      
Messageport Evaluation      
Messageport ImportExport      
Messageport Documentation      
Messageport AQL      

 

About 400 APIs calls are provided through the "Messageports" above.

Documentation of Messageports and AdoScript Call Signatures

AdoScript Messageports and call signatures are documented in the helpfile of the ADOxx Development Toolkit. To start the help file, press "F1" within the ADOxx Development Toolkit.

ADOxx Development Toolkit Help

 

Useful Tips

  • Every Command Call stores the result in global variables
  • Right after the CC store the required global variables in local variable to avoid overwriting them during the next CC
  • Tracking  the global variables with "debug"

  • Use the keyword debug during CC to track the status of variables:  "CC "xxx" debug" COMMAND
  • Variables are allocated with values, distinguish if you manipulate the variable v1, or the value of the variable (v1)
  • Use VAL and STR to convert strings to integer and vice versa
  • Use tokcnt to count tokens in a result list
  • Use () to get the value of a variable
  • Use CM to convert into centimeters

DataType Conversion

Commands are available to convert between datatypes in AdoScript

STR val Converts a value into a string.
VAL str Parses the string and returns that value.
CM realVal Converts a real value in centimetres into a centimetre.
PT realVal Converts a real value in points into a measure value.
uistr (val, digits) Converts a real value in a string.
uival (str) Converts a string value in a real value.
CHR intVal Returns the character of for the character code provided in intVal. Return type is str. For example: CHR 65 = "A".
ASC str Returns the character code for the character passed in str. For example: ASC "A" = 65.
INT realVal Returns the an intVal. The realVal is converted to integer by truncating digits after the decimal point.

    

Average (0 Votes)
The average rating is 0.0 stars out of 5.

Hands On