Appendix, License terms – Wavecom W-BitView V2.5.00 User Manual
Page 83
BitView Manual V2.5.00 WAVECOM W-BV
Appendix
77
% a BitViewTool CustomLib function. This function declares different input
% and output parameters, to demonstrate how to access these parameters from
% a .Net environment.
%
% Inputs:
% -------
%
% x : should be a [n,1] input array containing the bit stream from the
% BitViewTool, the expected values must be 0 and 1
% inpar1, inpar2: these are parameters to control the function's behaviour
%
% Outputs:
% --------
%
% y : should be a [k,1] output array containing the bit stream as an
% output from this function, the type of y should be double or logical.
% The values must be 0.0 and 1.0 if double.
% outpar1, outpar2, outpar3, outpat4, outpar5 : these are additional calculation
% results from this function of type scalar or string depending on the
% function's behaviour. outpar5 is of type char array
%
%--------------------------------------------------------------------------
% After this function is debugged and tested, the MatLab deploytool has to be
% started with 'deploytool' in the Command Window
% In the deploytool create a new .net project, project type is .NET
% Component, enter a Component name, in the project settings under .NET set the
% the Microsoft Framework to Version 2.0, the Assembly type to private.
% Then push the Build Project button in the Deployment toolbar.
% When finished copy the .dll and .ctf files from the function's
% project\distrib directory to the BitViewTool customlib directory
% C:\Documents and Settings\All Users\Documents\WAVECOM\BitViewTool\CustomLib
%
% Next step is to create a new WAVECOM CustomLib function from the template
% found in the new project wizzard in Visual Studio.
% Add a the reference in the Solution Explorer to the .dll just copied to to
% CustomLib directory. Add a reference in the C# CustomLib source under the
% 'using' region, the namespace to be used is the same used in the solution
% explorer.
%
%--------------------------------------------------------------------------
outpar1 = nargin; % for example : outpar1 returns number of input function arguments
[m, n] = size( x ); % for example : outpar2 returns length of input array x, i.e. number of
rows
outpar2 = m;
outpar3 = n; % number of columns, should be 1 in our example
outpar4 = inpar1 * inpar2; % example of calculation for outpar4
y = ~x; % this is the only calculation for the input data, output y is inverse(x)
% this converts y to type 'logical' !!!!
if (n ~= 1)
outpar5 = 'Function error: input data dimension [m,n] with n ~= 1';
else
outpar5 = 'Function called successfully';
end
Appendix
License Terms
1. Wavecom decoder software and other relevant products are license protected, e.g., WIBU CodeMeter
dongle.