summaryrefslogtreecommitdiffstats
path: root/pcilib
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-03-01 17:17:46 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-03-01 17:17:46 +0100
commit269b0985bd5830e27f6dedb04a05d76f52acb68c (patch)
tree2b885f0a79a0fbc51afa303d1f94647a360a973f /pcilib
parent9b947f32c3db96c3022afad401b1349205d22259 (diff)
downloadpcitool-269b0985bd5830e27f6dedb04a05d76f52acb68c.tar.gz
pcitool-269b0985bd5830e27f6dedb04a05d76f52acb68c.tar.bz2
pcitool-269b0985bd5830e27f6dedb04a05d76f52acb68c.tar.xz
pcitool-269b0985bd5830e27f6dedb04a05d76f52acb68c.zip
update documentation
Diffstat (limited to 'pcilib')
-rw-r--r--pcilib/py.h48
1 files changed, 40 insertions, 8 deletions
diff --git a/pcilib/py.h b/pcilib/py.h
index 549eddf..62ce7db 100644
--- a/pcilib/py.h
+++ b/pcilib/py.h
@@ -125,23 +125,55 @@ int pcilib_py_eval_func(pcilib_t *ctx, const char *script, const char *func, pci
* @return - NULL or cloned pcilib_py_t content pointer on success
*/
pcilib_py_t* pcilib_init_py_ctx(pcilib_py_t* in, int *err);
+
+/**
+ * @brief pcilib_t independent variant pcilib_free_py
+ * @param ctx_py[in,out] - pcilib_py_t context
+ */
+void pcilib_free_py_ctx(pcilib_py_t *ctx_py);
+
+/** pcilib_t independent variant of pcilib_py_eval_func()
+ * @param ctx_py[in,out] - pcilib_py_t context
+ * @param name[in] - script name
+ * @param name[in] - function name
+ * @param pyval[in] - input value (will be decref in this fucntion)
+ * @param err[out] - error
+ * @return value returned by python function
+ */
pcilib_py_object* pcilib_py_ctx_eval_func(pcilib_py_t *ctx_py,
- const char *script_name,
+ const char *name,
const char *func_name,
pcilib_py_object *pyval,
int *err);
-int pcilib_py_ctx_add_script_dir(pcilib_py_t *ctx_py, const char *dir);
-void pcilib_free_py_ctx(pcilib_py_t *ctx_py);
-int pcilib_py_ctx_load_script(pcilib_py_t *ctx_py, const char *script_name);
+
+/**
+ * @brief pcilib_t independent variant of pcilib_py_add_script_dir
+ * @param ctx_py[in,out] - pcilib_py_t context
+ * @param[in] location - NULL or path to additional scripts
+ * @return
+ */
+int pcilib_py_ctx_add_script_dir(pcilib_py_t *ctx_py, const char *location);
+
+/**
+ * @brief pcilib_t independent variant of pcilib_py_load_script
+ * @param ctx_py[in,out] - pcilib_py_t context
+ * @param[in] name - script name, the passed variable is referenced and, hence, should have static duration
+ * @return
+ */
+int pcilib_py_ctx_load_script(pcilib_py_t *ctx_py, const char *name);
+
+/**
+ * @brief Returns information about scripts aviable in model
+ * @param ctx_py[in,out] - pcilib_py_t context
+ * @return List with information about scripts
+ */
pcilib_py_object *pcilib_py_ctx_get_scripts_info(pcilib_py_t *ctx_py);
-/*!
- * \brief Wrap for PyDict_SetItem, with decrease reference counting after set.
+/** Wrap for PyDict_SetItem, with decrease reference counting after set.
*/
void pcilib_pydict_set_item(pcilib_py_object* dict, pcilib_py_object* name, pcilib_py_object* value);
-/*!
- * \brief Wrap for PyList_Append, with decrease reference counting after append.
+/** Wrap for PyList_Append, with decrease reference counting after append.
*/
void pcilib_pylist_append(pcilib_py_object* list, pcilib_py_object* value);
#ifdef __cplusplus