[Top][All Lists]

[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

GCC version

-bash-4.3$ gcc -v
Using built-in specs.
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)


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

DEFUN_DLD (tmgetevents, aArgs, aNumArgs,
  "events = tmgetevents (source, ... attributes)\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\
  source - a binary log filename (a string), or a\n\
     vector of event pointers.\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\
    '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\

//Function body

Sent from:

reply via email to

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