help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a function available in .oct file from .m file


From: vivek
Subject: Re: Calling a function available in .oct file from .m file
Date: Tue, 2 Apr 2019 23:04:49 -0500 (CDT)

Following is the command used to compile tmgetevents.oct

g++ -z defs -L../tm/dist/lib -Wl,-rpath-link,../tm/dist/lib -lpthread -ldl
-lc -lnsl -lrt -liconv -o out/tmgetevents.oct -shared out/tmgetevents.o
-loctave -loctinterp -L/usr/local/lib/octave/5.1.0/ out/tmrecostore.o
out/tmobsnode.o out/tmobsdatacollect.o -Wl,-rpath=/usr/local/vendor/bin
-L/usr/local/lib -Wl,-rpath=/usr/local/lib
-Wl,-rpath=/usr/local/lib/octave/5.1.0/

*****************************
GCC version
*****************************

-bash-4.3$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tools/stow/gcc-4_9_3-static.x86_64.linux.centos6/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /remediation/build/tjs/compile/gcc-4.9.3/configure
--prefix=/usr/local --enable-languages=c,c++,objc,obj-c++,fortran,go
--disable-shared --enable-static --with-pic=yes --with-gmp=/usr/local
--with-mpfr=/usr/local --disable-multilib
Thread model: posix
gcc version 4.9.3 (GCC)
-bash-4.3$

*****************************
tmgetevents.cpp
*****************************

#include <octave/oct.h>
#include <stdlib.h>
#include <string>

DEFUN_DLD (tmgetevents, aArgs, aNumArgs,
  "events = tmgetevents (source, ... attributes)\n\
  \n\
  Takes an obslog source (currently binary log file\n\
  and internal sources are supported) and loads the\n\
  obslog events within.  Attributes may be specified\n\
  to filter the events.\n\
  \n\
  source - a binary log filename (a string), or a\n\
     vector of event pointers.\n\
  \n\
  attributes - the following attributes are supported:\n\
    'timerange', [startime endtime]\n\
    'uuid', uuid string or char matrix\n\
    'startobs', obs name\n\
    'endobs', obs name\n\
    'eventid', event id\n\
    'crit',\n\
    'nocrit',\n\
    'rand', probability of including event\n\
    'maxnum', number of events to stop after getting\n\
    'timeout', ms after which to return with whatever\n\
               has been loaded thus far\n\
    'quiet'\n\
  ")

{
//Function body
}




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]