Need help to create SQL Listener
In my application, there is an external event (low pressure inside the pipelines) which triggers alarms to be generated. These alarms have a specific format. I want to store these alarms into a MS SQL database. The problem is that I need some sort of listener which will listen to the alarms when gener开发者_Python百科ated and will then store it in the SQL database. I am working with web application development in ASP.net and C#. I am clueless as to how do I develop these listeners. Please suggest me how do i create such a listener.
Thank you.
Do you have some software component that interfaces with the pipeline pressure monitors? That seems like your first step - some physical device that monitors pressure and connects to a computer via serial, bluetooth, whatever.
Then a software componeent that knows nothing about SQL that talks to this device and reports events via software notification - email, snmp, whatever.
Then you need somethign that 'listens' to the software component and logs the event in SQL.
Sorry can't be more specific, but that's how I'd approach it.
You could use .Net to develop a windows service. It could have a system.threading.timer running which checks the status of the guages at specific intervals looking for alarm criteria. Not sure how you'd interface .Net to the guages though.
Assuming you can access the guage data in .Net, when an alarm criteria is met you could have the windows service write direct to the SQL DB, or use a WCF web service call to write the alarm to your DB.
I think best way achiving this with SNMP trap .But device you get pressure information must support this.
精彩评论