14
* \brief Redirect pcilib standart log stream to exeption text.
15
* Logger will accumulate errors untill get message, starts with "#E".
16
* After that, logger will write last error, and all accumulated errors
17
* to Python exeption text
19
void __redirect_logs_to_exeption();
22
* \brief Wraps for pcilib_open function.
23
* \param[in] fpga_device path to the device file [/dev/fpga0]
24
* \param[in] model specifies the model of hardware, autodetected if NULL is passed
25
* \return Pointer to pcilib_t, created by pcilib_open; NULL with exeption text, if failed.
27
PyObject* create_pcilib_instance(const char *fpga_device, const char *model);
29
Pcipywrap *new_Pcipywrap(const char* fpga_device, const char* model);
30
Pcipywrap *create_Pcipywrap(PyObject* ctx);
31
void delete_Pcipywrap(Pcipywrap *self);
34
* \brief Reads register value. Wrap for pcilib_read_register function.
35
* \param[in] regname the name of the register
36
* \param[in] bank should specify the bank name if register with the same name may occur in multiple banks, NULL otherwise
37
* \return register value, can be integer or float type; NULL with exeption text, if failed.
39
PyObject* Pcipywrap_read_register(Pcipywrap *self, const char *regname, const char *bank);
42
* \brief Writes value to register. Wrap for pcilib_write_register function.
43
* \param[in] val Register value, that needs to be set. Can be int, float or string.
44
* \param[in] regname the name of the register
45
* \param[in] bank should specify the bank name if register with the same name may occur in multiple banks, NULL otherwise
46
* \return 1, serialized to PyObject or NULL with exeption text, if failed.
48
PyObject* Pcipywrap_write_register(Pcipywrap *self, PyObject* val, const char *regname, const char *bank);
51
* \brief Reads propety value. Wrap for pcilib_get_property function.
52
* \param[in] prop property name (full name including path)
53
* \return property value, can be integer or float type; NULL with exeption text, if failed.
55
PyObject* Pcipywrap_get_property(Pcipywrap *self, const char *prop);
58
* \brief Writes value to property. Wrap for pcilib_set_property function.
59
* \param[in] prop property name (full name including path)
60
* \param[in] val Property value, that needs to be set. Can be int, float or string.
61
* \return 1, serialized to PyObject or NULL with exeption text, if failed.
63
PyObject* Pcipywrap_set_property(Pcipywrap *self, PyObject* val, const char *prop);
64
PyObject* Pcipywrap_get_registers_list(Pcipywrap *self, const char *bank);
65
PyObject* Pcipywrap_get_register_info(Pcipywrap *self, const char* reg,const char *bank);
66
PyObject* Pcipywrap_get_property_list(Pcipywrap *self, const char* branch);
68
#endif /* PCIPYWRAP_H */