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
{
23
TYPE_DOUBLE
,
24
TYPE_COMPLEX
,
25
TYPE_STRING
,
26
TYPE_STRUCT
,
27
}
FUNCTYPE
;
28
35
typedef
struct
{
36
FUNCTYPE
type
;
37
void
*
key
;
38
int
rows
;
39
int
cols
;
40
void
*
dataReal
;
41
void
*
dataImg
;
42
void
*
str
;
44
}
FUNCSTRUCT
;
45
51
typedef
struct
{
53
FUNCTYPE
type
;
54
int
n_in_rows
;
55
int
n_in_cols
;
56
int
n_in_struct_len
;
57
int
n_out_rows
;
58
int
n_out_cols
;
59
int
n_out_struct_len
;
60
int
is_in_cmplx
;
61
int
is_out_cmplx
;
62
int
is_out_struct
;
63
int
is_out_string
;
64
void
*
in_data_real
;
65
void
*
in_data_img
;
66
void
*
out_data_real
;
67
void
*
out_data_img
;
68
FUNCSTRUCT
*
in_struct
;
69
FUNCSTRUCT
*
out_struct
;
71
}
FUNCARGS
;
76
typedef
struct
{
78
int
n_in_arguments
;
79
int
n_out_arguments
;
80
int
n_out_user
;
81
char
*
err
;
82
//char *package; //Name of octave package to be loaded*/
83
FUNCARGS
*
argument
;
85
}
FUNCCALL
;
94
int
fun
(
FUNCARGS
*arr,
FUNCCALL
*call);
95
}
FUNCTYPE
FUNCTYPE
Enumeration for the data types suported.
Definition:
fun.h:22
TYPE_DOUBLE
@ TYPE_DOUBLE
Definition:
fun.h:23
TYPE_STRUCT
@ TYPE_STRUCT
Definition:
fun.h:26
TYPE_COMPLEX
@ TYPE_COMPLEX
Definition:
fun.h:24
TYPE_STRING
@ TYPE_STRING
Definition:
fun.h:25
fun
int fun(FUNCARGS *arr, FUNCCALL *call)
API Function to call/receive and pass the data to fun API
Definition:
fun.cpp:30
FUNCARGS
Struct used to send/receive Scilab data to/from the gateway to fun.cpp API.
Definition:
fun.h:51
FUNCARGS::out_data_img
void * out_data_img
Definition:
fun.h:67
FUNCARGS::n_out_cols
int n_out_cols
Definition:
fun.h:58
FUNCARGS::out_data_real
void * out_data_real
Definition:
fun.h:66
FUNCARGS::is_out_struct
int is_out_struct
Definition:
fun.h:62
FUNCARGS::is_out_cmplx
int is_out_cmplx
Definition:
fun.h:61
FUNCARGS::n_in_struct_len
int n_in_struct_len
Definition:
fun.h:56
FUNCARGS::n_out_struct_len
int n_out_struct_len
Definition:
fun.h:59
FUNCARGS::n_in_rows
int n_in_rows
Definition:
fun.h:54
FUNCARGS::n_in_cols
int n_in_cols
Definition:
fun.h:55
FUNCARGS::type
FUNCTYPE type
Definition:
fun.h:53
FUNCARGS::is_out_string
int is_out_string
Definition:
fun.h:63
FUNCARGS::is_in_cmplx
int is_in_cmplx
Definition:
fun.h:60
FUNCARGS::in_struct
FUNCSTRUCT * in_struct
Definition:
fun.h:68
FUNCARGS::out_struct
FUNCSTRUCT * out_struct
Definition:
fun.h:69
FUNCARGS::n_out_rows
int n_out_rows
Definition:
fun.h:57
FUNCARGS::in_data_img
void * in_data_img
Definition:
fun.h:65
FUNCARGS::in_data_real
void * in_data_real
Definition:
fun.h:64
FUNCCALL
Struct used to call and pass the data to fun.cpp API.
Definition:
fun.h:76
FUNCCALL::n_in_arguments
int n_in_arguments
Definition:
fun.h:78
FUNCCALL::n_out_arguments
int n_out_arguments
Definition:
fun.h:79
FUNCCALL::argument
FUNCARGS * argument
Definition:
fun.h:83
FUNCCALL::n_out_user
int n_out_user
Definition:
fun.h:80
FUNCCALL::err
char * err
Definition:
fun.h:81
FUNCSTRUCT
Struct used to pass structs to Octave from the fun library.
Definition:
fun.h:35
FUNCSTRUCT::type
FUNCTYPE type
Definition:
fun.h:36
FUNCSTRUCT::str
void * str
Definition:
fun.h:42
FUNCSTRUCT::rows
int rows
Definition:
fun.h:38
FUNCSTRUCT::dataReal
void * dataReal
Definition:
fun.h:40
FUNCSTRUCT::cols
int cols
Definition:
fun.h:39
FUNCSTRUCT::key
void * key
Definition:
fun.h:37
FUNCSTRUCT::dataImg
void * dataImg
Definition:
fun.h:41
src
fun.h
Generated by
1.9.1