/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pywrap/pcipywrap.h

  • Committer: Vasilii Chernov
  • Date: 2016-03-01 16:17:46 UTC
  • mto: This revision was merged to the branch mainline in revision 367.
  • Revision ID: vchernov@inr.ru-20160301161746-3cd0z12j1s5u0zvn
update documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
 * \return 1, serialized to PyObject or NULL with exeption text, if failed.
74
74
 */
75
75
PyObject* Pcipywrap_set_property(Pcipywrap *self, PyObject* val, const char *prop);
 
76
 
 
77
 
 
78
/*!
 
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
 
82
 */
76
83
PyObject* Pcipywrap_get_registers_list(Pcipywrap *self, const char *bank);
 
84
 
 
85
/*!
 
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
 
90
 */
77
91
PyObject* Pcipywrap_get_register_info(Pcipywrap *self, const char* reg,const char *bank);
 
92
 
 
93
/*!
 
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
 
97
 */
78
98
PyObject* Pcipywrap_get_property_list(Pcipywrap *self, const char* branch);
79
99
 
 
100
/*!
 
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
 
108
 */
80
109
PyObject* Pcipywrap_read_dma(Pcipywrap *self, unsigned char dma, size_t size);
81
110
 
 
111
/*!
 
112
 * \brief Wrap for pcilib_lock_global
 
113
 * \return 1, serialized to PyObject or NULL with exeption text, if failed.
 
114
 */
82
115
PyObject* Pcipywrap_lock_global(Pcipywrap *self);
 
116
 
 
117
/*!
 
118
 * \brief Wrap for pcilib_unlock_global
 
119
 */
83
120
void Pcipywrap_unlock_global(Pcipywrap *self);
84
121
 
85
122
/*!
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
90
127
 * for example.
92
129
 */
93
130
PyObject* Pcipywrap_lock(Pcipywrap *self, const char *lock_id);
94
131
 
 
132
/*!
 
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.
 
138
 */
95
139
PyObject* Pcipywrap_try_lock(Pcipywrap *self, const char *lock_id);
 
140
 
 
141
/*!
 
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.
 
145
 */
96
146
PyObject* Pcipywrap_unlock(Pcipywrap *self, const char *lock_id);
97
147
 
 
148
/*!
 
149
 * \brief Returns list with information about aviable scripts
 
150
 * \return list with information about scripts, aviable in model
 
151
 */
98
152
PyObject* Pcipywrap_get_scripts_list(Pcipywrap *self);
 
153
 
 
154
/*!
 
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
 
160
 */
99
161
PyObject* Pcipywrap_run_script(Pcipywrap *self, const char* script_name, PyObject* value);
100
162
 
101
163
#endif /* PCIPYWRAP_H */