Dear All,
I have a quick question. How one would properly call sddsprocess routine with arguments from your own C program?
Thanks,
Alex.
Calling SDDS functions from C program
Moderators: cyao, michael_borland
-
- Posts: 2008
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Calling SDDS functions from C program
Alex,
Do you want to execute an SDDS program as a subprocess? If so, then you can use the system() call from C and give it an appropriate string containing an arbtrary command.
--Michael
Do you want to execute an SDDS program as a subprocess? If so, then you can use the system() call from C and give it an appropriate string containing an arbtrary command.
--Michael
-
- Posts: 36
- Joined: 18 Jul 2014, 12:44
Re: Calling SDDS functions from C program
Dear Michael,
Actually, no. I want to use SDDS.h file and call the function inside my C code.
What would be the standard way to do it?
Alex.
Actually, no. I want to use SDDS.h file and call the function inside my C code.
What would be the standard way to do it?
Alex.
-
- Posts: 2008
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Calling SDDS functions from C program
Alex,
To do this with sddsprocess would be quite complicated. There's a source file SDDSaps/SDDSaps.c that contains some of the relevant code. In general, the programs themselves are not designed to be called as subroutines. Also, since the programs are designed to read/write data from/to files, you wouldn't expect any speed-up vs using the system() call method.
Perhaps if you can be more specific about what you want to do, I can give more concrete advice.
--Michael
To do this with sddsprocess would be quite complicated. There's a source file SDDSaps/SDDSaps.c that contains some of the relevant code. In general, the programs themselves are not designed to be called as subroutines. Also, since the programs are designed to read/write data from/to files, you wouldn't expect any speed-up vs using the system() call method.
Perhaps if you can be more specific about what you want to do, I can give more concrete advice.
--Michael
-
- Posts: 36
- Joined: 18 Jul 2014, 12:44
Re: Calling SDDS functions from C program
Thanks for the references! I will just proceed with system() functions.
Alex.
Alex.