Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Post-Processing Data with Fileflow Script

NI InsightCM™ SDK Help

Edition Date: July 2017

Part Number: 375191C-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Creating Data Sets and Transferring Them to the Server

When you develop the device software, you might choose to decouple data set creation from post-processing operations that the software performs. Consider the following example:

  1. The Data Event Creator process will write measurement data and data-related properties to a data set
  2. You want the device to write additional data event properties that the visualization software will rely on
  3. The File Manager process will manage the completed data set until it is transferred to the server

Because the additional properties relate to the visualization software rather than the data, separating this operation from the Data Event Creator process creates more modular code. Develop a new process and integrate it with the Fileflow Script, an infrastructure feature of the SDK that implements a loosely coupled order of operations on in-memory data sets. Integrate a process with the Fileflow Script feature using its two components:

  • The Fileflow Script is a single list of processes ordered by the position at which you want their operations to occur. You can add, remove, or change the processes in the Fileflow Script depending on your unique programming goals.
  • The Fileflow Script API, when called to transfer a file to the next process, looks up the next process in the Fileflow Script. The API sends a Qbus message with a reference to the file to the next process. In other words, processes do not need to hard code the name of the recipient for their data sets.

Role of Fileflow in Data Set Operations

The NI-developed Data Event Creator process automatically sends in-memory data sets to the first process in the Fileflow Script. You can add processes you develop to the Fileflow Script and/or remove NI-developed processes.

Requirements for Integrating a Process with the Fileflow Script

When you integrate a process with the Fileflow Script, you must ensure the following behaviors are true:

  • The process contains code to handle ProcessFileflow Qbus messages, which the Fileflow Script API sends to transfer a file to the next process. Processes return these messages when they are the oldest message in the message queue, just as they return other Qbus messages.
  • The process can receive and evaluate any file, regardless of which process sent it. This allows you to insert a process into the Fileflow Script without rewriting the adjacent processes to account for the change.
  • The process can transfer data to the next process without operating on the data if the data does not contain desired elements or properties. This behavior is required because a data set must pass through every process in the Fileflow Script.
  • The process does not need to know the recipient for its data sets. In other words, rely on the Fileflow Script API to look up the name of the next process in the Fileflow Script. This allows you to insert a process into the Fileflow Script without rewriting the adjacent processes to account for the change.

Related Information

Setting the Processes in the Fileflow Script

Handling a Data Set in the Fileflow Script

Data Event Creator Process


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit