gopcua / opcua

Native Go OPC-UA library
MIT License
829 stars 253 forks source link

examples/subscribe. go and examples/monitor. go #690

Open heaxo opened 10 months ago

heaxo commented 10 months ago

I would like to know the difference between examples/subscribe.go and examples/monitor.go, and who should I choose

kung-foo commented 10 months ago

The "subscription" example uses a lower-level API for subscribing to changes, but you are responsible for more "book keeping" (i.e. managing handles). The "monitor" example uses a higher-level (but more opinionated) API which can simplify access but at the cost of less configurability.