The different elements that make up a SIMPL+ structure of a SIMPL+ Module are organized in the following sections:
SIMPL+ Module Information
-
Dealer Name:
System Name:
System Number:
Programmer:
Comments:
Compiler Directives - Compiler directives are lines included in the code at the beginning of a SIMPL+ Module, and are used to provide explicit instructions to the compiler. They are not part of the SIMPL+ language itself and do not generate any SIMPL+ code. The compiler directives are always preceded by a hash sign (#) and extend only across a single line of code, i.e., a compiler directive is considered to end as soon as a new line character is found. No semicolon (;) is expected at the end of a compiler directive.
Include Libraries - Specifies whether to include a function library into the SIMPL+ Module. A function library is a group of functions saved in a SIMPL+ (.usl) or a SIMPL# library file (.clz). In order to include a function library, the #CRESTRON_LIBRARY, #USER_LIBRARY or #USER_SIMPLSHARP_LIBRARY directives are used. The libraries are searched in the order they are included. Note that the creation and/or editing of SIMPL+ and SIMPL# Libraries is not yet supported in Crestron Studio®, however, existing SIMPL+ and SIMPL# libraries can be referenced from a SIMPL+ module. To learn how to incorporate existing SIMPL+ libraries into your SIMPL+ module, refer to Incorporating User Created SIMPL+ Libraries. For more information on using SIMPL# libraries in SIMPL+ modules, see 'Importing' SIMPL# Libraries in Crestron Studio®.
Digital, Analog and Serial Inputs and Outputs - SIMPL+ modules communicate with the program via Digital, Analog, or String inputs and outputs that correspond to digital, analog or serial signals. The order of the signal declarations is important only within a particular signal type.
Sockets - Socket functions which allow the SIMPL+ module to access the Internet, or use Ethernet, without the necessity of going through the SIMPL program. There are three socket types implemented in SIMPL+ and they are treated as new I/O data types: TCP/IP clients (TCP_CLIENT), TCP/IP server (TCP_SERVER) and UDP socket (UDP_SOCKET).
Parameters - Values passed to the SIMPL+ module used for communication with the SIMPL program.
Parameter Properties - The parameter properties restrict the behavior of parameters, similar to the way property sheets are used in SIMPL to modify the behavior of module parameters during data entry time.
Structure Definitions - Structures are individual pieces of data grouped together to form a custom data type. A structure has to be defined before it can be used. Once a new Structure type is defined, variables of that type can be declared.
Global Variables - Global variables are variables that exist throughout the entire SIMPL+ module, i.e., they can be referenced and modified by any event or user-defined function. The value of a global variable being set or modified is reflected throughout the entire module.
Functions - User-defined functions to perform common tasks. must be defined before they are used
Event Handlers - Event handlers are functions which deal with activating events in a SIMPL+ module. SIMPL+
Main - Main is a special case of a user-defined function that is used to initialize variables and in some cases may not contain any statements at all. The Main function is executed when the control system initializes (boots up) and is never called again.
Note: The sections listed above are not mandatory and one or more sections may be left out as needed
Upon creation of a new SIMPL+ module, each section gets pre-populated with the applicable SIMPL+ code.
More: