163 | | unsigned int getSignalPeriod() {return m_signal_period;}; |
---|
164 | | bool setSignalPeriod(unsigned int p) {m_signal_period=p; return true;}; |
---|
165 | | /** |
---|
166 | | * @brief waits for a 'signal' (blocking) |
---|
167 | | * |
---|
168 | | * a 'signal' is: |
---|
169 | | * when type==Receive: |
---|
170 | | * - one signal_period of frames is present in the buffer |
---|
171 | | * (received by the iso side) |
---|
172 | | * - an error has occurred (xrun, iso error, ...) |
---|
173 | | * when type==Transmit: |
---|
174 | | * - at least one signal_period of frames are present in the buffer |
---|
175 | | * (have been written into it by the client) |
---|
176 | | * - an error occurred |
---|
177 | | * |
---|
178 | | * @return true if the 'signal' is available, false if error |
---|
179 | | */ |
---|
180 | | bool waitForSignal(); |
---|
181 | | |
---|
182 | | /** |
---|
183 | | * @brief checks for a 'signal' (non-blocking) |
---|
184 | | * |
---|
185 | | * a 'signal' is: |
---|
186 | | * when type==Receive: |
---|
187 | | * - one signal_period of frames is present in the buffer |
---|
188 | | * (received by the iso side) |
---|
189 | | * - an error has occurred (xrun, iso error, ...) |
---|
190 | | * when type==Transmit: |
---|
191 | | * - at least one signal_period of frames are present in the buffer |
---|
192 | | * (have been written into it by the client) |
---|
193 | | * - an error occurred |
---|
194 | | * |
---|
195 | | * @return true if the 'signal' is available, false if not (or error) |
---|
196 | | */ |
---|
197 | | bool tryWaitForSignal(); |
---|
198 | | |
---|
199 | | /** |
---|
200 | | * @brief can a SP process (queue, dequeue) packets at this moment? |
---|
201 | | * |
---|
202 | | * |
---|
203 | | * @return true if packet processing makes sense |
---|
204 | | */ |
---|
205 | | bool canProcessPackets(); |
---|
206 | | |
---|
| 164 | //FIXME: document wait functions |
---|
| 165 | bool waitForProducePacket(); |
---|
| 166 | bool waitForProducePeriod(); |
---|
| 167 | bool waitForProduce(unsigned int nframes); |
---|
| 168 | |
---|
| 169 | bool waitForConsumePacket(); |
---|
| 170 | bool waitForConsumePeriod(); |
---|
| 171 | bool waitForConsume(unsigned int nframes); |
---|
| 172 | |
---|
| 173 | bool canProducePacket(); |
---|
| 174 | bool canProducePeriod(); |
---|
| 175 | bool canProduce(unsigned int nframes); |
---|
| 176 | |
---|
| 177 | bool canConsumePacket(); |
---|
| 178 | bool canConsumePeriod(); |
---|
| 179 | bool canConsume(unsigned int nframes); |
---|
| 180 | |
---|
| 181 | public: |
---|