FOSSEE Scilab Octave Toolbox
This is a scilab toolbox to call octave functions. It requires octave to be installed on the system.
fun.h
Go to the documentation of this file.
1 // Copyright (C) 2019 - IIT Bombay - FOSSEE
2 //
3 // This file must be used under the terms of the CeCILL.
4 // This source file is licensed as described in the file COPYING, which
5 // you should have received as part of this distribution. The terms
6 // are also available at
7 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
8 // Author: Rupak Rokade
9 // Organization: FOSSEE, IIT Bombay
10 // Email: toolbox@scilab.in
11 
12 #define fun_h__
13 //extern "C" int fun (double* answ, double* in1, int in1_row, std::string name, std::string opt);
14 
15 extern "C"
16 {
17 
22  typedef enum {
27  }FUNCTYPE;
28 
35  typedef struct {
37  void* key;
38  int rows;
39  int cols;
40  void* dataReal;
41  void* dataImg;
42  void* str;
44  } FUNCSTRUCT;
45 
51  typedef struct {
54  int n_in_rows;
55  int n_in_cols;
57  int n_out_rows;
58  int n_out_cols;
64  void* in_data_real;
65  void* in_data_img;
66  void* out_data_real;
67  void* out_data_img;
71  } FUNCARGS;
76  typedef struct {
80  int n_out_user;
81  char *err;
82  //char *package; //Name of octave package to be loaded*/
85  } FUNCCALL;
94  int fun(FUNCARGS *arr, FUNCCALL *call);
95 }
FUNCTYPE
Enumeration for the data types suported.
Definition: fun.h:22
@ TYPE_DOUBLE
Definition: fun.h:23
@ TYPE_STRUCT
Definition: fun.h:26
@ TYPE_COMPLEX
Definition: fun.h:24
@ TYPE_STRING
Definition: fun.h:25
int fun(FUNCARGS *arr, FUNCCALL *call)
API Function to call/receive and pass the data to fun API
Definition: fun.cpp:30
Struct used to send/receive Scilab data to/from the gateway to fun.cpp API.
Definition: fun.h:51
void * out_data_img
Definition: fun.h:67
int n_out_cols
Definition: fun.h:58
void * out_data_real
Definition: fun.h:66
int is_out_struct
Definition: fun.h:62
int is_out_cmplx
Definition: fun.h:61
int n_in_struct_len
Definition: fun.h:56
int n_out_struct_len
Definition: fun.h:59
int n_in_rows
Definition: fun.h:54
int n_in_cols
Definition: fun.h:55
FUNCTYPE type
Definition: fun.h:53
int is_out_string
Definition: fun.h:63
int is_in_cmplx
Definition: fun.h:60
FUNCSTRUCT * in_struct
Definition: fun.h:68
FUNCSTRUCT * out_struct
Definition: fun.h:69
int n_out_rows
Definition: fun.h:57
void * in_data_img
Definition: fun.h:65
void * in_data_real
Definition: fun.h:64
Struct used to call and pass the data to fun.cpp API.
Definition: fun.h:76
int n_in_arguments
Definition: fun.h:78
int n_out_arguments
Definition: fun.h:79
FUNCARGS * argument
Definition: fun.h:83
int n_out_user
Definition: fun.h:80
char * err
Definition: fun.h:81
Struct used to pass structs to Octave from the fun library.
Definition: fun.h:35
FUNCTYPE type
Definition: fun.h:36
void * str
Definition: fun.h:42
int rows
Definition: fun.h:38
void * dataReal
Definition: fun.h:40
int cols
Definition: fun.h:39
void * key
Definition: fun.h:37
void * dataImg
Definition: fun.h:41