/// <summary>
 ///  Maps this MIT annotation code into an AHA annotation code.
 /// </summary>
 /// <param name="mitSubCode">
 /// MIT annotation sub code
 /// <remarks>
 /// This parameter is significant only if mitCode is <see cref="AnnotationCode.Noise"/>)
 /// This overloaded version is used when mitSubCode is -1.
 /// </remarks>
 /// </param>
 /// <returns>The corresponding AHA annotation code</returns>
 public char ToAha(int mitSubCode)
 {
     return((char)PInvoke.wfdb_mamap(this, mitSubCode));
 }
 /// <summary>
 /// Maps an AHA annotation code into an MIT annotation code (one of the
 /// set {<see cref="AnnotationCode.Normal"/>, <see cref="AnnotationCode.Pvc"/>, <see cref="AnnotationCode.Fusion"/>, <see cref="AnnotationCode.ROnT"/>, <see cref="AnnotationCode.Vesc"/>,
 /// <see cref="AnnotationCode.Pace"/>, <see cref="AnnotationCode.Unknown"/>, <see cref="AnnotationCode.VfOn"/>, <see cref="AnnotationCode.VfOff"/>, <see cref="AnnotationCode.Noise"/>,
 /// <see cref="AnnotationCode.Note"/>}), or <see cref="AnnotationCode.NotQrs"/>
 /// </summary>
 /// <param name="ahaCode">AHA Annotation code.</param>
 /// <returns>Corresponding MIT Code</returns>
 public static AnnotationCode MapAhaToMit(char ahaCode)
 {
     return(PInvoke.wfdb_ammap(ahaCode));
 }
 /// <summary>
 ///  Maps this MIT annotation code into an AHA annotation code.
 /// </summary>
 /// <param name="mitSubCode">
 /// MIT annotation sub code
 /// <remarks>
 /// This parameter is significant only if mitCode is <see cref="AnnotationCode.Noise"/>)
 /// </remarks>
 /// </param>
 /// <returns>The corresponding AHA annotation code</returns>
 public char ToAha(AnnotationCode mitSubCode)
 {
     return((char)PInvoke.wfdb_mamap(this, mitSubCode));
 }
Esempio n. 4
0
        /// <summary>
        /// Returns a string that represents the current date in the DD/MM/YYYY format.
        /// </summary>
        /// <remarks>
        /// This method calls the <see cref="PInvoke.datstr"/> native function to perform this task.
        /// </remarks>
        /// <returns>A string that represents the current time object in the DD/MM/YYYY Format</returns>
        public override string ToString()
        {
            IntPtr str = PInvoke.datstr(this);

            return(Marshal.PtrToStringAnsi(str));
        }
Esempio n. 5
0
 /// <summary>
 /// Converts string into a Julian date
 /// </summary>
 /// <param name="date">A string in DD/MM/YYYY Format.</param>
 /// <remarks>
 /// This method calls the datstr native function to perform this task.
 /// </remarks>
 /// <returns>An equivalent Date object.</returns>
 public static Date Parse(string date)
 {
     return(PInvoke.strdat(date));
 }
Esempio n. 6
0
 /// <summary>
 /// Converts a string in standard time format to a valid <see cref="Time"/> object.
 /// </summary>
 /// <param name="time">A string in the HH:MM:SS.SSS Format.</param>
 /// <returns>
 /// A valid time object.
 /// </returns>
 /// <remarks>
 /// The returned value is either
 /// - A positive value: number of sample intervals corresponding to the argument interpreted as a time interval.
 /// - A negative value: (negated) elapsed time in sample intervals from the beginning of the record,
 /// corresponding to the argument interpreted as a time of day.
 /// - Zero 0 : a legal return if the argument matches the base time; otherwise an error return
 /// indicating an incorrectly formatted argument.
 /// </remarks>
 /// <example>
 /// 2:14.875 2 minutes + 14.875 seconds
 /// [13:6:0] 13:06 (1:06 PM)
 /// [8:0:0 1] 8 AM on the day following the base date
 /// [12:0:0 1/3/1992] noon on 1 March 1992
 /// 143 143 seconds (2 minutes + 23 seconds)
 /// 4:02:01 4 hours + 2 minutes + 1 second
 /// s12345 12345 sample intervals
 /// c350.5 counter value 350.5
 /// e time of the end of the record (if defined)
 /// i time of the next sample in input signal 0
 /// o (the letter ‘o’) time of the next sample in output signal 0
 /// </example>
 public static Time Parse(string time)
 {
     return(PInvoke.strtim(time));
 }
Esempio n. 7
0
 /// <summary>
 /// Returns a string that represents the current date in the DD/MM/YYYY. Format
 /// </summary>
 /// <remarks>
 /// This method calls the <see cref="PInvoke.datstr"/> native function to perform this task.
 /// </remarks>
 /// <returns>A string that represents the current time object in the HH:MM:SS Format</returns>
 public override string ToString()
 {
     return(Marshal.PtrToStringAnsi(PInvoke.datstr(this)));
 }
Esempio n. 8
0
 /// <summary>
 /// Disable Verbose Mode.
 /// </summary>
 public static void DisableErrorReporting()
 {
     PInvoke.wfdbquiet();
 }
Esempio n. 9
0
 /// <summary>
 /// Converts the current adus unit to physiological unit.
 /// </summary>
 /// <returns>Returns the corresponding physiological unit.</returns>
 public double ToPhys()
 {
     return(PInvoke.aduphys((int)this.SignalNumber, this));
 }
Esempio n. 10
0
 /// <summary>
 /// Closes all open WFDB files and frees any memory allocated by other WFDB
 /// library functions.
 /// </summary>
 /// <remarks>
 /// This method also resets the following:
 /// - The factors used for converting between samples, seconds, and counter values (reset to
 /// 1), the base time (reset to 0, i.e., midnight), and the base counter value (reset to 0).
 /// - The parameters used for converting between adus and physical units.
 /// - Internal variables used to determine output signal specifications.
 /// </remarks>
 public static void Quit()
 {
     PInvoke.wfdbquit();
 }
Esempio n. 11
0
 /// <summary>
 /// Enable Verbose Mode.
 /// </summary>
 public static void EnableErrorReporting()
 {
     PInvoke.wfdbverbose();
 }
Esempio n. 12
0
 /// <summary>
 /// Sets the current GV mode.
 /// </summary>
 /// <param name="mode">new GV mode.</param>
 public static void SetGVMode(GVMode mode)
 {
     PInvoke.setgvmode((int)mode);
 }
Esempio n. 13
0
 /// <summary>
 /// Write pending changes to hard disk.
 /// </summary>
 public static void Flush()
 {
     PInvoke.wfdbflush();
 }
Esempio n. 14
0
 /// <summary>
 /// Returns a string that represents the current time in the HH:MM:SS.SSS format.
 /// </summary>
 /// <remarks>
 /// This method calls the mstimstr native function to perform this task.
 /// </remarks>
 /// <returns>A string that represenets the current time object in the HH:MM:SS.SSS format.</returns>
 public string ToMSString()
 {
     return(Marshal.PtrToStringAnsi(PInvoke.mstimstr(this)));
 }
 /// <summary>
 /// Converts a string into a valid annotation code if possible.
 /// </summary>
 /// <param name="code">Annotation code's string.</param>
 /// <returns>Annotation Code.</returns>
 /// <remarks>
 /// Illegal strings are translated into <see cref="AnnotationCode.NotQrs"/>. Input strings
 /// for Parse and ParseEcgString should match those returned by <see cref="String"/> and <see cref="EcgString"/> respectively.
 /// </remarks>
 public static AnnotationCode Parse(string code)
 {
     return(PInvoke.strann(code));
 }
Esempio n. 16
0
 /// <summary>
 /// Converts the current adus unit to microvolts.
 /// </summary>
 /// <returns></returns>
 public int ToMicrovolts()
 {
     return(PInvoke.adumuv((int)this.SignalNumber, this));
 }
 /// <summary>
 /// Converts a string into a valid annotation code if possible.
 /// </summary>
 /// <param name="ecgString">Annotation code's string.</param>
 /// <returns>Annotation Code.</returns>
 /// <remarks>
 /// Illegal strings are translated into <see cref="AnnotationCode.NotQrs"/>. Input strings
 /// for Parse and ParseEcgString should match those returned by <see cref="AnnotationCode.String"/> and <see cref="EcgString"/> respectively.
 /// </remarks>
 public static AnnotationCode ParseEcgString(string ecgString)
 {
     return(PInvoke.strecg(ecgString));
 }
Esempio n. 18
0
 /// <summary>
 /// Discards the current calibration list and returns the memory that it occupied
 /// to the heap.
 /// </summary>
 /// <remarks>
 /// Note that <see cref="Wfdb.Quit"/> does not perform the function of FlushCalibrationList.
 /// This function was first introduced in WFDB library version 6.0.
 /// </remarks>
 public static void FlushCalibrationList()
 {
     PInvoke.flushcal();
 }