beautypg.com

Bvcustlibmatlab.cs – Wavecom W-BitView V2.5.00 User Manual

Page 75

background image

BitView Manual V2.5.00 WAVECOM W-BV

Custom Library

69

}

//---------------------------------------------------------------------
// any calculation goes here
//---------------------------------------------------------------------

outbox = (BitArray)buf.Clone();
outbox.Not();

this.dummyCalculation = outbox.Count.ToString(); // any calculation results of
interest will be reflected in the property grid

return (outbox); // must return the result

}
#endregion
}
}

Source Code Template / Example (C# .NET for MatLab)

BVCustLibMatlab.cs

//---------------------------------------------------------------------------
// File : BVCustLibMatlab.cs
// Author : WAVECOM Elektronik AG
// Date : February 2008
// Description : Template/example for a custom defined library function.
//
// Important note:
// In the project settings the "Assembly Name" must be
// equal to the "Default Namespace".
//
//---------------------------------------------------------------------------

#region using references

using System;
using System.Windows.Forms;
using System.Collections;
using System.Text;
using System.ComponentModel;
using System.Diagnostics;
using BVCustLibMatlab.Properties;

// if working with MatLab .net DLLs
using MathWorks.MATLAB.NET.Utility;
using MathWorks.MATLAB.NET.Arrays;

// reference to the MatLab dll
using MatlabFunction;

#endregion

namespace CustomLib // Mandatory! Do not change this name.
{
///


///

[Serializable]
[DefaultProperty("FunctionName")] // adjust string if necessary, it points to a property
below
public class BVCustLibMatlab
{
#region Constant fields

private class PropertyCategory
{
// these are the categories in the BitViewTool property grid (Parameter Window)
public const string Information = "Information";
public const string Counter = "Counter";
public const string Configuration = "Configuration";
public const string Calculation = "Calculation";

This manual is related to the following products: