ni / niveristand-embedded-data-logger-custom-device

VeriStand embedded data logger custom device
MIT License
3 stars 10 forks source link

File archive support #11

Closed debryant closed 4 years ago

debryant commented 4 years ago

What does this Pull Request accomplish?

Add support for optionally moving closed tdms files to a user specified archive directory

Why should this Pull Request be merged?

A directory of completed files can serve as a staging area for moving these to another location on the network

What testing has been done?

Ran existing auto-tests. Added a new auto test for this feature. Manually tested the system explorer changes.

Details of VI changes

Shared Constants.vi -Properties tab: Added entries for Log File Dir, Timestamp, Log Archive Dir, and Archive Files

Configuration File Page: -Added controls to the UI for Archive Files (boolean) and Archive Directory (Path)

Get Data Log File Settings.vi: -Read Archive Files and Log Archive Dir properties -Rearranged indicators on conpane to allow the Archive and Archive Log Directory to be side by side -Replace hard coded constants with globals from Shared/Constants.vi

Build Data Log Archive Path.vi: (new)

Engine File Logging Specification.ctl: -Add controls for Archive (boolean) and Archive Directory (path)

Get Data Log File Settings.vi -Read Archive Files and Log Archive Dir properties -Rearranged indicators on conpane to allow the Archive and Archive Log Directory to be side by side -Replace hard coded constants with globals from Shared/Constants.vi

Initialize Logging Data.vi -Wire Get Data Log File Settings.vi subVI's Archive and Archive Log Directory outputs into File Logging Specification cluster control

Asynchronous Logging Loop.vi: -Initialize case: If Archive, create the Archive Directory hierarchy folders -Close File: Move inner structure contents into subVI "Flush Close Archive File.vi" -Shutdown case: Replace inner structure contents with subVI "Flush Close Archive File.vi"

Flush Close Archive File.vi: (new) -Main code is from Asynchronous Logging Loop.vi Close/Shutdown cases -Added support to move the file to the Archive Directory if Archive is True

Embedded Data Loggger Engine.lvlib: -Add Flush Close Archive File.vi

Tests Assert Log File Exists.vi: (new) Assert Log File is Empty: (new)

EDL.vissdf -Add 2nd logger definition for file archive testing

Embedded Data Logger System Tests.lvclass -Add new VIs -Various connector pane/state changes to other VIs

Log Command.vi Log Trigger.vi -Add param for Embedded Data Logger File Name so can use this VI for multiple data logger file tests

setUp.vi -Delete pre-existing log directories before starting the testing

test Log Archive.vi (new)

test Log File.vi -Update to param changes made to Log Command.vi and Log Trigger.vi

niveristand-diff-bot commented 4 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Asynchronous Logging Loop.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20Engine.lvlib--Asynchronous%20Logging%20Loop.vi.png)
Embedded Data Logger Engine.lvlib--Flush Close Archive File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20Engine.lvlib--Flush%20Close%20Archive%20File.vi.png)
Embedded Data Logger Engine.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20Engine.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger Engine.lvlib--Initialize Logging Data.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20Engine.lvlib--Initialize%20Logging%20Data.vi.png)
Embedded Data Logger System Explorer.lvlib--Build Data Log Archive Path.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Build%20Data%20Log%20Archive%20Path.vi.png)
Embedded Data Logger System Explorer.lvlib--File Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20System%20Explorer.lvlib--File%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/09%3A25%3A45/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)

The following VIs could not be diffed:

niveristand-diff-bot commented 4 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Asynchronous Logging Loop.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20Engine.lvlib--Asynchronous%20Logging%20Loop.vi.png)
Embedded Data Logger Engine.lvlib--Flush Close Archive File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20Engine.lvlib--Flush%20Close%20Archive%20File.vi.png)
Embedded Data Logger Engine.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20Engine.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger Engine.lvlib--Initialize Logging Data.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20Engine.lvlib--Initialize%20Logging%20Data.vi.png)
Embedded Data Logger System Explorer.lvlib--Build Data Log Archive Path.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Build%20Data%20Log%20Archive%20Path.vi.png)
Embedded Data Logger System Explorer.lvlib--File Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20System%20Explorer.lvlib--File%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/11%3A29%3A51/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)

The following VIs could not be diffed:

debryant commented 4 years ago

Good call on the location of where the log file definition is initially set. I updated the code to use that location.

Regarding your comment on the Archive Directory always updating if Archive Files is disabled... This was agreed upon by Lynn and Darin in theory. We'll see if everyone continues to agree in practice.

buckd commented 4 years ago

Regarding your comment on the Archive Directory always updating if Archive Files is disabled... This was agreed upon by Lynn and Darin in theory. We'll see if everyone continues to agree in practice.

If Darin has seen it and agreed, I'm good with it.

debryant commented 4 years ago

Added the library change.

niveristand-diff-bot commented 4 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Asynchronous Logging Loop.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20Engine.lvlib--Asynchronous%20Logging%20Loop.vi.png)
Embedded Data Logger Engine.lvlib--Flush Close Archive File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20Engine.lvlib--Flush%20Close%20Archive%20File.vi.png)
Embedded Data Logger Engine.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20Engine.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger Engine.lvlib--Initialize Logging Data.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20Engine.lvlib--Initialize%20Logging%20Data.vi.png)
Embedded Data Logger System Explorer.lvlib--Add Log File RTM.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Add%20Log%20File%20RTM.vi.png)
Embedded Data Logger System Explorer.lvlib--Build Data Log Archive Path.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Build%20Data%20Log%20Archive%20Path.vi.png)
Embedded Data Logger System Explorer.lvlib--File Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--File%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Default Log File Directory.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Default%20Log%20File%20Directory.vi.png)
Embedded Data Logger System Explorer.lvlib--Main Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Main%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--New Log File Configuration.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/15%3A31%3A25/Embedded%20Data%20Logger%20System%20Explorer.lvlib--New%20Log%20File%20Configuration.vi.png)

The following VIs could not be diffed:

buckd commented 4 years ago

image

This is the default log path the custom device gives me now for PharLap, Windows, VxWorks

debryant commented 4 years ago

image

Also re-ran auto tests

niveristand-diff-bot commented 4 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Asynchronous Logging Loop.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20Engine.lvlib--Asynchronous%20Logging%20Loop.vi.png)
Embedded Data Logger Engine.lvlib--Flush Close Archive File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20Engine.lvlib--Flush%20Close%20Archive%20File.vi.png)
Embedded Data Logger Engine.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20Engine.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger Engine.lvlib--Initialize Logging Data.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20Engine.lvlib--Initialize%20Logging%20Data.vi.png)
Embedded Data Logger System Explorer.lvlib--Add Log File RTM.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Add%20Log%20File%20RTM.vi.png)
Embedded Data Logger System Explorer.lvlib--Build Data Log Archive Path.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Build%20Data%20Log%20Archive%20Path.vi.png)
Embedded Data Logger System Explorer.lvlib--File Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--File%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Default Log File Directory.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Default%20Log%20File%20Directory.vi.png)
Embedded Data Logger System Explorer.lvlib--Main Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Main%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--New Log File Configuration.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-10/18%3A31%3A28/Embedded%20Data%20Logger%20System%20Explorer.lvlib--New%20Log%20File%20Configuration.vi.png)

The following VIs could not be diffed:

buckd commented 4 years ago

@debryant Have you tested the log archive on a remote target or just using the Windows automated test?

debryant commented 4 years ago

Yes, I tested the log archive feature on a Linux 64bit target. Also, just found a bug in deleting the index file. Ironically this case was tested incorrectly in a unit test :( so I fixed that too.

niveristand-diff-bot commented 4 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Asynchronous Logging Loop.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20Engine.lvlib--Asynchronous%20Logging%20Loop.vi.png)
Embedded Data Logger Engine.lvlib--Flush Close Archive File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20Engine.lvlib--Flush%20Close%20Archive%20File.vi.png)
Embedded Data Logger Engine.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20Engine.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger Engine.lvlib--Initialize Logging Data.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20Engine.lvlib--Initialize%20Logging%20Data.vi.png)
Embedded Data Logger System Explorer.lvlib--Add Log File RTM.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Add%20Log%20File%20RTM.vi.png)
Embedded Data Logger System Explorer.lvlib--Build Data Log Archive Path.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Build%20Data%20Log%20Archive%20Path.vi.png)
Embedded Data Logger System Explorer.lvlib--File Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--File%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Data Log File Settings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Data%20Log%20File%20Settings.vi.png)
Embedded Data Logger System Explorer.lvlib--Get Default Log File Directory.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Get%20Default%20Log%20File%20Directory.vi.png)
Embedded Data Logger System Explorer.lvlib--Main Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--Main%20Page.vi.png)
Embedded Data Logger System Explorer.lvlib--New Log File Configuration.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/VeriStand/ni/niveristand-embedded-data-logger-custom-device/PR-11/2020-02-12/15%3A31%3A33/Embedded%20Data%20Logger%20System%20Explorer.lvlib--New%20Log%20File%20Configuration.vi.png)

The following VIs could not be diffed: