|
|
## Post events
|
|
## Post events
|
|
|
Two types of events can be posted: "standard" events are posted at the moment of the function call, while delayed events are posted after a specified amount of time.
|
|
Two types of events can be posted: "standard" events are posted at the moment of the function call, while delayed events are posted after a specified amount of time.
|
|
|
To post a "standard" event the following code is used
|
|
|
|
|
### Standard events
|
|
### Standard events
|
|
|
|
To post a "standard" event the following code is used:
|
|
|
```
|
|
```
|
|
|
// Include the event broker
|
|
// Include the event broker
|
|
|
#include <events/EventBroker.h>
|
|
#include <events/EventBroker.h>
|
| ... | @@ -19,7 +20,7 @@ void someFunction() |
... | @@ -19,7 +20,7 @@ void someFunction() |
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
### Delayed events
|
|
### Delayed events
|
|
|
The delayed events are posted in a very similar way
|
|
The delayed events are posted in a very similar way:
|
|
|
```
|
|
```
|
|
|
// Include the event broker
|
|
// Include the event broker
|
|
|
#include <events/EventBroker.h>
|
|
#include <events/EventBroker.h>
|
| ... | | ... | |