Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
sim:file [2024/02/27 16:03] – fabian | sim:file [2024/02/27 17:16] (current) – fabian |
---|
===== Extending the File API ===== | ===== Extending the File API ===== |
| |
File interactions can be extended using a shared C++ library, however the functions exposed to actsim must be made external C functions due to C++ name mangling. Include the ''simlib_file.h'' header to access the core file functions. With this, cou can use ''actsim_file_write_core'' to write your own custom output generator. Here is a brief example taken from the [[sim:logger | logger]] output generation. For more information about the structure of an external C function callable from CHP, as well as how to make it accessible to actsim, see [[tools:actsim | the actsim page]] or read the default ''actsim.conf'' in the actsim source code in the ''simlib/'' directory. | File interactions can be extended using a shared C++ library, however the functions exposed to actsim must be made external C functions due to C++ name mangling. Include the ''simlib_file.h'' header to access the core file functions. With this, cou can use ''actsim_file_write_core'' to write your own custom output generator. Here is a brief example taken from the [[sim:loggers | logger]] output generation. For more information about the structure of an external C function callable from CHP, as well as how to make it accessible to actsim, see [[tools:actsim | the actsim page]] or read the default ''actsim.conf'' in the actsim source code in the ''simlib/'' directory. |
| |
<code c> | <code c> |
begin extern | begin extern |
| |
string_tablex libs "stdsim" | string_tablex libs "mylib" |
| |
begin stdsim | begin mylib |
string path "/some/path/to/my_external_lib.so" | string path "/some/path/to/my_external_lib.so" |
| |