Chris Cilino Posted April 3, 2019 Report Share Posted April 3, 2019 (edited) Description The Watchdog is composed of 3 main sections of code: Perpetrators: A perpetrator is something the watchdog knows to monitor or look out for. The most common perpetrator would be "elapsed time". We want the watchdog to notify us if a certain amount of time has elapsed. But...what if you wanted the watchdog to monitor many types of perpetrators? Disk usage? CPU usage? Temperature? Hence the perpetrator class was born and is a circumstance that the watchdog watches out for. Barks: a bark is what happens when the watchdog spots a perpetrator. You might want the watchdog to send you an email, or a text message or write to file or... Hence the "bark" class was born. When the watchdog sees a perpetrator it barks. Watchdog: this is the asynchronous engine that monitors perpetrators and barks when it spots a condition. Perpetrators and barks can be extended through inheritance so you can create your own circumstances to monitor and actions to take. The watchdog can monitor N perpetrators and preform M barks. API Example Below we see an example usage of the watchdog written using the Sequencer Pattern First, we create a perpetrator. In this case we want the watchdog to watch for time. If the watchdog is not petted within one second it will bark. Note you can build an array of Perpetrators. WatchDog Bark Configuration. Here we see three barks being configured. The first bark is a dialog box that will appear with the text "My Popup". The second is to send an email. The third is to send a text message. Last we "set the watcdog loose" to start monitoring our perpetrator. Here you can see we start the watchdog and tell it to monitor perpetrators and preform bark actions. In a for loop we pet the watchdog. Petting the watchdog reset equal to true resets the condition the watchdog was monitoring. So that if it noticed a perpetrator, it will start monitoring again. Because the watchdog is set to monitor a timeout not to exceed one second, it will bark twice. Unless the watchdog is petted again, it will always report that the timeout has occurred each time pet is executed. UML All UML and API documentation are included in the Word document per released zip file Software Requirements LabVIEW 2017 Release Notes 1.0.0-11(Watchdog 1.0.0-11.zip) Fixed spelling errors and regenerated documentation. 1.0.0-9 (Watchdog 1.0.0-9.zip) Refactored locations of files on disk to be more structured Completed documentation Using timestamp for timeout perpetrator. Updated example with instructions 1.0.0-3 (Watchdog 1.0.0-3.zip) This is the initial release. Very very alpha Edited June 26, 2019 by cjcilino Quote Link to comment
ShaunR Posted April 5, 2019 Report Share Posted April 5, 2019 Is Cirrus Logic part of NI? Quote Link to comment
Chris Cilino Posted April 11, 2019 Author Report Share Posted April 11, 2019 My apologies for not having much info on this page yet. I'm just trying to get the code in a presentable state and then I'll broadcast it's purpose and stuff.... And Cirrus Logic is not affiliated with NI. I'm not sure why my profile reads "NI"... hmmm.... I'll see if i can get that squared away. Quote Link to comment
smithd Posted April 12, 2019 Report Share Posted April 12, 2019 On 4/3/2019 at 12:03 PM, cjcilino said: I'm also You're also what?! 11 hours ago, cjcilino said: And Cirrus Logic is not affiliated with NI. I'm not sure why my profile reads "NI"... hmmm.... I'll see if i can get that squared away. Make sure your lavag email is not @ni.com and then pm Michael. He can fixit. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.