73
73
* \return 1, serialized to PyObject or NULL with exeption text, if failed.
75
75
PyObject* Pcipywrap_set_property(Pcipywrap *self, PyObject* val, const char *prop);
79
* \brief Wrap for pcilib_get_register_list function.
80
* \param bank [in] bank - if set, only register within the specified bank will be returned
81
* \return list of registers, serialized to Python object
76
83
PyObject* Pcipywrap_get_registers_list(Pcipywrap *self, const char *bank);
86
* \brief Returns the information about the specified register. Wrap for pcilib_get_register_info
87
* \param[in] reg the name of the register
88
* \param[in] bank indicates the bank where to look for register, autodetected if NULL is passed
89
* \return information about the specified register, serialized to Python object
77
91
PyObject* Pcipywrap_get_register_info(Pcipywrap *self, const char* reg,const char *bank);
94
* \brief Returns the list of properties available under the specified path. Wrap for pcilib_get_property_list
95
* \param[in] branch path or NULL to return the top-level properties
96
* \return the list of the properties, serialized to Python object
78
98
PyObject* Pcipywrap_get_property_list(Pcipywrap *self, const char* branch);
101
* \brief Reads data from DMA until timeout is hit, a full DMA packet is read, or the specified number of bytes are read.
102
* Wrap for pcilib_read_dma.
103
* \param dma ID of DMA engine
104
* \param size specifies how many bytes should be read
105
* \return DMA data, serialierd to Python bytearray
106
* \warning This function has not been tested.
107
* \todo Test this fucntion
80
109
PyObject* Pcipywrap_read_dma(Pcipywrap *self, unsigned char dma, size_t size);
112
* \brief Wrap for pcilib_lock_global
113
* \return 1, serialized to PyObject or NULL with exeption text, if failed.
82
115
PyObject* Pcipywrap_lock_global(Pcipywrap *self);
118
* \brief Wrap for pcilib_unlock_global
83
120
void Pcipywrap_unlock_global(Pcipywrap *self);
86
123
* \brief Wrap for pcilib_lock
87
* \param lock_id lock identificator
124
* \param[in] lock_id lock identificator
88
125
* \warning This function should be called only under Python standart threading lock.
89
126
* Otherwise it will stuck with more than 1 threads. See /xml/test/test_prop_mt.py
93
130
PyObject* Pcipywrap_lock(Pcipywrap *self, const char *lock_id);
133
* \brief This function will try to take a lock for the mutex pointed by
134
* lockfunction to acquire a lock, but that returns immediatly if the lock can't be
135
* acquired on first try. Wrap for pcilib_try_lock.
136
* \param[in] lock_id lock id
137
* \return 1, serialized to PyObject or NULL with exeption text, if failed.
95
139
PyObject* Pcipywrap_try_lock(Pcipywrap *self, const char *lock_id);
142
* \brief This function unlocks the lock with specified id. Wrap for pcilib_unlock.
143
* \param[in] lock_id lock id
144
* \return 1, serialized to PyObject or NULL with exeption text, if failed.
96
146
PyObject* Pcipywrap_unlock(Pcipywrap *self, const char *lock_id);
149
* \brief Returns list with information about aviable scripts
150
* \return list with information about scripts, aviable in model
98
152
PyObject* Pcipywrap_get_scripts_list(Pcipywrap *self);
155
* \brief Runs script with specified name
156
* \param script_name script name (with extension); name could be found by
157
* Pcipywrap_get_scripts_list fucntion
158
* \param[in] value input value
159
* \return value returned by script
99
161
PyObject* Pcipywrap_run_script(Pcipywrap *self, const char* script_name, PyObject* value);
101
163
#endif /* PCIPYWRAP_H */