Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

SBjsi.h File Reference

#include "VXIjsi.h"
#include "VXIlog.h"
#include "VXIheaderPrefix.h"
#include "VXIheaderSuffix.h"

SBjsi

SBjsi implementation of VXIjsi SBjsi interface, an implementation of the VXIjsi interface for interacting with a ECMAScript (JavaScript) engine. This provides functionality for creating ECMAScript execution contexts, manipulating ECMAScript scopes, manipulating variables within those scopes, and evaluating ECMAScript expressions/scripts.

There is one VXIjsi interface per thread/line.

#define JSI_RUNTIME_SIZE_DEFAULT   (1024 * 1024 * 16)
#define JSI_CONTEXT_SIZE_DEFAULT   (1024 * 128)
#define JSI_MAX_BRANCHES_DEFAULT   100000
SBJSI_API VXIjsiResult SBjsiInit (VXIlogInterface *log, VXIunsigned diagLogBase, VXIlong runtimeSize, VXIlong contextSize, VXIlong maxBranches)
 Global platform initialization of JavaScript.
SBJSI_API VXIjsiResult SBjsiShutDown (VXIlogInterface *log)
 Global platform shutdown of JavaScript.
SBJSI_API VXIjsiResult SBjsiCreateResource (VXIlogInterface *log, VXIjsiInterface **jsi)
 Create a new JavaScript service handle.
SBJSI_API VXIjsiResult SBjsiDestroyResource (VXIjsiInterface **jsi)
 Destroy the interface and free internal resources.

Defines

#define SBJSI_API   SYMBOL_IMPORT_DECL


Define Documentation

#define JSI_CONTEXT_SIZE_DEFAULT   (1024 * 128)
 

#define JSI_MAX_BRANCHES_DEFAULT   100000
 

#define JSI_RUNTIME_SIZE_DEFAULT   (1024 * 1024 * 16)
 

#define SBJSI_API   SYMBOL_IMPORT_DECL
 


Function Documentation

SBJSI_API VXIjsiResult SBjsiCreateResource VXIlogInterface log,
VXIjsiInterface **  jsi
 

Create a new JavaScript service handle.

Parameters:
log VXI Logging interface used for error/diagnostic logging, must remain a valid pointer throughout the lifetime of the resource (until SBjsiDestroyResource( ) is called)
Returns:
VXIjsiResult 0 on success

SBJSI_API VXIjsiResult SBjsiDestroyResource VXIjsiInterface **  jsi  ) 
 

Destroy the interface and free internal resources.

Once this is called, the logging interface passed to SBjsiCreateResource( ) may be released as well.

Returns:
VXIjsiResult 0 on success

SBJSI_API VXIjsiResult SBjsiInit VXIlogInterface log,
VXIunsigned  diagLogBase,
VXIlong  runtimeSize,
VXIlong  contextSize,
VXIlong  maxBranches
 

Global platform initialization of JavaScript.

Parameters:
log VXI Logging interface used for error/diagnostic logging, only used for the duration of this function call
diagLogBase Base tag number for diagnostic logging purposes. All diagnostic tags for SBjsi will start at this ID and increase upwards.
runtimeSize Size of the JavaScript runtime environment, in bytes. There is one runtime per process. See above for a recommended default.
contextSize Size of each JavaScript context, in bytes. There may be multiple contexts per channel, although the VXI typically only uses one per channel. See above for a recommended default.
maxBranches Maximum number of JavaScript branches for each JavaScript evaluation, used to interrupt infinite loops from (possibly malicious) scripts
Returns:
VXIjsiResult 0 on success

SBJSI_API VXIjsiResult SBjsiShutDown VXIlogInterface log  ) 
 

Global platform shutdown of JavaScript.

Parameters:
log VXI Logging interface used for error/diagnostic logging, only used for the duration of this function call
Returns:
VXIjsiResult 0 on success


Generated on Wed Jun 1 12:50:18 2005 for OpenVXI by  doxygen 1.4.2