Update CWOP Console App

Rating: No reviews yet
Downloads: 256
Released: Dec 11, 2011
Updated: Dec 12, 2011 by mcpell
Dev status: Alpha Help Icon

Recommended Download

Source Code UpdateCWOP
source code, 30K, uploaded Dec 12, 2011 - 118 downloads

Other Available Downloads

Source Code WundergroundView
source code, 5K, uploaded Dec 12, 2011 - 44 downloads
Source Code GetRainfall24
source code, 2K, uploaded Dec 12, 2011 - 23 downloads
Source Code GetRainfallDay
source code, 2K, uploaded Dec 12, 2011 - 18 downloads
Source Code GetRainfallHour
source code, 2K, uploaded Dec 12, 2011 - 23 downloads
Source Code UpdateWunderground
source code, 4K, uploaded Dec 12, 2011 - 30 downloads

Release Notes

This is a simple console application that is scheduled to run every five minutes with the windows task scheduler. It simply retrieves the latest row from a custom view, formats the string and sends it to the CWOP service.

Note that this is pretty raw code. I haven't gone through and externalized variables into config files, put in much error handling, etc. I just tried to get things to work with this release...

The core of the code is in the UpdateCWOP solution. In order for this to work, however, you will need to create a SQL view. A create statement for this view is in the WundergroundView. It's called wunderground view because that's what I originally created it for, but was able to reuse it for CWOP. The view depends on the three user defined functions GetRainfall24, GetRainfallDay and GetRainfallHour.

Finally, the UpdateWunderground file is a SQL Server 2008 R2 CLR trigger. It relies on the same view and UDFs. However, rather than executing every 5 minutes based on the windows task scheduler it executes whenever a new row is inserted into the ISSData table.

Enjoy!

Reviews for this release

No reviews yet for this release.