SubscribeToScpiCommandEvents
Subscribes or un-subscribe to configuration component command events by using the specified call back function.
Command events occur when a configuration component (as defined by a section in the configuration) is used to perform some task. Examples of this are:
- Send a SCPI command to a device
- Begin execution of a calibration
- Begin execution of a sequence
- Setting a path
- Reading or writing a file
Parameters:
eventHandler
The method or delegate to the call back function to be called when a command event occurs.
The callback method must have the signature defined by CommandEvent.
subscribe:
Set to true if subscribing to the event and false if un-subscribing from the event.
Interface Signature:
void SubscribeToScpiCommandEvents(CommandEvent eventHandler, bool subscribe);
These methods are provided for compatibility with the Win32 API. While these functions work just fine we recommend using the standard C# publish subscribe pattern as demonstrated here: Published Events.