ID

Uploaded

Status

Description

Work Items

Action

5184
by upcu
Feb 4, 2010
5:57 PM

Being evaluated

A simple C# application that use your library. (an example for beginers ... like me)
I make this because on the http://www.physionet.org/physiotools/wpg/wpg.pdf I saw this code: (that didn't work with your dll)
----------------------------------------------------------------------------------------------------------------
using System;
using Wfdb;
public class psamples
{
static void Main(string[] argv)
{
WFDB_SiginfoArray siarray = new WFDB_SiginfoArray(2);
if (wfdb.isigopen("100s", siarray.cast(), 2) < 2)
Environment.Exit(1);
WFDB_SampleArray v = new WFDB_SampleArray(2);
for (int i = 0; i < 10; i++)
{
if (wfdb.getvec(v.cast()) < 0)
break;
Console.WriteLine("\t" + v.getitem(0) + "\t" + v.getitem(1));
}
}
}
--------------------------------------------------------------------------------------------------------------------------------
And I make this (work's fine with your dll):
--------------------------------------------------------------------------------------------------------------------------------
using System;
using Wfdb;
public class psamples
{
static void Main(string[] argv)
{
SignalInfo[] siarray = new SignalInfo[2];
if (PInvoke.isigopen("100", siarray, 2) < 2)
Environment.Exit(1);
int v[] = new int[2];
for (int i = 0; i < 10; i++)
{
if (PInvoke.getvec(v) < 0)
break;
Console.WriteLine("\t" +v[0].ToString() + "\t" + v[1].ToString());
}
}
}
----------------------------------------------------------------------------------------------------------------------------
I hope that this will help someone and sorry for my english :(

Download

View All
  • 1-1 of 1 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches