Name | |
---|---|
typedef void(MAMACALLTYPE *)(mamaTimer timer, void *closure) | mamaTimerCb |
Name | |
---|---|
MAMAExpDLL mama_status | mamaTimer_create(mamaTimer * result, mamaQueue queue, mamaTimerCb action, mama_f64_t interval, void * closure) |
MAMAExpDLL mama_status | mamaTimer_create2(mamaTimer * result, mamaQueue queue, mamaTimerCb action, mamaTimerCb onTimerDestroyed, mama_f64_t interval, void * closure) |
MAMAExpDLL mama_status | mamaTimer_allocate(mamaTimer * result, mamaQueue queue) |
MAMAExpDLL mama_status | mamaTimer_allocate2(mamaTimer * result, mamaQueue queue, mamaTimerCb onTimerDestroyed) |
MAMAExpDLL mama_status | mamaTimer_start(mamaTimer result, mamaTimerCb action, mama_f64_t interval, void * closure) |
MAMAExpDLL mama_status | mamaTimer_destroy(mamaTimer timer) |
MAMAExpDLL mama_status | mamaTimer_reset(mamaTimer timer) |
MAMAExpDLL mama_status | mamaTimer_setInterval(mamaTimer timer, mama_f64_t interval) |
MAMAExpDLL mama_status | mamaTimer_getInterval(const mamaTimer timer, mama_f64_t * interval) |
MAMAExpDLL mama_status | mamaTimer_getQueue(const mamaTimer timer, mamaQueue * queue) |
typedef void(MAMACALLTYPE * mamaTimerCb) (mamaTimer timer, void *closure);
Parameters:
Prototype for callback invoked by timer.
MAMAExpDLL mama_status mamaTimer_create(
mamaTimer * result,
mamaQueue queue,
mamaTimerCb action,
mama_f64_t interval,
void * closure
)
Parameters:
Create a repeating timer. Since the mamaTimer relies on the timer mechanism of the underlying middleware, the resolution of the timer is also dependent on the middleware. Consult your middleware documentation for details.
The callback is invoked repeatedly at the specified interval until the timer is destroyed.
MAMAExpDLL mama_status mamaTimer_create2(
mamaTimer * result,
mamaQueue queue,
mamaTimerCb action,
mamaTimerCb onTimerDestroyed,
mama_f64_t interval,
void * closure
)
Parameters:
Create a repeating timer. Since the mamaTimer relies on the timer mechanism of the underlying middleware, the resolution of the timer is also dependent on the middleware. Consult your middleware documentation for details.
The callback is invoked repeatedly at the specified interval until the timer is destroyed.
MAMAExpDLL mama_status mamaTimer_allocate(
mamaTimer * result,
mamaQueue queue
)
Parameters:
Allocate a repeating timer.
MAMAExpDLL mama_status mamaTimer_allocate2(
mamaTimer * result,
mamaQueue queue,
mamaTimerCb onTimerDestroyed
)
Parameters:
Allocate a repeating timer.
MAMAExpDLL mama_status mamaTimer_start(
mamaTimer result,
mamaTimerCb action,
mama_f64_t interval,
void * closure
)
Parameters:
Start a repeating timer created using allocate
The callback is invoked repeatedly at the specified interval until the timer is destroyed.
MAMAExpDLL mama_status mamaTimer_destroy(
mamaTimer timer
)
Parameters:
Destroy the timer. This function must be called from the same thread dispatching on the associated event queue unless both the default queue and dispatch queue are not actively dispatching. Note that this function is asynchronous and is only guaranteed to have finished whenever the onTimerDestroyed function passed to the mamaTimer_create2 has been called.
MAMAExpDLL mama_status mamaTimer_reset(
mamaTimer timer
)
Parameters:
Reset the timer to the beginning of the interval.
MAMAExpDLL mama_status mamaTimer_setInterval(
mamaTimer timer,
mama_f64_t interval
)
Parameters:
Set the timer to use a different interval (and reset to the beginning of that interval).
MAMAExpDLL mama_status mamaTimer_getInterval(
const mamaTimer timer,
mama_f64_t * interval
)
Parameters:
Get the current timer interval.
MAMAExpDLL mama_status mamaTimer_getQueue(
const mamaTimer timer,
mamaQueue * queue
)
Parameters:
Return the mamaQueue
for this timer.
/* $Id$
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Technologies, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef WTimerH__
#define WTimerH__
#include <mama/status.h>
#include <mama/types.h>
#include <mama/queue.h>
#if defined( __cplusplus )
extern "C"
{
#endif /* defined( __cplusplus ) */
typedef void (MAMACALLTYPE *mamaTimerCb)(mamaTimer timer, void *closure);
MAMAExpDLL
extern mama_status
mamaTimer_create(mamaTimer* result,
mamaQueue queue,
mamaTimerCb action,
mama_f64_t interval,
void* closure);
MAMAExpDLL
extern mama_status
mamaTimer_create2(mamaTimer* result,
mamaQueue queue,
mamaTimerCb action,
mamaTimerCb onTimerDestroyed,
mama_f64_t interval,
void* closure);
MAMAExpDLL
extern mama_status
mamaTimer_allocate(mamaTimer* result,
mamaQueue queue);
MAMAExpDLL
extern mama_status
mamaTimer_allocate2(mamaTimer* result,
mamaQueue queue,
mamaTimerCb onTimerDestroyed);
MAMAExpDLL
extern mama_status
mamaTimer_start(mamaTimer result,
mamaTimerCb action,
mama_f64_t interval,
void* closure);
MAMAExpDLL
extern mama_status
mamaTimer_destroy(mamaTimer timer);
MAMAExpDLL
extern mama_status
mamaTimer_reset(mamaTimer timer);
MAMAExpDLL
extern mama_status
mamaTimer_setInterval(mamaTimer timer,
mama_f64_t interval);
MAMAExpDLL
extern mama_status
mamaTimer_getInterval(const mamaTimer timer,
mama_f64_t* interval);
MAMAExpDLL
extern mama_status
mamaTimer_getQueue (const mamaTimer timer,
mamaQueue* queue);
#if defined( __cplusplus )
}
#endif /* defined( __cplusplus ) */
#endif /* WTimerH__ */
Updated on 2023-03-31 at 15:29:17 +0100