BAOS .net SDK
18.2.0
|
BAOS Events (datapoint modified, bus connected and connector closed) More...
#include <BaosEvent.h>
Public Member Functions | |
BaosEvent (Connector^connector) | |
Creates a BaosEvent Requires a connector. More... | |
~BaosEvent () | |
Destroys the BaosEvent. More... | |
void | enable () |
Enables (starts) the event callback notifications More... | |
void | disable () |
Disables (stops) the event callback notifications More... | |
delegate void | DatapointEventHandler (Object^sender, BaosDatapoint^datapoint) |
The callback is handled using the event system More... | |
delegate void | BusConnectedEventHandler (Object^sender, bool connected) |
Callback function called when a server value indication is received to indicate whether the bus is connected or not More... | |
delegate void | ConnectorClosedEventHandler (Object^sender) |
Callback function called when the connector is disconnected More... | |
Public Attributes | |
event DatapointEventHandler | DatapointEvent |
event BusConnectedEventHandler | BusConnectedEvent |
event ConnectorClosedEventHandler | ConnectorClosedEvent |
Protected Member Functions | |
!BaosEvent () | |
Finalizer (non-deterministic destructor) cleans up unmanaged resources. More... | |
BAOS Events (datapoint modified, bus connected and connector closed)
kdrive::baos::bindings::BaosEvent::BaosEvent | ( | Connector^ | connector | ) |
Creates a BaosEvent Requires a connector.
Note: the callbacks occur in the context of the notification thread, and not in the main thread (or the GUI thread). If you are developing an application in C# for example that needs to update the GUI you should connect to the BaosEvent events and in your code re-raise the event so it is in the main gui thread context. See Invoke for more information. An example is implemented in the C# samples for the PushButtonDemo:
kdrive::baos::bindings::BaosEvent::~BaosEvent | ( | ) |
Destroys the BaosEvent.
Destructor cleans up unmanaged and managed resources.
|
protected |
Finalizer (non-deterministic destructor) cleans up unmanaged resources.
delegate void kdrive::baos::bindings::BaosEvent::BusConnectedEventHandler | ( | Object^ | sender, |
bool | connected | ||
) |
Callback function called when a server value indication is received to indicate whether the bus is connected or not
delegate void kdrive::baos::bindings::BaosEvent::ConnectorClosedEventHandler | ( | Object^ | sender | ) |
Callback function called when the connector is disconnected
delegate void kdrive::baos::bindings::BaosEvent::DatapointEventHandler | ( | Object^ | sender, |
BaosDatapoint^ | datapoint | ||
) |
The callback is handled using the event system
void kdrive::baos::bindings::BaosEvent::disable | ( | ) |
Disables (stops) the event callback notifications
void kdrive::baos::bindings::BaosEvent::enable | ( | ) |
Enables (starts) the event callback notifications
event BusConnectedEventHandler kdrive::baos::bindings::BaosEvent::BusConnectedEvent |
event ConnectorClosedEventHandler kdrive::baos::bindings::BaosEvent::ConnectorClosedEvent |
event DatapointEventHandler kdrive::baos::bindings::BaosEvent::DatapointEvent |