This topic describes the use of the ETP Adapter suite in a sample application to query and update data in an ETP server. For more information about this operator, see ETP Adapters.
The ETP adapters are provided for Microsoft Windows systems only.
In order to run correctly, the adapters in this sample require that the Microsoft .NET Framework 4.8 or later be installed on your machine.
The sample's configuration file must be edited prior to running the sample to point to a working, accessible ETP server (with, optionally, additional settings to specify any required authentication credentials).
To configure the sample to connect to a different server, modify the
server-url entry of
src/main/configurations/ETP.conf to point to the ETP server of your
choice. If this server requires authentication or use of a proxy server, you will
also need to modify these values as applicable:
This sample demonstrates the adapters in the ETP adapter suite:
In StreamBase Studio, import this sample with the following steps:
From the top-level menu, select> .
etpto narrow the list of options.
Select ETP adapters from the IoT Adapters category.
StreamBase Studio creates a project for the ETP adapter sample in your current Studio workspace.
The steps to run this sample in Studio are as follows:
In the Project Explorer view, open this sample's folder.
Keep an eye on the bottom right status bar of the Studio window. Make sure any
Rebuild projectmessages finish before you proceed.
ETP.confconfiguration file, and edit the
server-urlsetting to point to a running ETP server. You may also need to edit other settings such as
password, or the proxy-related entries, depending on your ETP server's connection requirements.
etp.sbappfile and click the Run button. This opens the SB Test/Debug perspective and starts the module.
Wait for the Control operator to issue a status tuple indicating the connection was successful. If a connection problem occurs the console will provide more information.
In the Manual Input view, select the
DiscoveryIninput stream, and enter
eml://in the uri field, then click . This will return one or more tuples on the
DiscoveryResultsoutput stream containing the entries representing all the top-level nodes available on your ETP server. For each of these entries, you can feed the value of the
resource.urifield back to the
DiscoveryInstream to drill down and browse that node's children nodes.
In the manner described in the previous step, drill down to a child node whose
contentTypeis included in the list returned initially by the Control operator's
Connectedstatus tuple in its serverInfo.supportedObjects field. Use the node's
urifield's value as the input for the
urifield, to query the node's value.
In the Manual Input view, select the
StreamingIninput stream, and enter the following field values:
uris: The value of the
urifield that you used in the previous step
Click, and observe that
StreamingStatusoutput stream acknowledged the success of the operation, and the
StreamingMetadataResultsoutput stream also emitted a tuple containing the description of the requested node. Its
channelsfield contains a list of all subscribable values. You can use the
channelIDvalue of one or more of these entries to subscribe to real-time updates of these values by setting the
streamingStartand create entries in the
channelInfoslist field, taking care to also set the
receiveNotificationsfield's value to
true(otherwise only a snapshot value will be returned rather than real-time updates). To initiate a subscription and start getting real-time updates on those value from the operator's
You can stop the subscriptions initiated in the previous step by setting the
streamingstopand filling in the
channelIDsfield with the list of channelID values for which you no longer wish to receive updates.
When done, press F9 or click the Terminate EventFlow Fragment button.
This sample contains the following files:
The sample EventFlow application,
etp.sbapp, located in the
The adapter configuration file,
ETP.conf, located in
Readmefile, in plain text and HTML formats.
When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.
Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.
Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:
See Default Installation
Directories for the default location of
studio-workspace on your system.