diff options
author | siddhu8990 | 2017-04-19 11:56:09 +0530 |
---|---|---|
committer | siddhu8990 | 2017-04-19 11:56:09 +0530 |
commit | 453598b49cb3d4a62b1797dbc90f0e3dd4521329 (patch) | |
tree | 9d10176d0a4be5eb567ade03e1dd6172c77605e4 /macros | |
parent | aceeb1fe05a8ff6c126ea9ba166a19249488dbd1 (diff) | |
download | Scilab2C_fossee_old-453598b49cb3d4a62b1797dbc90f0e3dd4521329.tar.gz Scilab2C_fossee_old-453598b49cb3d4a62b1797dbc90f0e3dd4521329.tar.bz2 Scilab2C_fossee_old-453598b49cb3d4a62b1797dbc90f0e3dd4521329.zip |
Copyright message updated in added files and libraries separated in 'thirdparty' folder
Diffstat (limited to 'macros')
100 files changed, 779 insertions, 204 deletions
diff --git a/macros/FunctionAnnotation/FA_SCHUR_SZ.bin b/macros/FunctionAnnotation/FA_SCHUR_SZ.bin Binary files differindex d16f029..292a619 100644 --- a/macros/FunctionAnnotation/FA_SCHUR_SZ.bin +++ b/macros/FunctionAnnotation/FA_SCHUR_SZ.bin diff --git a/macros/FunctionAnnotation/FA_SCHUR_SZ.sci b/macros/FunctionAnnotation/FA_SCHUR_SZ.sci index 6ae2030..7b426e1 100644 --- a/macros/FunctionAnnotation/FA_SCHUR_SZ.sci +++ b/macros/FunctionAnnotation/FA_SCHUR_SZ.sci @@ -1,4 +1,33 @@ function out2sz = FA_SCHUR_SZ(in2tp,in1sz) +//function out2sz = FA_SCHUR_SZ(in2tp,in1sz) +// ----------------------------------------------------------------- +// Get size of output for Schur function +// +// Input data: +// in2tp: string specifying the type of second input argument. +// in1sz: string specifying the size of first input argument. +// +// Output data: +// out2sz: string containing the size for second output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); in2type = string(in2tp); in1sz = string(in1sz); diff --git a/macros/FunctionAnnotation/FA_SCHUR_TP.bin b/macros/FunctionAnnotation/FA_SCHUR_TP.bin Binary files differindex 8b31a0c..4b0b438 100644 --- a/macros/FunctionAnnotation/FA_SCHUR_TP.bin +++ b/macros/FunctionAnnotation/FA_SCHUR_TP.bin diff --git a/macros/FunctionAnnotation/FA_SCHUR_TP.sci b/macros/FunctionAnnotation/FA_SCHUR_TP.sci index a8b68b1..828ea1e 100644 --- a/macros/FunctionAnnotation/FA_SCHUR_TP.sci +++ b/macros/FunctionAnnotation/FA_SCHUR_TP.sci @@ -1,4 +1,32 @@ function out2tp = FA_SCHUR_TP(in2tp) +// function out2tp = FA_SCHUR_TP(in2tp) +// ----------------------------------------------------------------- +// Get type of output for Schur function +// +// Input data: +// in2tp: string specifying the type of second input argument. +// +// Output data: +// out2tp: string containing the type for second output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); in2type = string(in2tp); diff --git a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin Binary files differindex 68d6a37..a3b34af 100644 --- a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin +++ b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.bin diff --git a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci index df129f9..3aea839 100644 --- a/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci +++ b/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci @@ -1,20 +1,32 @@ function outsize = FA_SZ_COLUMN_DIAG(insize) - // function outsize = FA_SZ_1(insize) - // ----------------------------------------------------------------- - // Returns the first element of the size array. - // - // Input data: - // insize: size of input argument. It is an array of 2 strings. - // The first string specifies the number of rows. - // The second string specifies the number of columns. - // - // Output data: - // outsize: first element of the insize array. - // - // Status: - // 08-Dec-2007 -- Raffaele Nutricato: Author. - // 08-Dec-2007 -- Alberto Morea: Test Ok. - // ----------------------------------------------------------------- +//function outsize = FA_SZ_COLUMN_DIAG(insize) +// ----------------------------------------------------------------- +// Get size of column of the output for diag function +// +// Input data: +// insize: string specifying the size of input argument. +// +// Output data: +// outsize: string containing the column size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); if(insize(2)=='1') then outsize = insize(1); diff --git a/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin Binary files differindex e39a0be..7674823 100644 --- a/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin +++ b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.bin diff --git a/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci index 45d74c3..8a313fe 100644 --- a/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci +++ b/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci @@ -1,6 +1,35 @@ function outsize =FA_SZ_COL_DIAG_IN_EX(insize,val) - -///////////////////////////////COLUMN SIZE FOR INSERT POSITION////////////////// +//function outsize =FA_SZ_COL_DIAG_IN_EX(insize,val) +// ----------------------------------------------------------------- +// Get size of column of the output for diag(insert) function +// +// Input data: +// insize: string specifying the size of input argument. +// val: string containing value of second input +// +// Output data: +// outsize: string containing the column size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +///////////////////////////////COLUMN SIZE FOR INSERT POSITION//////////////// @@ -8,13 +37,15 @@ function outsize =FA_SZ_COL_DIAG_IN_EX(insize,val) if(val == '0') then //For Oth position outsize = insize(2); //COLUMN size is equal to COLUMN size else // For ...-2,-1,1,2... position - outsize = string(eval(insize(2))+abs(eval(val)));// COLUMN size is equal to COLUMN size + absolute value of position(for 1*3 matrix and 2nd postion COLUMN size is (3+2)=5 + outsize = string(eval(insize(2))+abs(eval(val))); + // COLUMN size is equal to COLUMN size + absolute value of position(for 1*3 matrix and 2nd postion COLUMN size is (3+2)=5 end elseif((insize(2) == '1')) // If COLUMN size is 1 if(val == '0') then //For Oth position outsize = insize(1); //COLUMNS size is equal to ROW size else // For ...-2,-1,1,2.... position - outsize = string(eval(insize(1))+abs(eval(val)));// COLUMN size is equal to ROW size + absolute value of position(for 3*1 matrix and 1st postion COLUMN size is (3+1)=4 + outsize = string(eval(insize(1))+abs(eval(val))); + // COLUMN size is equal to ROW size + absolute value of position(for 3*1 matrix and 1st postion COLUMN size is (3+1)=4 end //////////////////////////////////////////////////////////////////////////////// diff --git a/macros/FunctionAnnotation/FA_SZ_DIFF.bin b/macros/FunctionAnnotation/FA_SZ_DIFF.bin Binary files differindex 5f169e6..08d66c1 100644 --- a/macros/FunctionAnnotation/FA_SZ_DIFF.bin +++ b/macros/FunctionAnnotation/FA_SZ_DIFF.bin diff --git a/macros/FunctionAnnotation/FA_SZ_DIFF.sci b/macros/FunctionAnnotation/FA_SZ_DIFF.sci index df18310..5639ce7 100644 --- a/macros/FunctionAnnotation/FA_SZ_DIFF.sci +++ b/macros/FunctionAnnotation/FA_SZ_DIFF.sci @@ -1,4 +1,17 @@ -// Copyright (C) 2016 - IIT Bombay - FOSSEE +function outsize = FA_SZ_DIFF(in1size, in2val, in3val) +//function outsize = FA_SZ_DIFF(in1size, in2val, in3val) +// ----------------------------------------------------------------- +// Get size of output for diff function +// +// Input data: +// in1size: string specifying the size of first input argument. +// in2val: string specifying the value of second input argument. +// in3val: string specifying the value of third input argument. +// +// Output data: +// outsize: string containing the size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which @@ -8,9 +21,15 @@ // Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(3),3,3); -//This fucntion calulates size of output depending upon input -function outsize = FA_SZ_DIFF(in1size, in2val, in3val) in1size = string(in1size); in1row = eval(in1size(1)); in1col = eval(in1size(2)); diff --git a/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.bin b/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.bin Binary files differindex 0a5589b..60cb9d4 100644 --- a/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.bin +++ b/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.bin diff --git a/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci b/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci index 986b529..69a816c 100644 --- a/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci +++ b/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci @@ -1,4 +1,33 @@ function outsize = FA_SZ_LINSPACE_ROW(insize) +//function outsize = FA_SZ_LINSPACE_ROW(insize) +// ----------------------------------------------------------------- +// Get size of row for output for linspace function +// +// Input data: +// insize: string specifying the size of first input argument. +// +// Output data: +// outsize: string containing the row size of output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + in1num = string(eval(insize(1))); outsize = in1num; endfunction: diff --git a/macros/FunctionAnnotation/FA_SZ_LQE.bin b/macros/FunctionAnnotation/FA_SZ_LQE.bin Binary files differindex 2fb9772..8abfa39 100644 --- a/macros/FunctionAnnotation/FA_SZ_LQE.bin +++ b/macros/FunctionAnnotation/FA_SZ_LQE.bin diff --git a/macros/FunctionAnnotation/FA_SZ_LQE.sci b/macros/FunctionAnnotation/FA_SZ_LQE.sci index e7aecf1..6ddd198 100644 --- a/macros/FunctionAnnotation/FA_SZ_LQE.sci +++ b/macros/FunctionAnnotation/FA_SZ_LQE.sci @@ -1,4 +1,33 @@ function outsize = FA_SZ_LQE(inval,insz) +//function outsize = FA_SZ_LQE(inval,insz) +// ----------------------------------------------------------------- +// Get size of output for lqe function +// +// Input data: +// inval: string specifying the value of input argument. +// insz: string specifying the size of input argument. +// +// Output data: +// outsize: string containing the size for second output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); inval = eval(inval) insz = eval(insz) diff --git a/macros/FunctionAnnotation/FA_SZ_LQR.bin b/macros/FunctionAnnotation/FA_SZ_LQR.bin Binary files differindex 2de9d56..843fb2c 100644 --- a/macros/FunctionAnnotation/FA_SZ_LQR.bin +++ b/macros/FunctionAnnotation/FA_SZ_LQR.bin diff --git a/macros/FunctionAnnotation/FA_SZ_LQR.sci b/macros/FunctionAnnotation/FA_SZ_LQR.sci index 2f199d0..cf1884a 100644 --- a/macros/FunctionAnnotation/FA_SZ_LQR.sci +++ b/macros/FunctionAnnotation/FA_SZ_LQR.sci @@ -1,4 +1,32 @@ function outsize = FA_SZ_LQR(inval) +//function outsize = FA_SZ_LQR(inval) +// ----------------------------------------------------------------- +// Get size of output for lqr function +// +// Input data: +// inval: string specifying the value of input argument. +// +// Output data: +// outsize: string containing the size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); inval = eval(inval) outsize(1) = string(int(inval)); diff --git a/macros/FunctionAnnotation/FA_SZ_OBSCNT.bin b/macros/FunctionAnnotation/FA_SZ_OBSCNT.bin Binary files differindex 70ce8df..b936e29 100644 --- a/macros/FunctionAnnotation/FA_SZ_OBSCNT.bin +++ b/macros/FunctionAnnotation/FA_SZ_OBSCNT.bin diff --git a/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci b/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci index 80c0f95..a7cb85b 100644 --- a/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci +++ b/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci @@ -1,4 +1,35 @@ function outsize = FA_SZ_OBSCNT(inval,insz1,insz2,nout) +//function outsize = FA_SZ_OBSCNT(inval,insz1,insz2,nout) +// ----------------------------------------------------------------- +// Get size of output for obscont function +// +// Input data: +// inval: string specifying the value of first input argument. +// insz1: string specifying the row size of first input argument. +// insz2: string specifying the col size of first input argument. +// nout: string specifying number of output arguments +// +// Output data: +// outsize: string containing the size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(4),4,4); inval = eval(inval); insz1 = eval(insz1); diff --git a/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.bin b/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.bin Binary files differindex 747a31d..3ebb951 100644 --- a/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.bin +++ b/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.bin diff --git a/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.sci b/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.sci index 3dd4e60..35cf8ac 100644 --- a/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.sci +++ b/macros/FunctionAnnotation/FA_SZ_PERMUTE_ROW.sci @@ -1,5 +1,5 @@ function outsize=FA_SZ_PERMUTE_ROW(insize, val) -disp(size(val)) + outsize = 3; //if((val(0) == '1') & (val(1) == '2')) // outsize = insize(1); diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin Binary files differindex edba674..28b7fa5 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin +++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.bin diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci index ca1d262..11b245e 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci +++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN.sci @@ -1,47 +1,27 @@ function opoutsize = FA_SZ_ROW_COLUMN(in1size,in2size) -// function opoutsize = FA_SZ_OPPLUSA(in1size,in2size) +//function opoutsize = FA_SZ_ROW_COLUMN(in1size,in2size) // ----------------------------------------------------------------- -// Returns the size of the output computed by OPPLUS operator -// restricted to arithmetic operations (string operations not supported.) -// -// Assuming: -// size(in1) = [in1r,in1c] -// size(in2) = [in2r,in2c] -// size(out) = [outr,outc] -// -// we have the following combinations: -// in1 in2 outr outc -// ----------------------- -// S S in2r in2c -// S M in2r in2c -// M S in1r in1c -// M M in1r in1c -// -// Where S means that the input is a scalar -// and M means that the input is a matrix. -// There is also the case related to the string catenation! -// This is the main difference between - and + operators. +// Get size of output for Schur function // // Input data: -// in1size: size of input number 1. It is an array of 2 strings. -// The first string specifies the number of rows. -// The second string specifies the number of columns. -// -// in2size: size of input number 2. It is an array of 2 strings. -// The first string specifies the number of rows. -// The second string specifies the number of columns. +// in2tp: string specifying the type of second input argument. +// in1sz: string specifying the size of first input argument. // // Output data: -// opoutsize: size of output. It is an array of 2 strings. -// The first string specifies the number of rows. -// The second string specifies the number of columns. +// out2sz: string containing the size for second output argument. // -// Status: -// 18-Mar-2008 -- Raffaele Nutricato: Author. -// 18-Mar-2008 -- Alberto Morea: Test Ok. +// Copyright (C) 2017 - IIT Bombay - FOSSEE // -// Copyright 2008 Raffaele Nutricato & Alberto Morea. -// Contact: raffaele.nutricato@tiscali.it +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + // ----------------------------------------------------------------- // ------------------------------ diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin Binary files differindex 2373b81..5679bce 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin +++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci index 5ab0c64..aaca286 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci +++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci @@ -1,8 +1,35 @@ function outsize = FA_SZ_ROW_COLUMN_CAT(inval,in1size,in2size)
+//function outsize = FA_SZ_ROW_COLUMN_CAT(inval,in1size,in2size)
+// -----------------------------------------------------------------
+// Get size of row (col) of the output for cat function
+//
+// Input data:
+// inval: string specifying the value of input argument.
+// in1size: string specifying the row (col) of second input
+// in3size: string specifying the row (col) of third input
+// Output data:
+// outsize: string containing the column size for output argument.
+//
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Mushir
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+//
+
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(1),3,3);
-//Check the input arguments
-SCI2CNInArgCheck(argn(2),3,3);
in1size = string(in1size);
in2size = string(in2size);
inval = string(inval);
diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin Binary files differindex 7fc7dcc..f5f1a23 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin +++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.bin diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci index 687a89e..1417b42 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci +++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci @@ -1,21 +1,33 @@ function outsize = FA_SZ_ROW_DIAG(insize) -// function outsize = FA_SZ_1(insize) +//function outsize = FA_SZ_ROW_DIAG(insize) // ----------------------------------------------------------------- -// Returns the first element of the size array. -// +// Get size of row of the output for diag function +// // Input data: -// insize: size of input argument. It is an array of 2 strings. -// The first string specifies the number of rows. -// The second string specifies the number of columns. -// +// insize: string specifying the size of input argument. +// // Output data: -// outsize: first element of the insize array. +// outsize: string containing the row size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE // -// Status: -// 08-Dec-2007 -- Raffaele Nutricato: Author. -// 08-Dec-2007 -- Alberto Morea: Test Ok. +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + // ----------------------------------------------------------------- +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + if(insize(1)=='1') then outsize = insize(2); elseif(insize(1) == insize(2)) diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin Binary files differindex 046b4b7..e5d8e65 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin +++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.bin diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci index 1ec720a..1dddfb7 100644 --- a/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci +++ b/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci @@ -1,4 +1,33 @@ function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) +//function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) +// ----------------------------------------------------------------- +// Get row size of output for diag(insert) function +// +// Input data: +// insize: string specifying the size of first input argument. +// val: string specifying the value of second input argument. +// +// Output data: +// outsize: string containing the size for output argument. +// +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); // val ==> Position value ...,-2,-1,0,1,2.... //insize ==> insize(1) will give ROW size and insize(2) will give COLUMN size. @@ -6,7 +35,7 @@ function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) row_num = eval(insize(1)); col_num = eval(insize(2)); val_num = eval(val); - /////////////////////////////////////////////// FOR INSERT CONDITION //////////////////////////////////////////// + ///////////////////// FOR INSERT CONDITION ////////////////////////////// @@ -15,7 +44,8 @@ function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) outsize = string(col_num);// ROW size is equal to COLUMN size else // For ....-2,-1,1,2... positions - outsize = string(col_num+abs(val_num)); //ROW is equal to COLUMN SIZE + position value (i.e for 1*4 matrix and insert position 1 then ROW size is 4+1 = 5 ) + outsize = string(col_num+abs(val_num)); + //ROW is equal to COLUMN SIZE + position value (i.e for 1*4 matrix and insert position 1 then ROW size is 4+1 = 5 ) end elseif(col_num == 1) // if Column size is one @@ -23,14 +53,15 @@ function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) outsize = string(row_num); // ROW size is equal to ROW size else // ....-2,-1,1,2... positions. - outsize = string(row_num + abs(val_num));//ROW is equal to ROW SIZE + position value (i.e for 4*1 matrix and insert position 1 then ROW size is 4+1 = 5 ) + outsize = string(row_num + abs(val_num)); + //ROW is equal to ROW SIZE + position value (i.e for 4*1 matrix and insert position 1 then ROW size is 4+1 = 5 ) end - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////// - ///////////////////////////////////////// FOR EXTRACT CONDITION ///////////////////////////////////////////////// + //////////////////////////// FOR EXTRACT CONDITION ///////////////////////// elseif(row_num == col_num) // For no. of rows equal to no. of column (R == C) if(val_num == 0) then //For 0th position @@ -66,7 +97,7 @@ function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) outsize = string(row_num-abs(val_num)); // row size is substraction of row size and absolute value of position values(-1,-2,-3) end - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////////////// end endfunction diff --git a/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin b/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin Binary files differindex 1d824fb..a732709 100644 --- a/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin +++ b/macros/FunctionAnnotation/FA_TP_CVIMAGE.bin diff --git a/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci b/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci index 1c0d174..5e87ab8 100644 --- a/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci +++ b/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci @@ -10,10 +10,17 @@ function typeout = FA_TP_CVIMAGE() // Output data: // typeout: string containing the type specifier. // -// Status: +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Copyright 2007 Raffaele Nutricato & Alberto Morea. -// Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- // ------------------------------ diff --git a/macros/FunctionAnnotation/FA_TP_INT16.bin b/macros/FunctionAnnotation/FA_TP_INT16.bin Binary files differindex e28e0c5..fba4305 100644 --- a/macros/FunctionAnnotation/FA_TP_INT16.bin +++ b/macros/FunctionAnnotation/FA_TP_INT16.bin diff --git a/macros/FunctionAnnotation/FA_TP_INT16.sci b/macros/FunctionAnnotation/FA_TP_INT16.sci index 67b8178..b7e25ca 100644 --- a/macros/FunctionAnnotation/FA_TP_INT16.sci +++ b/macros/FunctionAnnotation/FA_TP_INT16.sci @@ -10,10 +10,17 @@ function typeout = FA_TP_INT16() // Output data: // typeout: string containing the type specifier. // -// Status: +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Copyright 2007 Raffaele Nutricato & Alberto Morea. -// Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- // ------------------------------ diff --git a/macros/FunctionAnnotation/FA_TP_INT8.bin b/macros/FunctionAnnotation/FA_TP_INT8.bin Binary files differindex 3f5055f..f67d748 100644 --- a/macros/FunctionAnnotation/FA_TP_INT8.bin +++ b/macros/FunctionAnnotation/FA_TP_INT8.bin diff --git a/macros/FunctionAnnotation/FA_TP_INT8.sci b/macros/FunctionAnnotation/FA_TP_INT8.sci index 49c752b..f1e2bf2 100644 --- a/macros/FunctionAnnotation/FA_TP_INT8.sci +++ b/macros/FunctionAnnotation/FA_TP_INT8.sci @@ -10,10 +10,17 @@ function typeout = FA_TP_INT8() // Output data: // typeout: string containing the type specifier. // -// Status: +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Copyright 2007 Raffaele Nutricato & Alberto Morea. -// Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- // ------------------------------ diff --git a/macros/FunctionAnnotation/FA_TP_UINT16.bin b/macros/FunctionAnnotation/FA_TP_UINT16.bin Binary files differindex 687024f..dc455ca 100644 --- a/macros/FunctionAnnotation/FA_TP_UINT16.bin +++ b/macros/FunctionAnnotation/FA_TP_UINT16.bin diff --git a/macros/FunctionAnnotation/FA_TP_UINT16.sci b/macros/FunctionAnnotation/FA_TP_UINT16.sci index 5f1c98f..b77d775 100644 --- a/macros/FunctionAnnotation/FA_TP_UINT16.sci +++ b/macros/FunctionAnnotation/FA_TP_UINT16.sci @@ -10,10 +10,17 @@ function typeout = FA_TP_UINT16() // Output data: // typeout: string containing the type specifier. // -// Status: +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Copyright 2007 Raffaele Nutricato & Alberto Morea. -// Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- // ------------------------------ diff --git a/macros/FunctionAnnotation/FA_TP_UINT8.bin b/macros/FunctionAnnotation/FA_TP_UINT8.bin Binary files differindex 02e7404..508db41 100644 --- a/macros/FunctionAnnotation/FA_TP_UINT8.bin +++ b/macros/FunctionAnnotation/FA_TP_UINT8.bin diff --git a/macros/FunctionAnnotation/FA_TP_UINT8.sci b/macros/FunctionAnnotation/FA_TP_UINT8.sci index 934f354..f31cde0 100644 --- a/macros/FunctionAnnotation/FA_TP_UINT8.sci +++ b/macros/FunctionAnnotation/FA_TP_UINT8.sci @@ -10,10 +10,17 @@ function typeout = FA_TP_UINT8() // Output data: // typeout: string containing the type specifier. // -// Status: +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Copyright 2007 Raffaele Nutricato & Alberto Morea. -// Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- // ------------------------------ diff --git a/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin b/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin Binary files differindex 0c64927..a70999c 100644 --- a/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin +++ b/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin diff --git a/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci b/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci index a791f1e..3e6397b 100644 --- a/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci +++ b/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci @@ -7,8 +7,17 @@ function RPiSupportFunctions = GetRPISupportFunctions() // // Output data: // None +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Author: Siddhesh Wani // ----------------------------------------------------------------- RPiSupportFunctions = [ diff --git a/macros/Hardware/RasberryPi/IsRPISupportFunction.bin b/macros/Hardware/RasberryPi/IsRPISupportFunction.bin Binary files differindex 728e3d8..11533d3 100644 --- a/macros/Hardware/RasberryPi/IsRPISupportFunction.bin +++ b/macros/Hardware/RasberryPi/IsRPISupportFunction.bin diff --git a/macros/Hardware/RasberryPi/IsRPISupportFunction.sci b/macros/Hardware/RasberryPi/IsRPISupportFunction.sci index 647b0c8..c6a2c36 100644 --- a/macros/Hardware/RasberryPi/IsRPISupportFunction.sci +++ b/macros/Hardware/RasberryPi/IsRPISupportFunction.sci @@ -9,7 +9,17 @@ function Output = IsRPISupportFunction(FunName) // Output: True or False depending whether given function is a RPi // support functions or not // -// Author: Siddhesh Wani +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// // ----------------------------------------------------------------- //Get list of supported functions for AVR diff --git a/macros/Hardware/RasberryPi/RPI_DelayMicro.sci b/macros/Hardware/RasberryPi/RPI_DelayMicro.sci index 730755b..bbb0bb3 100644 --- a/macros/Hardware/RasberryPi/RPI_DelayMicro.sci +++ b/macros/Hardware/RasberryPi/RPI_DelayMicro.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_DelayMicro(time) // Function to insert some delay in code execution. // diff --git a/macros/Hardware/RasberryPi/RPI_DelayMilli.bin b/macros/Hardware/RasberryPi/RPI_DelayMilli.bin Binary files differindex bb8279e..b6eeb30 100644 --- a/macros/Hardware/RasberryPi/RPI_DelayMilli.bin +++ b/macros/Hardware/RasberryPi/RPI_DelayMilli.bin diff --git a/macros/Hardware/RasberryPi/RPI_DelayMilli.sci b/macros/Hardware/RasberryPi/RPI_DelayMilli.sci index c5080dd..13b7962 100644 --- a/macros/Hardware/RasberryPi/RPI_DelayMilli.sci +++ b/macros/Hardware/RasberryPi/RPI_DelayMilli.sci @@ -1,5 +1,13 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_DelayMilli(time) -// Function to insert some delay in code execution. +// Function to insert some delay in milli seconds in code execution. // // Calling Sequence // RPI_DelayMilli(time) @@ -8,7 +16,7 @@ function RPI_DelayMilli(time) // time: time(milliseconds) for which execution is to be delayed // // Description -// this function can be used for insertig execution delays. 'time' should be +// This function can be used for insertig execution delays. 'time' should be // specified in milliseconds. If more resolution is required, use 'RPI_DelayMicro' // for inserting delay in microseconds. // Note: Delay inserted by this function is not accurate, but depedent on diff --git a/macros/Hardware/RasberryPi/RPI_DigitalIn.sci b/macros/Hardware/RasberryPi/RPI_DigitalIn.sci index 4df03f6..781c49c 100644 --- a/macros/Hardware/RasberryPi/RPI_DigitalIn.sci +++ b/macros/Hardware/RasberryPi/RPI_DigitalIn.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function state = RPI_DigitalIn(pin) // Function to read current state on digital pins. // diff --git a/macros/Hardware/RasberryPi/RPI_DigitalOut.bin b/macros/Hardware/RasberryPi/RPI_DigitalOut.bin Binary files differindex d6b6b7b..b7ad06e 100644 --- a/macros/Hardware/RasberryPi/RPI_DigitalOut.bin +++ b/macros/Hardware/RasberryPi/RPI_DigitalOut.bin diff --git a/macros/Hardware/RasberryPi/RPI_DigitalOut.sci b/macros/Hardware/RasberryPi/RPI_DigitalOut.sci index 4836f54..dde3c93 100644 --- a/macros/Hardware/RasberryPi/RPI_DigitalOut.sci +++ b/macros/Hardware/RasberryPi/RPI_DigitalOut.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_DigitalOut(pin, state) // Function to output desired state on digital pins. // @@ -20,8 +28,17 @@ function RPI_DigitalOut(pin, state) // Authors // Siddhesh Wani // +// ----------------------------------------------------------------- +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; + +PinIsGPIO = members(pin, supported_pins); //Check if output pin supports GPIO -// This is curretly dummy function. It provides no functionality but is required -// for providing support for generating C code for RPi. +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +state = 1; endfunction diff --git a/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin b/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin Binary files differindex 1f20deb..1ac5b58 100644 --- a/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin +++ b/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin diff --git a/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci b/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci index 460a417..01d6e07 100644 --- a/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci +++ b/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci @@ -22,7 +22,8 @@ function RPI_DigitalSetup(pin, direction) // Siddhesh Wani // ----------------------------------------------------------------- //Pins of header P1 which can be used as GPIO -supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26] +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO @@ -30,4 +31,6 @@ PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO if(PinIsGPIO == 0) error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); end +state = 1; + endfunction diff --git a/macros/Hardware/RasberryPi/RPI_GetMicros.sci b/macros/Hardware/RasberryPi/RPI_GetMicros.sci index 7f825ef..6c4db57 100644 --- a/macros/Hardware/RasberryPi/RPI_GetMicros.sci +++ b/macros/Hardware/RasberryPi/RPI_GetMicros.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function Micros = RPI_GetMicros() // Function to get time in Microsecond since first setup function called. // diff --git a/macros/Hardware/RasberryPi/RPI_GetMillis.sci b/macros/Hardware/RasberryPi/RPI_GetMillis.sci index b83f5fe..c034a70 100644 --- a/macros/Hardware/RasberryPi/RPI_GetMillis.sci +++ b/macros/Hardware/RasberryPi/RPI_GetMillis.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function Millis = RPI_GetMillis() // Function to get time in millisecond since first setup function called. // diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci b/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci index 3c05030..8448d36 100644 --- a/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci +++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMSetClock(clock_divisor) // Function to set PWM clock. PWM clock frequency is 19.2MHz, which can be reduced // using suitable clock_divisor (1 to 2048, powers of 2) diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci b/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci index 2ab697b..57b8260 100644 --- a/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci +++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMSetMode(pwm_mode) // Function to set PWM mode. Two modes are available - balanced and mark/space // diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci b/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci index cb7dd67..c2075e2 100644 --- a/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci +++ b/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMSetRange(range_val) // Function to set range value for PWM. Range value along with clock divisor // decides pwm frequency. Range value must be less than 1024 diff --git a/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci b/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci index 9f9f797..dba5e67 100644 --- a/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci +++ b/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMWrite(pin,value) // Function to change pwm duty on specified pin. Hardware PWM is available // only on pin 12. So, only '12' should be provided as pin diff --git a/macros/Hardware/RasberryPi/RPI_PinISR.bin b/macros/Hardware/RasberryPi/RPI_PinISR.bin Binary files differindex a6c0bd9..ddeff68 100644 --- a/macros/Hardware/RasberryPi/RPI_PinISR.bin +++ b/macros/Hardware/RasberryPi/RPI_PinISR.bin diff --git a/macros/Hardware/RasberryPi/RPI_PinISR.sci b/macros/Hardware/RasberryPi/RPI_PinISR.sci index 2de7d9e..c2354c1 100644 --- a/macros/Hardware/RasberryPi/RPI_PinISR.sci +++ b/macros/Hardware/RasberryPi/RPI_PinISR.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_PinISR(pin, edgetype, fn) // Function to assign a function to be run when an interrupt occurs on // specified pin. @@ -30,7 +38,8 @@ function RPI_PinISR(pin, edgetype, fn) // for providing support for generating C code for RPi. //Pins of header P1 which can be used as GPIO -supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26] +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO @@ -38,7 +47,7 @@ PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO if(PinIsGPIO == 0) error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); end -EdgeTypeSupported = members(edgetype,[1 2 3]) +EdgeTypeSupported = members(edgetype,[1 2 3]); if(EdgeTypeSupported == 0) error(9999, 'SCI2CERROR: Given edgetype is incorrect. Please specify correct edgetype from [1,2,3]') diff --git a/macros/Hardware/RasberryPi/RPI_SerialClose.sci b/macros/Hardware/RasberryPi/RPI_SerialClose.sci index 0d393f3..f27dd43 100644 --- a/macros/Hardware/RasberryPi/RPI_SerialClose.sci +++ b/macros/Hardware/RasberryPi/RPI_SerialClose.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_SerialClose(fd) // Function to close serial port specified by file descriptor. // diff --git a/macros/Hardware/RasberryPi/RPI_SerialFlush.sci b/macros/Hardware/RasberryPi/RPI_SerialFlush.sci index ffef70b..9bab386 100644 --- a/macros/Hardware/RasberryPi/RPI_SerialFlush.sci +++ b/macros/Hardware/RasberryPi/RPI_SerialFlush.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function data = RPI_SerialGetChar(fd) // Function to read data from specified serial port // diff --git a/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci b/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci index 0271449..a26e5b9 100644 --- a/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci +++ b/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function data = RPI_SerialGetChar(fd) // Function to read data from specified serial port // diff --git a/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci b/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci index 82051d6..769b21d 100644 --- a/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci +++ b/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_SerialSendChar(fd, data) // Function to send 8-bit char through serial port. // diff --git a/macros/Hardware/RasberryPi/RPI_SerialSendData.sci b/macros/Hardware/RasberryPi/RPI_SerialSendData.sci index 6bfe80d..c05852b 100644 --- a/macros/Hardware/RasberryPi/RPI_SerialSendData.sci +++ b/macros/Hardware/RasberryPi/RPI_SerialSendData.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_SerialSendData(fd, data) // Function to send data through serial port. Data can be of any datatype and // can be scalar or matrix diff --git a/macros/Hardware/RasberryPi/RPI_SerialSetup.sci b/macros/Hardware/RasberryPi/RPI_SerialSetup.sci index 25a70a3..0f26661 100644 --- a/macros/Hardware/RasberryPi/RPI_SerialSetup.sci +++ b/macros/Hardware/RasberryPi/RPI_SerialSetup.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function fd = RPI_SerialSetup(port, baudrate) // Function to setup serial port. // diff --git a/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci b/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci index 5a29156..6eb29a1 100644 --- a/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci +++ b/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function bytes = RPI_SerialDataAvail(fd) // Function to get number of data bytes available on serial port specified by // file descriptor diff --git a/macros/ImageProcessing/core/CV_CreateImage.sci b/macros/ImageProcessing/core/CV_CreateImage.sci index 72dd9b8..0275815 100644 --- a/macros/ImageProcessing/core/CV_CreateImage.sci +++ b/macros/ImageProcessing/core/CV_CreateImage.sci @@ -1,3 +1,14 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function img = CV_CreateImage(width,height,bit_depth,no_of_channels) // function to create an image object of given size and type // diff --git a/macros/ImageProcessing/core/CV_GetImgSize.sci b/macros/ImageProcessing/core/CV_GetImgSize.sci index cd7ebda..02e018a 100644 --- a/macros/ImageProcessing/core/CV_GetImgSize.sci +++ b/macros/ImageProcessing/core/CV_GetImgSize.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/highgui/CV_LoadImage.sci b/macros/ImageProcessing/highgui/CV_LoadImage.sci index 93fc49b..01dda12 100644 --- a/macros/ImageProcessing/highgui/CV_LoadImage.sci +++ b/macros/ImageProcessing/highgui/CV_LoadImage.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/highgui/CV_SaveImage.sci b/macros/ImageProcessing/highgui/CV_SaveImage.sci index 8d5ca16..708edff 100644 --- a/macros/ImageProcessing/highgui/CV_SaveImage.sci +++ b/macros/ImageProcessing/highgui/CV_SaveImage.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/highgui/CV_ShowImage.sci b/macros/ImageProcessing/highgui/CV_ShowImage.sci index 0864c3f..4bfe591 100644 --- a/macros/ImageProcessing/highgui/CV_ShowImage.sci +++ b/macros/ImageProcessing/highgui/CV_ShowImage.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/highgui/CV_WaitKey.sci b/macros/ImageProcessing/highgui/CV_WaitKey.sci index 514bc53..0facaaf 100644 --- a/macros/ImageProcessing/highgui/CV_WaitKey.sci +++ b/macros/ImageProcessing/highgui/CV_WaitKey.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci b/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci index 193e726..a922d79 100644 --- a/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci +++ b/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_Blur.sci b/macros/ImageProcessing/imgproc/CV_Blur.sci index 0486bef..b81df49 100644 --- a/macros/ImageProcessing/imgproc/CV_Blur.sci +++ b/macros/ImageProcessing/imgproc/CV_Blur.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_Canny.sci b/macros/ImageProcessing/imgproc/CV_Canny.sci index dca5e03..b21028a 100644 --- a/macros/ImageProcessing/imgproc/CV_Canny.sci +++ b/macros/ImageProcessing/imgproc/CV_Canny.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_CornerHarris.sci b/macros/ImageProcessing/imgproc/CV_CornerHarris.sci index 1b7aabc..fb25612 100644 --- a/macros/ImageProcessing/imgproc/CV_CornerHarris.sci +++ b/macros/ImageProcessing/imgproc/CV_CornerHarris.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_CvtColor.sci b/macros/ImageProcessing/imgproc/CV_CvtColor.sci index 220ad5f..766844b 100644 --- a/macros/ImageProcessing/imgproc/CV_CvtColor.sci +++ b/macros/ImageProcessing/imgproc/CV_CvtColor.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_Dilate.sci b/macros/ImageProcessing/imgproc/CV_Dilate.sci index d3e3dac..196cab8 100644 --- a/macros/ImageProcessing/imgproc/CV_Dilate.sci +++ b/macros/ImageProcessing/imgproc/CV_Dilate.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci b/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci index 8277dda..e877295 100644 --- a/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci +++ b/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_Erode.sci b/macros/ImageProcessing/imgproc/CV_Erode.sci index b2e4b26..d77e9e6 100644 --- a/macros/ImageProcessing/imgproc/CV_Erode.sci +++ b/macros/ImageProcessing/imgproc/CV_Erode.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci b/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci index 0f3c003..0799c4d 100644 --- a/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci +++ b/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_MedianBlur.sci b/macros/ImageProcessing/imgproc/CV_MedianBlur.sci index 755ad45..d8f9a90 100644 --- a/macros/ImageProcessing/imgproc/CV_MedianBlur.sci +++ b/macros/ImageProcessing/imgproc/CV_MedianBlur.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/ImageProcessing/imgproc/CV_Threshold.sci b/macros/ImageProcessing/imgproc/CV_Threshold.sci index 343fde5..823a576 100644 --- a/macros/ImageProcessing/imgproc/CV_Threshold.sci +++ b/macros/ImageProcessing/imgproc/CV_Threshold.sci @@ -5,7 +5,6 @@ // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt -// Author: Siddhesh Wani // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in diff --git a/macros/Scilab-Arduino/GenerateSetupFunction.bin b/macros/Scilab-Arduino/GenerateSetupFunction.bin Binary files differindex ea2bdec..0051630 100644 --- a/macros/Scilab-Arduino/GenerateSetupFunction.bin +++ b/macros/Scilab-Arduino/GenerateSetupFunction.bin diff --git a/macros/Scilab-Arduino/GenerateSetupFunction.sci b/macros/Scilab-Arduino/GenerateSetupFunction.sci index 33a515d..19cf4b8 100644 --- a/macros/Scilab-Arduino/GenerateSetupFunction.sci +++ b/macros/Scilab-Arduino/GenerateSetupFunction.sci @@ -1,5 +1,27 @@ -//Scilab2C IITB FOSSEE +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function GenerateSetupFunction(FileInfo) +// ----------------------------------------------------------------- +// Generate setup functions for Arduino peripherals according to +// entries in given input file +// +// Input data: +// File containing required peripheral initialisation +// +// Output data: +// generates file with setup functions +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + SetupListFile = FileInfo.SetupListFile; load(SetupListFile,'SetupList'); diff --git a/macros/Scilab-Arduino/GetArduinoFunctions.sci b/macros/Scilab-Arduino/GetArduinoFunctions.sci index 1af351b..a112fe6 100644 --- a/macros/Scilab-Arduino/GetArduinoFunctions.sci +++ b/macros/Scilab-Arduino/GetArduinoFunctions.sci @@ -1,3 +1,13 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function ArduinoFunctions = GetArduinoFunctions() // ----------------------------------------------------------------- // Get list of Arduino functions supported @@ -12,14 +22,14 @@ function ArduinoFunctions = GetArduinoFunctions() // ----------------------------------------------------------------- ArduinoFunctions = [ - "cmd_digital_out" - "cmd_digital_in" - "cmd_analog_out" - "cmd_analog_in" - "cmd_dcmotor_setup" - "cmd_dcmotor_run" - "cmd_servo_attach" - "cmd_servo_detach" - "cmd_servo_move"]; + "cmd_digital_out" + "cmd_digital_in" + "cmd_analog_out" + "cmd_analog_in" + "cmd_dcmotor_setup" + "cmd_dcmotor_run" + "cmd_servo_attach" + "cmd_servo_detach" + "cmd_servo_move"]; endfunction diff --git a/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci b/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci index c992057..d2cd0c7 100644 --- a/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci +++ b/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci @@ -1,3 +1,13 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function ArduinoSetupFunctions = GetArduinoSetupFunctions() // ----------------------------------------------------------------- // Get list of Arduino setup functions supported diff --git a/macros/Scilab-Arduino/InsertSetupInList.bin b/macros/Scilab-Arduino/InsertSetupInList.bin Binary files differindex 44e688c..29e3731 100644 --- a/macros/Scilab-Arduino/InsertSetupInList.bin +++ b/macros/Scilab-Arduino/InsertSetupInList.bin diff --git a/macros/Scilab-Arduino/InsertSetupInList.sci b/macros/Scilab-Arduino/InsertSetupInList.sci index b73910f..6584f29 100644 --- a/macros/Scilab-Arduino/InsertSetupInList.sci +++ b/macros/Scilab-Arduino/InsertSetupInList.sci @@ -1,4 +1,29 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function InsertSetupInList(FunName,InArg,NInArg,SetupListFile,FunType) +// ----------------------------------------------------------------- +// Generate list of setup functions required acorginto peripherals used +// +// Input data: +// FunName: scilab-arduino toolbox function +// InArg: input arguments for above mentioned function +// NInArg: no of input arguments for above mentioned function +// SetupListFile: file containing list of setup functions +// FunType: Gpio function or initialisation function for any other perpheral +// +// Output data: +// List of setup functions for Arduino +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- load(SetupListFile,'SetupList'); diff --git a/macros/Scilab-Arduino/IsArduinoFunction.sci b/macros/Scilab-Arduino/IsArduinoFunction.sci index de1c770..d98f5cd 100644 --- a/macros/Scilab-Arduino/IsArduinoFunction.sci +++ b/macros/Scilab-Arduino/IsArduinoFunction.sci @@ -1,3 +1,13 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function Output = IsArduinoFunction(FunName) // ----------------------------------------------------------------- // Check whether input function name is an Arduino function or not. diff --git a/macros/Scilab-Arduino/IsArduinoSetupFunction.sci b/macros/Scilab-Arduino/IsArduinoSetupFunction.sci index fae7f62..3e1c18f 100644 --- a/macros/Scilab-Arduino/IsArduinoSetupFunction.sci +++ b/macros/Scilab-Arduino/IsArduinoSetupFunction.sci @@ -1,3 +1,13 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function Output = IsArduinoSetupFunction(FunName) // ----------------------------------------------------------------- // Check whether input function name is an Arduino setup function or not. diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin Binary files differindex bcc63fc..cb61f23 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 4afbbe6..b9e7d8a 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -5354,40 +5354,6 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file', INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
-//------------------------------------
-//---- Class PERMUTE -----------------
-//------------------------------------
-//ClassName = 'PERMUTE';
-
-// --- Class Annotation. ---
-//PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
-//ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
-
-//Arguements specified: initial value, start time, time vector, ode function
-//PrintStringInfo('NIN= 2',ClassFileName,'file','y');
-//PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
-//PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
-//PrintStringInfo('OUT(1).SZ(1)= FA_SZ_PERMUTE_ROW(IN(1).SZ, IN(2).VAL)',ClassFileName,'file','y');
-//PrintStringInfo('OUT(1).SZ(2)= FA_SZ_PERMUTE_COL(IN(1).SZ, IN(2).VAL)',ClassFileName,'file','y');
-
-//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
-//PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
-//PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
-//PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
-//PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
-//PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
-//PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
-//PrintStringInfo('s2d2'+ArgSeparator+'s0',ClassFileName,'file','y');
-//PrintStringInfo('u82d2'+ArgSeparator+'u80',ClassFileName,'file','y');
-//PrintStringInfo('i82d2'+ArgSeparator+'i80',ClassFileName,'file','y');
-//PrintStringInfo('u162d2'+ArgSeparator+'u160',ClassFileName,'file','y');
-//PrintStringInfo('i162d2'+ArgSeparator+'i160',ClassFileName,'file','y');
-
-// --- Annotation Function And Function List Function. ---
-//FunctionName = 'permute';
-//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
-//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
-//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
//------------------------------------
//---- Class DIFF -----------------
diff --git a/macros/findDeps/getAllHeaders.bin b/macros/findDeps/getAllHeaders.bin Binary files differindex 8ba5545..bb5e9c8 100644 --- a/macros/findDeps/getAllHeaders.bin +++ b/macros/findDeps/getAllHeaders.bin diff --git a/macros/findDeps/getAllHeaders.sci b/macros/findDeps/getAllHeaders.sci index 50ee358..175c8dc 100644 --- a/macros/findDeps/getAllHeaders.sci +++ b/macros/findDeps/getAllHeaders.sci @@ -175,10 +175,10 @@ function allHeaders = getAllHeaders(SharedInfo) "src/c/hardware/avr/includes/AVRPeripheralPWM.h" "src/c/hardware/avr/includes/AVRUtil.h" ]; - + RPi_headers = [ - "src/c/hardware/rasberrypi/libraries/wiringPi/wiringPi.h" - "src/c/hardware/rasberrypi/libraries/wiringPi/wiringSerial.h" + "thirdparty/raspberrypi/includes/wiringPi.h" + "thirdparty/raspberrypi/includes/wiringSerial.h" "src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h" "src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h" "src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h" diff --git a/macros/findDeps/getAllLibraries.bin b/macros/findDeps/getAllLibraries.bin Binary files differindex 718e2b1..ca1db0c 100644 --- a/macros/findDeps/getAllLibraries.bin +++ b/macros/findDeps/getAllLibraries.bin diff --git a/macros/findDeps/getAllLibraries.sci b/macros/findDeps/getAllLibraries.sci index 7ac9e5b..7969879 100644 --- a/macros/findDeps/getAllLibraries.sci +++ b/macros/findDeps/getAllLibraries.sci @@ -1,42 +1,62 @@ +// Copyright (C) 2016 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function allLibraries = getAllLibraries(SharedInfo) +// ----------------------------------------------------------------- +// Select library files according to target specified +// +// Input data: +// scilab2c SharedInfo structure +// +// Output data: +// returns an array containing file paths for libraries +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + Target = SharedInfo.Target; //Library files required for "RasberryPi" target RPi_libs = [ - "src/c/hardware/rasberrypi/libraries/wiringPi/libwiringPi.so" - "src/c/hardware/rasberrypi/libraries/libcblas.a" - "src/c/hardware/rasberrypi/libraries/librefblas.a" - "src/c/hardware/rasberrypi/libraries/liblapack.a" - "src/c/hardware/rasberrypi/libraries/libgfortran.a" - "src/c/hardware/rasberrypi/libraries/libgsl.a" - ]; + "thirdparty/raspberrypi/lib/libwiringPi.so" + "thirdparty/raspberrypi/lib/libcblas.a" + "thirdparty/raspberrypi/lib/librefblas.a" + "thirdparty/raspberrypi/lib/liblapack.a" + "thirdparty/raspberrypi/lib/libgfortran.a" + "thirdparty/raspberrypi/lib/libgsl.a"]; RPi_cvlibs = [ - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_calib3d.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_contrib.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_core.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_features2d.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_flann.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_gpu.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_highgui.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_imgproc.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_legacy.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_ml.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_nonfree.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_objdetect.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_ocl.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_photo.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_stitching.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_superres.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_video.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_videostab.a" - "src/c/hardware/rasberrypi/libraries/opencv/libopencv_ts.a" - "src/c/hardware/rasberrypi/libraries/libjpeg.a" - "src/c/hardware/rasberrypi/libraries/libjasper.a" - "src/c/hardware/rasberrypi/libraries/libpng.a" - "src/c/hardware/rasberrypi/libraries/libIlmImf.a" - "src/c/hardware/rasberrypi/libraries/libzlib.a" - "src/c/hardware/rasberrypi/libraries/libtiff.a" -]; + "thirdparty/raspberrypi/lib/libopencv_calib3d.a" + "thirdparty/raspberrypi/lib/libopencv_contrib.a" + "thirdparty/raspberrypi/lib/libopencv_core.a" + "thirdparty/raspberrypi/lib/libopencv_features2d.a" + "thirdparty/raspberrypi/lib/libopencv_flann.a" + "thirdparty/raspberrypi/lib/libopencv_gpu.a" + "thirdparty/raspberrypi/lib/libopencv_highgui.a" + "thirdparty/raspberrypi/lib/libopencv_imgproc.a" + "thirdparty/raspberrypi/lib/libopencv_legacy.a" + "thirdparty/raspberrypi/lib/libopencv_ml.a" + "thirdparty/raspberrypi/lib/libopencv_nonfree.a" + "thirdparty/raspberrypi/lib/libopencv_objdetect.a" + "thirdparty/raspberrypi/lib/libopencv_ocl.a" + "thirdparty/raspberrypi/lib/libopencv_photo.a" + "thirdparty/raspberrypi/lib/libopencv_stitching.a" + "thirdparty/raspberrypi/lib/libopencv_superres.a" + "thirdparty/raspberrypi/lib/libopencv_video.a" + "thirdparty/raspberrypi/lib/libopencv_videostab.a" + "thirdparty/raspberrypi/lib/libopencv_ts.a" + "thirdparty/raspberrypi/lib/libjpeg.a" + "thirdparty/raspberrypi/lib/libjasper.a" + "thirdparty/raspberrypi/lib/libpng.a" + "thirdparty/raspberrypi/lib/libIlmImf.a" + "thirdparty/raspberrypi/lib/libzlib.a" + "thirdparty/raspberrypi/lib/libtiff.a"]; if Target == "RPi" allLibraries = RPi_libs; diff --git a/macros/findDeps/getArduinoFiles.bin b/macros/findDeps/getArduinoFiles.bin Binary files differindex 651b8f3..411018b 100644 --- a/macros/findDeps/getArduinoFiles.bin +++ b/macros/findDeps/getArduinoFiles.bin diff --git a/macros/findDeps/getArduinoFiles.sci b/macros/findDeps/getArduinoFiles.sci index 89033d0..aae8e50 100644 --- a/macros/findDeps/getArduinoFiles.sci +++ b/macros/findDeps/getArduinoFiles.sci @@ -1,16 +1,26 @@ -// -// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab -// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// Copyright (C) 2016 - IIT Bombay - FOSSEE // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function arduinoFiles = getArduinoFiles() +// ----------------------------------------------------------------- +// Returns address of some default arduino files // +// Input data: +// None // +// Output data: +// Returns address of some default arduino files +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- -function arduinoFiles = getArduinoFiles() arduinoFiles = [ "src/c/scilab-arduino/default_files/setup_arduino.h" "src/c/scilab-arduino/default_files/Makefile" diff --git a/macros/runsci2c.bin b/macros/runsci2c.bin Binary files differindex 253cc78..fc8e8a7 100644 --- a/macros/runsci2c.bin +++ b/macros/runsci2c.bin diff --git a/macros/runsci2c.sci b/macros/runsci2c.sci index 9301421..0bc3e92 100644 --- a/macros/runsci2c.sci +++ b/macros/runsci2c.sci @@ -154,7 +154,7 @@ end //Copy folder containing opencv include files in Includes folder
if((Target == 'RPi') & (SharedInfo.OpenCVUsed == %T))
- copyfile(SCI2CHOME + "/" +'src/c/hardware/rasberrypi/libraries/opencv/opencv2/',SCI2COutputPath+"/includes/opencv2")
+ copyfile(SCI2CHOME + "/" +'thirdparty/raspberrypi/includes/opencv2/',SCI2COutputPath+"/includes/opencv2")
end
// --------------------------
|