Use the CCL Editor in ESP Studio, or another supported editor, to create and modify your CCL code. Start by developing a simple project, and test it iteratively as you gradually add greater complexity.
For details of these high-level steps, see the rest of this CCL Programmers Guide, as well as the Studio Users Guide, the Adapters Guide, and the SPLASH Programmers Guide.
- Create a .ccl file.
Creating a project in ESP Studio creates the .ccl file automatically.
- Add input streams and windows.
- Add output streams and windows with simple continuous queries.
- Attach adapters to streams and windows to subscribe to external sources or publish output.
- Compile the CCL code.
- Run the compiled project against test data, using the debugging tools in ESP Studio and command line utilities.
Repeat this step as often as needed.
- Add queries to the project. Start with simple queries and gradually add complexity.
- (Optional) Use functions in your continuous queries to perform mathematical operations, aggregations, datatype conversions, and other common tasks:
- Built-in functions for many common operations
- User-defined functions written in the SPLASH programming language
- User-defined external functions written in C/C++ or Java
- (Optional) Create named schemas to define a reusable data structure for streams or windows.
- (Optional) Create memory stores or log stores to retain the state of data windows in memory or on disk.
- (Optional) Create modules to contain reusable CCL that can be loaded multiple times in a project.