.Net Windows DECL Reference
 
Loading...
Searching...
No Matches
MWSDK.Wpf.Modules.EcgModule Class Reference

Represents the ECG (Electrocardiogram) module for WPF applications, providing functionality for monitoring, recording, and processing ECG data. More...

Inherits MWSDK.NetCore.Modules.EcgModuleBase, and IDisposable.

Public Member Functions

void Dispose ()
 Releases all resources used by the MWSDK.Wpf.Modules.EcgModule instance.
 

Events

EventHandler< byte[]>? RecordedStripReady
 Occurs when a recorded ECG strip is ready for processing or display.
 

Detailed Description

Represents the ECG (Electrocardiogram) module for WPF applications, providing functionality for monitoring, recording, and processing ECG data.

This class extends MWSDK.NetCore.Modules.EcgModuleBase and implements System.IDisposable to manage resources effectively. It is designed to integrate with a WPF System.Windows.Controls.Grid for rendering ECG data.

To use this class, create an instance by passing a System.Windows.Controls.Grid container:

var ecgModule = new MWSDK.Wpf.Modules.EcgModule(gridContainer);
ecgModule.StartMonitoring();
Represents the ECG (Electrocardiogram) module for WPF applications, providing functionality for monit...
Definition EcgModule.cs:42
Definition CameraModule.cs:20
Definition MedWandController.cs:9
Definition EnumDeviceState.cs:3

Member Function Documentation

◆ Dispose()

void MWSDK.Wpf.Modules.EcgModule.Dispose ( )

Releases all resources used by the MWSDK.Wpf.Modules.EcgModule instance.

This method disposes of unmanaged resources, such as graphics objects and brushes, and detaches event handlers to prevent memory leaks. It also calls the EcgModuleBase.Disposed method to perform additional cleanup.

Ensure to call this method when the ECG module is no longer needed to free resources:

ecgModule.Dispose();

Event Documentation

◆ RecordedStripReady

EventHandler<byte[]>? MWSDK.Wpf.Modules.EcgModule.RecordedStripReady

Occurs when a recorded ECG strip is ready for processing or display.

This event is triggered after the ECG recording is stopped and the recorded data is converted into a bitmap. The event provides the recorded ECG strip as a byte array in BMP format.

To handle this event, subscribe to it and implement a handler:

ecgModule.RecordedStripReady += (sender, bytes) =>
{
// Process the byte array representing the ECG strip
File.WriteAllBytes("RecordedEcgStrip.bmp", bytes);
};
Parameters
senderThe source of the event, typically the EcgModule instance.
bytesA byte array containing the recorded ECG strip in BMP format.