### AggreGate Silent Install Response File Example Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_installation_details_silent_installer.htm This is an example of a `response.varfile` used for silent installation. It contains predefined settings for the installer. Variable names may differ across AggreGate versions. ```properties executeLauncherAction$Boolean=false sys.adminRights$Boolean=true sys.adminRightsUiRootUnix$Boolean=true sys.installationDir=/opt/AggreGate sys.languageId=en sys.programGroupDisabled$Boolean=false sys.symlinkDir=/usr/local/bin resource_creation_mode=3 sys.component.10792$Boolean=false sys.component.1108$Boolean=false sys.component.13573$Boolean=false sys.component.17789$Boolean=false sys.component.288$Boolean=true sys.component.289$Boolean=false sys.component.295$Boolean=true sys.component.299$Boolean=false sys.component.3219$Boolean=false sys.component.4394$Boolean=false sys.component.5558$Boolean=false sys.component.6930$Boolean=false sys.component.7639$Boolean=false sys.component.8434$Boolean=false sys.component.974$Boolean=false ``` -------------------------------- ### MySQL Configuration Example Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_database_mysql.htm This configuration is suitable for large AggreGate installations. Ensure `/data/mysql` is replaced with your actual MySQL data directory. ```ini [mysqld] port = 3306 # You can use socket settings from the auto-generated configuration file. socket = `/tmp/mysql.sock default-storage-engine = INNODB datadir = `/data/mysql max_connections = 1000 max_allowed_packet = 100M innodb_flush_log_at_trx_commit = 0 innodb_buffer_pool_size = `2G innodb_log_file_size = `500M innodb_log_buffer_size = 8M innodb_lock_wait_timeout = 1200 innodb_file_per_table = 1 sort_buffer_size = 20M query_cache_size = 100M table_open_cache = 10000 table_definition_cache = 10000 thread_cache_size = 32 innodb_thread_concurrency = 0 character-set-server = utf8 collation-server = utf8_unicode_ci ``` -------------------------------- ### Run AggreGate Installer Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_installation_running_in_docker_container.htm Executes the AggreGate installation script. ```bash $ ./ ``` -------------------------------- ### Example of substring function usage Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_wui_exposing_apps.htm Illustrates the use of the substring function to extract a portion of a string, starting from a specified index. This is used to get the dashboard name after finding the last dot. ```AggreGate Expression Language substring("users.admin.dashboards.landingDashboard", 22+1) ``` -------------------------------- ### Device Connection Tutorial Action Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_conref_devices.htm This action launches an interactive tutorial to guide users through connecting a new device to the AggreGate Server and configuring it. ```APIDOC ## Device Connection Tutorial Action ### Description This action launches an interactive tutorial to guide users through connecting a new device to the AggreGate Server and configuring it. ### Action Name guide ### Non-Interactive Mode Not supported ### Access Rights Available at the Observer access level. ``` -------------------------------- ### Implementing setupMyself() Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_plugin_context_implementing.htm Override this method to configure your context, including adding variables, functions, events, and actions. ```Java protected abstract void setupMyself(); ``` -------------------------------- ### Demo Device Driver Example Files Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_ddk.htm This example includes the source code for a demo device driver, its plugin descriptor, and a Gradle build file for packaging the driver as a JAR archive. ```java DemoDeviceDriver.java - исходный код для драйвера ``` ```properties plugin.properties - дескриптор плагина драйвера ``` ```gradle build.gradle- файл сборки проекта для Gradle с единственным заданием собрать драйвер в виде JAR-архива. ``` -------------------------------- ### Single-line Comment Example Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_internals_expressions_syntax_comments.htm Use single-line comments starting with // to explain specific parts of an expression. These comments extend to the end of the current line. ```plaintext 10 // Low threshold && {temperature} < 30 // High threshold]]> ``` -------------------------------- ### Build Script Example (build.xml) Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_web_application_implementing.htm This is an example snippet from a `build.xml` file used for creating and deploying AggreGate plugins. It outlines steps for setting project names, build targets, and copying artifacts. ```xml ``` -------------------------------- ### Refresh API Request Example Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_rest_api_reference_refresh.htm Demonstrates how to make a GET request to the /refresh endpoint to obtain a new token. Ensure the Authorization header is correctly set. ```http GET https://localhost:8443/rest/refresh ``` -------------------------------- ### Guide: Connect External Device Server to AggreGate Server Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_conref_external_device_server.htm Launches an interactive guide to assist the user in connecting External Device Servers to the AggreGate Server. ```APIDOC ## Guide: Connect External Device Server to AggreGate Server ### Description Launches an interactive guide to assist the user in connecting External Device Servers to the AggreGate Server. ### Method guide ### Notes - Non-interactive mode: Not supported - Permissions: Available for _Observer_ access level ``` -------------------------------- ### GET Request for Context Variable Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_rest_api_reference_variable_get.htm Use this endpoint to fetch details of a specific context variable. You can control the number of returned records and their starting offset using query parameters. ```http GET https://localhost:8443/rest/v1/contexts/users.admin.models.example/variables/exampleTable?limit=2&offset=2 ``` -------------------------------- ### Define a Server Action Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_programming_defining_actions.htm Create a `ServerActionDefinition` object to define a new action. Set its name, description, and permissions. This is typically done in the `install()` or `start()` methods of plugins and drivers. ```java ServerActionDefinition ad = new ServerActionDefinition("configurationWizard", ActionImplementationClass.class); ad.setDescription("Configuration Wizard"); ad.setPermissions(ServerPermissionChecker.getManagerPermissions()); ``` -------------------------------- ### Register New User with AggreGate Server Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_web_service_examples.htm This example demonstrates how to create a new AggreGate Server user account by calling the 'register' function. SOAP client creation and error checking are omitted for brevity. ```php $params[0]="phpuser"; // Username (value for record 0, field 0 of function input Data Table) $params[1]="test"; // Password (value for record 0, field 1) $params[2]="test"; // Repeat Password (value for record 0, field 2) urldecode($client->callByStringArray("admin", "admin", "", "register", $params)); // Calling function via Web Service ``` -------------------------------- ### Extract Substring with mid() Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_internals_expressions_functions_string.htm Use mid() to get a portion of a string starting at a specific index and with a defined length. If the specified length exceeds the remaining characters, it extracts up to the end of the string. ```string mid("abcdef", 2, 3) ``` -------------------------------- ### Camel Case Naming for Context Names Source: https://aggregate.digital/docs/aggregate/ru_6.4/low_code_best_practices_naming_conventions.htm Use lowerCamelCase for naming context objects, starting with a lowercase letter and capitalizing the first letter of subsequent words. Example: `monitoringMainPage`, `mqttDevice`. ```text monitoringMainPage ``` ```text mqttDevice ``` -------------------------------- ### Adding Create Action Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_plugin_context_implementing.htm Use this method within setupMyself() to enable users to create child resources. ```Java addCreateAction() ``` -------------------------------- ### Example Validity Expression for Device Reports Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_validity_update_rules.htm This expression checks if a device's description starts with 'Collector_'. It's used to determine if a report should be applicable to a device based on its description. ```AggreGate Expression Language startsWith({info$type}, "device.") && startsWith({info$description}, "Collector_") ``` -------------------------------- ### R Integration with Linux Setup Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_scripts_r.htm To integrate R with AggreGate on Linux, install R and the rJava library. Use 'R CMD javareconf' for configuration and copy 'libjri.so' to the AggreGate Server's 'lib' directory. ```bash R CMD javareconf ``` -------------------------------- ### Web Application Deployment Descriptor Example (web.xml) Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_web_application_implementing.htm Modify this example `web.xml` file to configure your web application's deployment descriptor. Update display names, servlet mappings, and servlet classes as needed. ```xml Your Web Application Name yourServletName com.yourcompany.YourServletClass yourServletName /your-url-pattern ``` -------------------------------- ### Start AggreGate Server with Upstart Source: https://aggregate.digital/docs/aggregate/ru_6.4/ls_service.htm Use this command to start the AggreGate Server for the first time on systems using Upstart. ```bash initctl start ag_server ``` -------------------------------- ### Get Variable Information Source: https://aggregate.digital/docs/aggregate/ru_6.4/int_rest_api_reference_variable_get.htm Retrieves information about a specific context variable. You can specify the context path and variable name. Optional parameters include 'limit' to restrict the number of returned records and 'offset' to specify the starting point for the records. ```APIDOC ## GET /v1/contexts/{contextPath}/variables/{variable} ### Description Retrieves information about a context variable. The response contains information about this variable. You can use additional parameters to limit the number of fields in the output and set an offset for the fields. ### Method GET ### Endpoint `/v1/contexts/{contextPath}/variables/{variable}` Replace `{contextPath}` with the full context path. For the _root context_, use `server` as `{contextPath}`. Replace `{variable}` with the variable name. ### Parameters #### Header Parameters - **Authorization** (string) - Authentication token. See Authentication section for more details. #### Query Parameters - **limit** (integer) - Optional. Maximum number of records to return. - **offset** (integer) - Starting offset for the returned records. Optional. #### Response ##### Success Response (200) - **name** (string) - The name of the variable. - **description** (string) - The description of the variable. ### Request Example ``` GET https://localhost:8443/rest/v1/contexts/users.admin.models.example/variables/exampleTable?limit=2&offset=2 ``` ### Response Example ```json [ { "name": "Room_3", "description": "Storage Area" }, { "name": "Room_4", "description": "Boiler Room" } ] ``` ```