NI InsightCM™ SDK Help
»View Product Info
The File Manager process manages data events from the time that the Data Event Creator process creates them until the Server Comm module successfully transfers them to NI InsightCM Server. This process handles files in two formats: in-memory data events and data events on disk. For more information, refer to In-Memory Data Events Versus Data Events on Disk.
- Transfers data events to NI InsightCM Server. For data events created by the Data Event Creator process, this process sends data events that are still in memory. However, if such a data event cannot be transferred immediately, this process saves the in-memory data event to disk to be transferred later.
- Buffers data events to prevent data loss when the network connection between device and server is down.
- Receives a response from NI InsightCM Server whenever it receives a data event to verify the transfer was successful and prompt the data event to be deleted.
- Tracks open streams between the device and server, which means the device is currently transferring data events that are part of a stream acquisition to the server.
- Ensures a minimum percentage of disk space remains free several minutes after start-up by deleting the oldest data events.
- Transfers any data events that are still on disk from the previous execution to NI InsightCM Server on start-up.
Communicating with this Process
The File Manager»Send Message palette contains a VI for transferring two types of data events to NI InsightCM Server:
- In-memory data events—You can open an in-memory data event and write to it prior to sending this message to File Manager with a reference to the file.
- Data events stored on disk—Create a standard data event on disk and provide this message with its file path to transfer the file to the server.
You can specify that this VI transfer the original data event that Data Event Creator creates or that it create and transfer a copy of that data event to the server.
You can set the following properties in a software configuration definition. This process reads from the software configuration definition when it initializes.
- ManageDriveIntervalMinutes (Default: 1)—The interval in minutes at which this process evaluates whether the device has sufficient free disk space, as specified by the MinDriveFreeSpace property.
- MaxTdmsFilesInMemory (Default: 15)—The number of in-memory data sets this process handles simultaneously. If this process receives a SendTdmsInMemory message with a new in-memory data set when it has already reached the MaxTdmsFilesInMemory value, this process writes the incoming in-memory data set to disk to be transferred to the server later and then removes the original data set from memory.
- MinDriveFreeSpace (Default: 30)—The minimum percentage of disk space to keep free. If the percentage of free disk space falls below this value, this process deletes the oldest data sets until sufficient disk space is free.
In-Memory Data Events Versus Data Events on Disk
- In-memory data events—The built-in Data Event Creator process writes and stores data events in memory rather than writing them to disk. When possible, this process sends data events from memory directly to the server. However, if the data event cannot be transferred immediately, this process saves the in-memory data event to disk and enqueues it to be transferred later.
- Files on disk—If you develop a code module that saves data events to disk, you can transfer them to File Manager to be handled similarly to data events from the built-in Data Event Creator process. This process converts data events from the built-in Data Event Creator process from in-memory data events to data events on disk if it cannot transfer them to the server immediately and must buffer them.
Customizing the Behavior of NI-Developed Processes
Creating Data Events and Transferring Them to the Server
Data Event Creator Process