Important notes, Steps to write a custom function in c# .net, Steps to write a custom function with matlab – Wavecom W-BitView V2.5.00 User Manual

Page 71

Advertising
background image

BitView Manual V2.5.00 WAVECOM W-BV

Custom Library

65

Important Notes

When creating custom functions, certain rules must be observed. Please refer to the source code
templates and examples for more details.
The following source code elements (names) are mandatory and may not be modified:

namespace CustomLib

public string FunctionName

public string Comment

public BitArray Calculate(BitArray buf)

Property categories and additional properties may be defined without limitations.

Steps to Write a Custom Function in C# .NET

Open the CustomLibFunction example or create a new project based on the BVCustLibFunc
template

Change assembly and class name according to your needs

Modify the properties and expand the calculate function with your code

Compile the project and copy the output DLL to the CustomLib folder (see above)

Steps to Write a Custom Function with MatLab

Open the MatlabFunctionExample project (MatlabFunction.prj) in MatLab

Change the .M-File according to your needs

Compile the MatLab code. If the compilation process was successful, there will be two new files in
the .\MatlabFunction\distrib subfolder, MatlabFuntion.dll and MatlabFunction.ctf

Open the BVCustLibMatlab example or create a new project based on the BVCustLibMatlab
template

Change assembly and class name according to your needs

Set a reference to the MatlabFunction.dll in the \distrib subfolder. Thus, the BVCustLibMatlab class
will know where to find the MatLab DLL

Compile the BVCustLibMatlab project and copy all the files in the output directory to the
CustomLib folder

Place the .ctf file into the application folder (no administrator rights required for the BitView Tool).

Advertising
This manual is related to the following products: