From db464f35f5a10b58d9ed1085e0b462689adee583 Mon Sep 17 00:00:00 2001 From: Siddhesh Wani Date: Mon, 25 May 2015 14:46:31 +0530 Subject: Original Version --- macros/ToolInitialization/ManageNextConversion.sci | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 macros/ToolInitialization/ManageNextConversion.sci (limited to 'macros/ToolInitialization/ManageNextConversion.sci') diff --git a/macros/ToolInitialization/ManageNextConversion.sci b/macros/ToolInitialization/ManageNextConversion.sci new file mode 100644 index 00000000..04ec9dbc --- /dev/null +++ b/macros/ToolInitialization/ManageNextConversion.sci @@ -0,0 +1,86 @@ +function FlagContinueTranslation = ManageNextConversion(FileInfoDatFile) +// function FlagContinueTranslation = ManageNextConversion(FileInfoDatFile) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +//NUT: verifica se update e managenexconversion possono essere integrate in un'unica funzione. + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// --------------------- +// --- Load section. --- +// --------------------- +// --- Load File Info Structure. --- +load(FileInfoDatFile,'FileInfo'); + +// --- Load Shared Info Structure. --- +load(FileInfo.SharedInfoDatFile,'SharedInfo'); + +// --- Load ToBeConverted .dat file. --- +load(FileInfo.FunctionList.ToBeConvertedDat,'ToBeConverted'); +// ------------------------- +// --- End load section. --- +// ------------------------- + +FlagContinueTranslation = 0; + +// ------------------------------------ +// --- Finalize the current C code. --- +// ------------------------------------ +C_FinalizeCode(FileInfo,SharedInfo); + +// ------------------------------------------------ +// --- Identify the next function to translate. --- +// ------------------------------------------------ +SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate - 1; +if (SharedInfo.NFilesToTranslate >= 1) + // Remove the translated C function from the ToBeConverted list + ToBeConverted(1) = []; + FlagContinueTranslation = 1; + SharedInfo.NextSCIFunName = ToBeConverted(1).SCIFunctionName; + SharedInfo.NextCFunName = ToBeConverted(1).CFunctionName; + SharedInfo.NextSCIFunNumber = SharedInfo.NextSCIFunNumber + 1; + [FlagFound,SharedInfo.NextSCIFileName] = ... + SCI2CFindFile(FileInfo.UserSciFilesPaths,SharedInfo.NextSCIFunName+'.sci'); + if (FlagFound == 0) + error(9999, 'Cannot find a scilab file to generate ""'+SharedInfo.NextCFunName+'"".'); + end +end +// ---------------------------------------------------- +// --- End Identify the next function to translate. --- +// ---------------------------------------------------- + + +// --------------------- +// --- Save section. --- +// --------------------- +// --- Save Shared Info Structure. --- +save(FileInfo.SharedInfoDatFile, "SharedInfo"); +clear SharedInfo + +// --- Save ToBeConverted .dat file. --- +save(FileInfo.FunctionList.ToBeConvertedDat, "ToBeConverted"); +clear ToBeConverted + +clear FileInfo +// ------------------------- +// --- End Save section. --- +// ------------------------- + +endfunction -- cgit From 329613eb48542f24bb9014a0a617b05199726e99 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Thu, 17 Dec 2015 14:48:36 +0530 Subject: Code generation for Arduino changed. DC motor added to Arduino. --- macros/ToolInitialization/ManageNextConversion.sci | 1 + 1 file changed, 1 insertion(+) (limited to 'macros/ToolInitialization/ManageNextConversion.sci') diff --git a/macros/ToolInitialization/ManageNextConversion.sci b/macros/ToolInitialization/ManageNextConversion.sci index 04ec9dbc..a1524766 100644 --- a/macros/ToolInitialization/ManageNextConversion.sci +++ b/macros/ToolInitialization/ManageNextConversion.sci @@ -49,6 +49,7 @@ C_FinalizeCode(FileInfo,SharedInfo); // --- Identify the next function to translate. --- // ------------------------------------------------ SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate - 1; + if (SharedInfo.NFilesToTranslate >= 1) // Remove the translated C function from the ToBeConverted list ToBeConverted(1) = []; -- cgit From efd4b2645e3fd3c3cdd7b65501a0e7ae26d03c59 Mon Sep 17 00:00:00 2001 From: Ankit Raj Date: Wed, 21 Jun 2017 11:00:07 +0530 Subject: Functions added - string related and signal processing --- macros/ToolInitialization/ManageNextConversion.sci | 2 ++ 1 file changed, 2 insertions(+) (limited to 'macros/ToolInitialization/ManageNextConversion.sci') diff --git a/macros/ToolInitialization/ManageNextConversion.sci b/macros/ToolInitialization/ManageNextConversion.sci index a1524766..b0d4337b 100644 --- a/macros/ToolInitialization/ManageNextConversion.sci +++ b/macros/ToolInitialization/ManageNextConversion.sci @@ -44,6 +44,8 @@ FlagContinueTranslation = 0; // --- Finalize the current C code. --- // ------------------------------------ C_FinalizeCode(FileInfo,SharedInfo); +//PrintStringInfo(' hello',ReportFileName,'file','y'); + // ------------------------------------------------ // --- Identify the next function to translate. --- -- cgit