Product Documentation

FairCom Edge IoT Database

Previous Topic

Next Topic

Tutorial for the ThingWorx AlwaysOn Connector

This tutorial demonstrates the basics of installing and using the FairCom Edge ThingWorx AlwaysOn Connector.

This tutorial assumes an existing ThingWorx platform is available. It will connect to ThingWorx using the ThingWorx AlwaysOn protocol (

FairCom Edge requires the creation and configuration of a FairCom Edge "thing" in ThingWorx. Refer to the ThingWorx website for more information about using ThingWorx.

You will need to install and start the FairCom Edge server, as described in Download and Installation in the FairCom Edge Developer's Guide.

The following PLUGIN keyword has been added to the FairCom Edge ctsrvr.cfg file, which is located in the /config folder:

PLUGIN ctthingworx;./thingworx/

  • If you are using the ThingWorx AlwaysOn plug-in, be sure there is no semicolon (;) at the beginning of that line. The semicolon is present by default and should be removed.
  • The above example is for Linux. On Windows, the library is called ctthingworx.dll.

The following directory has been added to the FairCom Edge Configuration File under the /server folder: - plug-in dynamic library (Linux only)

ctThingWorx.dll - plug-in dynamic library (Windows only)

fccert.pem - self-signed certificate for SSL

ctreeEDGE_entities.xml - required platform entities for the plug-in

FairCom Edge also adds a new configuration file to the /config folder: ctthingworx.json. This file is used to configure the ThingWorx AlwaysOn plug-in.

In This Chapter

Multiple ThingWorx "things"

ThingWorx Store and Forward

Automatic Reconnection to ThingWorx

Previous Topic

Next Topic

Multiple ThingWorx "things"

The ThingWorx plug-in can map a FairCom Edge instance to multiple "things" on the ThingWorx platform making it possible for a business to create a digital twin for each of its customers and map a subset of data in FairCom Edge to each customer.

As shown in the following example, Mike’s car can be associated with two Things, the location where service is provided (Car Dealer) and with the Digital Twin of Mike’s car.

Learn more...

Previous Topic

Next Topic

ThingWorx Store and Forward

This release has a new powerful persistent data store. FairCom Edge’s Store & Forward solution is critical for ensuring data integrity across an application. In a complex IIoT scenario (think factory floor, smart city, etc.), being able to rely 100% on communication links is not realistic. When some level of outage occurs, being able to safely secure the message is a must. The Store & Forward concept provides the peace of mind that the information needed by the next component in the IIoT ecosystem will be available once the communication link is reestablished. Store & Forward maintains a record of the last message received. Once communication is reestablished, any messages that haven’t been delivered will automatically be sent. This brings an unsurpassed level of data integrity to the ThingWorx platform.

Learn more...

Store & Forward configuration is done in the ThingWorx GUI for each table.

FairCom Edge provides two ways for mapping FairCom Edge fields into ThingWorx:

  • Current Values - The current values of the FairCom Edge fields are mapped into ThingWorx (this is the same as FairCom Edge V3),
  • History Values - The Store & Forward features allow persisted values to be mapped into ThingWorx.

Current Values

This is exactly the same as the existing functionality in V3 of the ctThingWorx plug-in. The new steps to configure this mode are shown below:

  1. Edit the ctEdge properties:

  2. Click on DatabaseList:

  3. Click on TableList of the selected database:

  4. Click on FieldList of the selected table:

  5. Click on FieldUpdateProperty of the field that should be mapped:

  6. Edit the FieldUpdateProperty:

  7. Configure the FieldUpdateProperty for the current value update only:
    • Set the CurrentValueMinimalInterval in seconds. For example, if it is 60, the it will not be updated more than once within the 60 seconds.
    • Uncheck the History option. It is used only with Store & Forward.
    • You can enter the PropertyName. If it is blank, a name will be automatically created.
    • Check the Sync option for mapping the FairCom Edge field to the ThingWorx property.

  8. All the other steps remain unchanged from the previous version.

History Values (Store & Forward)

The steps to configure this mode are shown below:

  1. Edit the ctEdge properties:

  2. Click DatabaseList:

  3. Click TableList of the selected database:

  4. Click StoreAndForward of the selected table:

  5. Edit the StoreAndForward settings:

  6. Configure the StoreAndForward for the current table:
    • Make sure Enable is checked to be able to use the Store & Forward feature for any of its fields.
    • If HistoryCatchUp is checked, Store & Forward newSubscriberDeliveryMode is set to StoredMessages. If it is not checked, it is NewMessages.
    • MaxHistoryCount is the newSubscriberMaxStoredMessages parameter of Store & Forward.
    • MaxRatePerSecond is the maxDeliveryRatePerSecond parameter of Store & Forward.

  7. Confirm all dialogs until you get back to the TableList, then click FieldList.

  8. Click FieldUpdateProperty of the field that should be mapped:

  9. Edit the FieldUpdateProperty:

  10. Configure the FieldUpdateProperty for the history value update (Store & Forward):
    • Make sure the History option is checked. Note that in this case the CurrentValueMinimumInterval value is ignored.
    • You can enter the PropertyName. If it is blank, a name will be created automatically.
    • Check the Sync option for mapping the FairCom Edge field to the ThingWorx property.

  11. All the other steps remain unchanged from the previous version.

The Store & Forward mechanism allows subscribing multiple times to the same instance. Although each table in a FairCom Edge instance has one Store & Forward instance, each ThingWorx thing mapped to the table is a new subscriber for the existing Store & Forward instance.

To support this representation, a class has been created to represent a "thing" subscribing to an existing Store & Forward instance (which is represented by class CTTWTableStoreAndForward): CTTWTableStoreAndForwardSubscription

The CTTWTableStoreAndForward class now has a list of subscribers (CTTWTableStoreAndForwardSubscription instances) under a hash table with the "thing name" as the key.

The Store & Forward parameters are defined on a Thing/Table level in the ThingWorx platform, so it has been moved from the CTTWTableStoreAndForward to CTTWTableStoreAndForwardSubscription. So, each subscriber can define its own rules for the Store & Forward.

Previous Topic

Next Topic

Automatic Reconnection to ThingWorx

When the FairCom Edge instance loses its connection to the ThingWorx platform (because of the network, device outage, or any other reason), the FairCom Edge server instance automatically reconnects. Note that, after 3 reconnection attempts with an interval of 5 seconds between each, these reconnection attempts will cease.

Learn more...