Developing a ThingPoint Application with EMS
Go Up to ThingPoint Overview
You can create a new ThingPoint application that uses a TEMSEdgeService component to listen for requests from the EMS Server, and respond back with the needed data.
You need the following components in your ThingPoint application:
- TEMSProvider component is used to set up the connection with the EMS Server.
- TEMSEdgeService component is used for registering the ThingPoint with the EMS server and for start listening for requests from the EMS Server.
Contents
Connecting a ThingPoint Application with the EMS Server
The ThingPoint uses the TEMSProvider component to set up the connection to the EMS Server. Modify the following properties to set up the connection properly.
- URLHost. The URL of the EMS Server. Use:
localhost
if the EMS Server is running on the same machine as the ThingPoint.- IP Address of the remote EMS Server if it is running on a different machine in which the ThingPoint runs.
- URLPort. The connection port of the EMS Server.
- Default value:
8080
- Default value:
- URLProtocol. The URL protocol identifier for the request to the EMS Server. Possible values are
http
andhttps
.- Default value:
http
- Default value:
You may also need to configure the EMS Server Authorization settings needed to connect to the EMS Server.
Listening to Requests from the EMS Server
The ThingPoint uses the TEMSEdgeService component to listen for requests from the EMS Server. Modify the following properties to set up the listening service properly.
- Provider: TEMSProvider component that identifies connection parameters to the EMS server.
- ModuleName: Name identifier for the ThingPoint to uniquely identify it in the EMS Server.
- ListenerProtocol. The protocol identifier for the request from the EMS Server. Possible values are
http
andhttps
.- Default value:
http
- Default value:
- Connection parameters of the ThingPoint application:
- ListenerService.Host. Host info where the ThingPoint is running.
localhost
if the ThingPoint is running on the same machine as the EMS Server.- IP Address of the remote ThingPoint if it is running on a different machine in which the EMS Server runs.
- ListenerService.Port. The connection port in which the ThingPoint application is listening for requests from the EMS Server.
- ListenerService.Host. Host info where the ThingPoint is running.
Adding an EMS Resource to a ThingPoint
You can also add new EMS resources to an existing ThingPoint by adding additional EMS modules.
To add a new Resource to a ThingPoint and declare its Endpoints, see Creating an EMS Package.
A ThingPoint has a built-in Resource which is called version
. For instance, to retrieve version information for a ThingPoint from a browser use:
http://<URLHost>:<URLPort>/edgemodules/<ModuleName>/version
Accessing ThingPoint Resources from a Client Application
You can access any ThingPoint resources from an EMS Client Application.
To access a ThingPoint resource, you need to identify it as follows:
edgemodules/<ModuleName>/<ResourceName>