Click or drag to resize

SIMPL+ Module Implementation

SIMPL# Libraries are referenced within a SIMPL+ module by using the SIMPL+ keywords:

gradient

SIMPL+ Module Implementation

 

 

The syntax is as follows:

 #USER_SIMPLSHARP_LIBRARY “MyLibrary” - references MyLibrary.clz. When no path is specified, it's assumed that MyLibrary.clz is located in the same folder as the SIMPL+ Module.

 #USER_SIMPLSHARP_LIBRARY “C:\Projects\MyLibrary” - references MyLibrary.clz by pointing to the absolute folder path to the .clz file. Using the absolute path to your SIMPL# library is convenient when you need your SIMPL# Library to be referenced by more than one SIMPL+ modules.

Note: You cannot use the same name between your SIMPL+ module and SIMPL# Library. If you do so, compilation error will occur.!

 

When compiling a SIMPL+ Module that includes a SIMPL# Library, an Application Programming Interface file (.api) file will be created in the SIMPL+ module's SplsWork subfolder.

You can open the corresponding .api file directly from the SIMPL+ Editor by pointing to the name of the referenced SIMPL# Library and right-clicking on it.

SIMPLS OpenAPI

 

Example of SIMPL# .api file

The following code is an example of the .api file created when first compiling a SIMPL+ Module containing a SIMPL# Library:

 

C++
	namespace SIMPLSharpLibrary1;

    // namespace structs
    structure tagBaseLibStruct
    {
        STRING buf[];

        SIMPLSHARPSTRING simplSharpStr[];

        SIGNED_LONG_INTEGER i;

        SIGNED_LONG_INTEGER arr[];

    };

    structure tagLibStruct
    {
        tagBaseLibStruct baseLibStruct;

        SIGNED_LONG_INTEGER j;
    };


    class baseClass
    {
        // class functions
        FUNCTION baseClassFn ();

        STRING_FUNCTION ToString ();

        SIGNED_LONG_INTEGER_FUNCTION GetHashCode ();

        // class variables
        SIGNED_LONG_INTEGER baseClassInt;

        // class properties
    };


    class Class1
    {
        // class functions
        SIGNED_LONG_INTEGER_FUNCTION classFn ();

        SIMPLSHARPSTRING_FUNCTION StrFn ( SIMPLSHARPSTRING stringArg );       

        FUNCTION baseClassFn ();

        STRING_FUNCTION ToString ();

        SIGNED_LONG_INTEGER_FUNCTION GetHashCode ();

         // class variables
        tagLibStruct libStruct;

        SIGNED_LONG_INTEGER x;

        SIMPLSHARPSTRING str[];

        SIGNED_LONG_INTEGER baseClassInt;

         // class properties
    };

 

footer
Crestron Blue 400 x 100

Copyright (C) 2013 to the present, Crestron Electronics, Inc. All rights reserved. No part of this work may be reproduced in any form, machine or natural, without the express written consent of Crestron Electronics.