inductiveautomation / ignition-sdk-examples

Ignition SDK Example Projects
164 stars 92 forks source link

Ignition SDK

Example Modules

Gradle Examples

Perspective Component

Adds a simple image component to the Perspective module's set of components. In addition, utilizes Gradle as the build tool. See the example readme for additional information.

Maven Examples

Expression Function

Creates an exampleMultiply expression that can be used by other components, such as expression tags. The example expression is located under the Extended expression category.

Gateway Network/Get Remote Logs

Requires two Gateways connected via the gateway network. The module must also be installed on both Gateways. This module adds a system.example.getRemoteLogEntries script function that can retrieve console log entries from a remote Gateway over the gateway network. Also adds a Gateway Task type that can retrieve a remote gateway’s wrapper log and save as a local file.

Gateway Webpage/Home Connect

Demonstrates how to implement Gateway Status and Config pages. HomeConnect pages are added to the Gateway that configure an imaginary HomeConnect device.

Managed Tag Provider

Shows how to implement a Managed Tag Provider, to allow easy control of Ignition tags from an external program or data.

OPC UA Device

Creates an example device in the Gateway. The device will create tags that are visible under the local OPC-UA server.

Perspective Component

Adds component to the Perspective module's set of components, demonstrating use of various APIs in a build automation which represents one possible solution for 'production' toolchains. In addition, utilizes Gradle as the build tool. See the example readme for additional information.

Perspective Minimal Component

Adds a single simple component to the Perspective component palette. This minimal example demonstrates the minimal APIs required to register a single simple component. See the larger Perspective Component example for

Report Component

Adds a Smiley shaped component to the Report Designer.

Report Datasource

Adds a datasource to the report designer that can retrieve JSON data via a REST call to a website.

Scripting Function (RPC)

Adds a system.example.multiply script that can be executed from both a client and a Gateway. Also demonstrates how the client can call a method in the Gateway via RPC.

Slack Alarm Notification

Adds a Slack Alarm Notification type that handles alarm notifications through Slack's outgoing webhooks.

Vision Component

Creates a Hello World component that can be dragged onto a window in the Designer.

The Module Build System

These examples utilize either Maven and our Maven Plugin, or Gradle and our Gradle Plugin. Both tools are mature and capable, offering different tradeoffs in terms of performance, ease of customization, language support, etc. If you prefer XML configuration, take a look at Maven. If you prefer declarative programming-language based configuration, check out Gradle. Inductive Automation uses Gradle to build Ignition and our own modules with the same open source plugin linked above.

The ignition-maven-plugin is available through our Nexus Repository (see examples for how to add to dependency sources).

The Gradle Plugin is published to the Gradle Plugin Portal, and may be used simply by applying the plugin to your gradle project.

General Requirements

These requirements generally apply to both Gradle and Maven build tools.

Getting Started

Running Maven Examples

The Module Build System

Most examples utilize Maven and our Maven Plugin. The ignition-maven-plugin is available through our Nexus Repository (see examples for how to add to depenency sources).

Perspective examples utilize our gradle plugin, which is also open source and available in the ignition-module-tools.

Running Gradle Examples

For instructions on how to build with the Gradle plugin, take a look at the documentation on the Gradle Plugin repository.

Javadocs

Head over to our wiki page for a listing of 8.0+ javadocs.