Call

Top  Previous  Next

Description


The Call command allows FreeFlyer to access pre-defined Procedures and Macros and to pass data between FreeFlyer and MATLAB® or Database Management Systems (DBMS).

 

 

Syntax


Calling FreeFlyer Procedures and Macros

 

Call myProcedure(mySpacecraft, myVariable, myArray);
Call myMacro(mySpacecraft, myVariable, myArray);

 

For more information, see the Using Procedures and Using Macros Script References.

 

Calling MatlabInterfaces

 

Call myMatlabInterface.myMFile(myArray, myMatrix, myString, myStringArray, myVariable);

 

For more information, see the MATLAB Guide.

 

Calling DataBases - Generic Syntax Options

 

Call myDatabaseObject "SQLStatement";

Call myDatabaseObject [SQLStatement]; // This syntax is only supported in millisecond timing precision mode

 
 
Call myDatabaseObject Next "SQLStatement"

    BindCol(myVariable1, myVariable2);
 
Call myDatabaseObject All "SQLStatement"

    BindCol(myArray1, myArray2);  
 
Call myDatabaseObject Next "SQLStatement"
    BindParam (myVariable, myArray[0], mySpacecraft.A, ...)
    BindCol (myVariable, myArray[0], mySpacecraft.A, ...)

 
    ReturnCount myVariable1
    ResultsPending myVariable2
    RowCount myVariable3;

 

Call myDatabaseObject All "SQLStatement"

    BindParam(myVariable, myArray[0], mySpacecraft.A, ...)

    BindCol(myArray1, myArray2, myArray3, ...)

     

    ReturnCount myVariable1

    RowCount myVariable2;

 

For more information, including specific syntax examples, see the Databases Guide.

 

Where:

myProcedure is a FreeFlyer Procedure

myMacro is a FreeFlyer Macro

myMFile is a MATLAB M-file script

 

 

Details


Procedures

Any FreeFlyer object type can be passed between FreeFlyer and a Procedure.

An unlimited number of objects can be specified.

The Procedure must be previously defined, and the argument list specified by Define Procedure must match that specified by the Call command.

For more information, see the Using Procedures Guide.

 

Macros

Any identifier can be passed between FreeFlyer and a Macro.

An unlimited number of identifiers can be specified.

Macros must be previously defined, and the argument list specified by the Call command must have at least as many arguments as the Define Macro statement.

For more information, see the Using Macros Guide.

 

MatlabInterfaces

Only Matrix, Array, String, StringArray, and Variable objects can be passed between FreeFlyer and MATLAB.

An unlimited number of objects can be specified.

The Call command must be used on a previously defined MatlabInterface object, which has been initialized via the Open command.

For more information, see the MATLAB Guide.

 

DataBases

The FreeFlyer DataBase object enables connectivity to Database Management Systems (DBMS). The Open Database Connectivity (ODBC) application program interface (API) is used as the connection mechanism. User-supplied Structured Query Language (SQL) statements specify the DBMS actions to be performed. Exact syntax supported for SQL statements is determined by the DBMS in use.

 

To get started with a database, you must first set up its "Data Source Name" (DSN) under ODBC and associate a driver and database location with that name. Specific drivers may require additional parameters. Your specific database driver documentation should be referenced for the database's specific setup. For more information, see the Databases Guide.

Variables, Arrays, Array elements, or any FreeFlyer object property can be passed between FreeFlyer and a database.

The Call command must be used on a previously defined DataBase object, which has been initialized via the Open command.

Multiple DataBase objects can be used, each forming a connection to a different DBMS or a different user account within the same DBMS.

 

Optional Clauses:

All: Processes all the rows in the specified database. This clause is used when the bound output columns are Arrays.

Next: Processes only the next row in the specified database. This clause is used when the bound output columns are Variables.

BindParam: Binds a parameter to the user-specified property. Unlimited properties may be specified. This clause sends data from a FreeFlyer object to the DataBase. The All and Next clauses are not used with this clause.

BindCol: Maps the elements of the last row of the result set to individual variables or to the elements of an array. If the number of rows is greater than the array length, the array is incrementally resized. This clause retrieves data from the DataBase and binds it to a FreeFlyer Variable or Array. You must specify All or Next when using this clause.

ReturnCount: Returns the row number that was fetched, starting at 1. "0" is returned when an empty results set is generated.

ResultsPending: Returns "0" if all rows have been processed and "1" if more rows are available.

RowCount: Returns the number of rows affected by SQL statements such as UPDATE, INSERT, or DELETE. If the information is unavailable, "-1" is returned.

 

Much more information, including many examples with screenshots, can be found in the Databases Guide.

 

 

Command Editor


Object to Call

FreeFlyer Function (Procedure or Macro)

MatlabInterface

DataBase

 

"More" button

Adds an additional argument field

 

"Delete" button

Removes the argument field directly to the left of the "Delete" button

 

Script

Displays the FreeFlyer Script that is generated by the editor

 

Description

Displays descriptions of the editor and its fields

Description text changes as the mouse pointer moves over the different fields within the editor

 

 

See Also


Close Command

Open Command

Define Procedure and Define Macro

Using Procedures and Using Macros Script References

Structs Script Reference

MATLAB and Databases Guides

DataBase Properties and Methods