Locking Commands


Functions

void TecUtilLockOn (void)
  Lock Tecplot.
void TecUtilLockOff (void)
  Unlock Tecplot.
void TecUtilLockStart (AddOn_pa AddOn)
  Lock Tecplot.
void TecUtilLockFinish (AddOn_pa AddOn)
  Unlock Tecplot.
char * TecUtilLockGetCurrentOwnerName (void)
  Queries for and returns the name of the object currently locking Tecplot.
int TecUtilLockGetCount (void)
  Determine how many levels of locking are currently active in Tecplot.
Boolean_t TecUtilLockIsOn (void)
  Determine if Tecplot is locked.


Function Documentation

void TecUtilLockFinish ( AddOn_pa  AddOn  ) 

Unlock Tecplot.

Call only after you have first called TecUtilLockStart(). See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot. This function is Thread Safe.

Parameters:
AddOn The add-on id from which the function is called
Precondition:
Add-on ID must be a valid lock handle.
Fortran Syntax:
    SUBROUTINE TecUtilLockFinish(AddOnPtr)
    POINTER (AddOnPtr, AddOn)

Python Syntax:

    This function is not supported in Python.

int TecUtilLockGetCount ( void   ) 

Determine how many levels of locking are currently active in Tecplot.

In other words, return the number of nested calls to TecUtilLockStart() without matching calls to TecUtilLockFinish(). See Chapter 10, "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot. This function is Thread Safe.

Returns:
The number of times Tecplot has been locked without being unlocked.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilLockGetCount()

Python Syntax:

  Results = TecUtil.LockGetCount()

  Output:
    Results[0]    ReturnVal            int

If Tecplot is not locked, lock it. Later, get the lock count.

   if (!TecUtilLockIsOn())
     {
       int LockCount;
       Addon_pa AddonID =
       TecUtilAddOnRegister(10,"test","v1.23","author");
       TecUtilLockStart(AddonID);
       .
       .
       LockCount = TecUtilLockGetCount();
       //  LockCount will be at least 1
       .
       .
       TecUtilLockFinish(AddonID);
     }

char* TecUtilLockGetCurrentOwnerName ( void   ) 

Queries for and returns the name of the object currently locking Tecplot.

Returns:
Character string containing the name of the lock owner. You must free this string using TecUtilStringDealloc() when finished.
Fortran Syntax:
    SUBROUTINE TecUtilLockGetCurrentOwnerName(
   &           Result,
   &           ResultLength)
    CHARACTER*(*)   Result
    INTEGER*4       ResultLength

Python Syntax:

  Results = TecUtil.LockGetCurrentOwnerName()

  Output:
    Results[0]    ReturnVal            string

char *Name = NULL;

   name = TecUtilLockGetCurrentOwnerName(void);
   if (Name)
     {
      TecUtilStringDealloc(&Name);
     }

Boolean_t TecUtilLockIsOn ( void   ) 

Determine if Tecplot is locked.

See the Chapter "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot. This function is Thread Safe.

Returns:
TRUE, if Tecplot is locked. FALSE, if it is not locked.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilLockIsOn()

Python Syntax:

  Results = TecUtil.LockIsOn()

  Output:
    Results[0]    ReturnVal            boolean

void TecUtilLockOff ( void   ) 

Unlock Tecplot.

For every call to TecUtilLockOff(), you must have a matching call to TecUtilLockOn(). However, both these functions have been replaced by TecUtilLockStart() and TecUtilLockFinish(). The only time these functions should be used in lieu of TecUtilLockStart() and TecUtilLockFinish() is in the InitTecAddon function when an AddonID has not yet been created. See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot.

See also:
TecUtilLockFinish()
Fortran Syntax:
    SUBROUTINE TecUtilLockOff()

Python Syntax:

    This function is not supported in Python.

void TecUtilLockOn ( void   ) 

Lock Tecplot.

For every call to TecUtilLockOn(), you must have a matching call to TecUtilLockOff(). However, both these functions have been replaced by TecUtilLockStart and TecUtilLockFinish(). The only time these functions should be used in lieu of TecUtilLockStart() and TecUtilLock Finish() is in the InitTecAddon function when an AddonID has not yet been created. See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot.

See also:
TecUtilLockStart()
Fortran Syntax:
    SUBROUTINE TecUtilLockOn()

Python Syntax:

    This function is not supported in Python.

void TecUtilLockStart ( AddOn_pa  AddOn  ) 

Lock Tecplot.

For every call to TecUtilLockStart(), you must have a matching call to TecUtilLockFinish(). See "Locking and Unlocking Tecplot," in the ADK User's Manual for more information on locks in Tecplot. This function is Thread Safe.

Parameters:
AddOn The add-on id from which the function is called
Precondition:
Add-on ID must be a valid lock handle.
Fortran Syntax:
    SUBROUTINE TecUtilLockStart(AddOnPtr)
    POINTER (AddOnPtr, AddOn)

Python Syntax:

    This function is not supported in Python.


Generated on Tue Mar 12 02:24:42 2013 for Tecplot by  doxygen 1.5.5