C++ Methods

C++ continuous query authors can use the following methods for publishing, replacing, or removing DS2 and Python modules and for mapping source window events to module methods.
dfESPproject::publishToMAS(	const char *name,
language_t lang,
const char *sourceCode,
const char *description)
dfESPproject::publishToMAS() publishes a DS2 or Python module to SAS Micro Analytic Service in SAS Event Stream Processing, where the source code to publish is in a string.
Parameter
Description
name
The name of the module. It is used to refer to the module in any subsequent method calls.
language
Specify either DS2 or Python.
sourceCode
A string containing the DS2 or Python source code of the module. See DS2 Programming for Event Stream Processing with SAS Micro Analytic Service and Python Programming for SAS Event Stream Processing with SAS Micro Analytic Service for information about programming modules for Micro Analytic Service in SAS Event Stream Processing.
description
An optional string that contains a description of the module’s purpose. Pass in NULL to omit a description.
dfESPproject::publishFileToMAS(	const char *name, 
language_t lang, 
const char *filePath, 
const char *description)
dfESPproject::publishFileToMAS() publishes a DS2 or Python module to SAS Micro Analytic Service, where the source code is to be read from a text file.
Parameter
Description
name
The name of the module. It is used to refer to the module in any subsequent method calls.
language
Specify either DS2 or Python.
filePath
The path to the file containing the DS2 or Python source code of the module, including filename and extension. See DS2 Programming for Event Stream Processing with SAS Micro Analytic Service and Python Programming for SAS Event Stream Processing with SAS Micro Analytic Service for Micro Analytic Service in SAS Event Stream Processing.
description
An optional string that contains a description of the module’s purpose. Pass in NULL to omit a description.
dfESPproject::replaceMASmodule(	const char *name, 
language_t lang, 
const char *sourceCode, 
const char *description)
dfESPproject::replaceMASmodule() replaces an existing DS2 or Python module in SAS Micro Analytic Service, where the replacement source code to publish is in a string. If the module to replace, indicated by the name parameter, does not exist, then replaceMASmodule() does not publish the source code.
Parameter
Description
name
The name of the module. It is used to refer to the module in any subsequent method calls.
language
Specify either DS2 or Python.
sourceCode
A string containing the DS2 or Python source code with which to replace the existing code. See DS2 Programming for Event Stream Processing with SAS Micro Analytic Service and Python Programming for SAS Event Stream Processing with SAS Micro Analytic Service for information about programming modules for Micro Analytic Service in SAS Event Stream Processing.
description
An optional string that contains a description of the module’s purpose. Pass in NULL to omit a description.
dfESPproject::replaceMASmoduleFromFile(	const char *name, 
language_t lang, 
const char *filePath, 
const char *description) 
dfESPproject:: replaceMASmoduleFromFile () replaces an existing DS2 or Python module in SAS Micro Analytic Service, where the source code is to be read from a text file. If the module to replace, indicated by the name parameter, does not exist, then replaceMASmoduleFromFile() does not publish the source code.
Parameter
Description
name
The name of the module. It is used to refer to the module in any subsequent method calls.
language
Specify either DS2 or Python.
filePath
The path to the file containing the DS2 or Python source code with which to replace the existing code, including filename and extension. See DS2 Programming for Event Stream Processing with SAS Micro Analytic Service and Python Programming for SAS Event Stream Processing with SAS Micro Analytic Service for Micro Analytic Service in SAS Event Stream Processing.
description
An optional string that contains a description of the module’s purpose. Pass in NULL to omit a description.
dfESPproject::deleteMASmodule(const char *name,)
dfESPproject:: deleteMASmodule() removes the specified module from SAS Micro Analytic Service. The *name parameter is the name of the module to delete.
dfESPpcontext::registerMethod_MAS( dfESPwindow *w, 
const char *moduleName, 
const char *methodName) 
dfESPpcontext:: registerMethod_MAS () causes the specified source window’s events to be processed by the specified module method. The module containing the method must have been published to SAS Micro Analytic Service before calling registerMethod_MAS().
Parameter
Description
w
The source window whose events are to be processed by the specified module method.
moduleName
The name of the module containing the specified method.
methodName
The name of the method to use to process the specified source window’s events.