[Top][All Lists]

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

Re: stroring pointers from oct-files

From: Olaf Till
Subject: Re: stroring pointers from oct-files
Date: Sun, 4 Nov 2012 19:55:24 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Nov 04, 2012 at 06:55:47PM +0100, pantxo diribarne wrote:
> Hello,
> I use octave to comunicate with laboratory hardwares using modbus protocol
> through tcp-ip. The modbus library I use (libmodbus:
> returns a pointer the modbus "context" variable and then uses this pointer
> to access the server.
> In octave I cast the adress of the pointer to an "int" type, so that I can
> reuse that pointer for subsequent calls to one of modbus read/write
> functions. I then have to free this pointer before exiting octave. Is it
> the righ way to store pointers or is there a proper way to do that?
> Pantxo

This could be related to a problem I have written some as yet private
code for, but I'm not sure that I understand you right. Do you pass
the casted pointer to user space (into a variable of the Octave
interpreter)?  Is it the problem to pass the pointer from one octfile
to another? If you have only one pointer per Octave session and only
one octfile which needs it I would see no problem ...


public key id EAFE0591, e.g. on x-hkp://

Attachment: signature.asc
Description: Digital signature

reply via email to

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