Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

application.h File Reference

Application layer include file. More...

#include <avr/pgmspace.h>
#include <inttypes.h>
#include "net/buffers.h"
#include "net/network.h"
#include "net/transport.h"
#include "net.h"

Go to the source code of this file.

Data Structures

struct  AppObject
 An application object. More...

struct  param_desc_t
 Structure describing a method parameter or an event. More...


Typedefs

typedef void appObjCallback_t (void *self, uint8_t method, uint8_t *buf, uint8_t *result, uint8_t repeated)

Functions

void app_init (void)
 Initialize layer.

void app_process (void)
 Process waiting events.

void app_trigger_event (uint8_t obj, uint8_t event)
 Fire an event.

uint8_t app_register_obj (struct AppObject *obj, uint8_t events)
 Dynamically register an object.


Detailed Description

Application layer include file.

Constants and definitions of the application layer.

Definition in file application.h.


Function Documentation

void app_init void   ) 
 

Initialize layer.

Should be called after lnk_init().

Definition at line 431 of file application.c.

void app_process void   ) 
 

Process waiting events.

This function should be called from your main loop.

Attention:
Must not be called from a interrupt routine. The implementation is not thread-save.

Definition at line 446 of file application.c.

References tsp_clear_to_send(), tsp_requ(), and tsp_service_e.

uint8_t app_register_obj struct AppObject obj,
uint8_t  events
 

Dynamically register an object.

In the current implementation it is not possible to unregister an object. Furthermore all objects must be registered in the same order if a reset occurs. Otherwise the event configurations will be corrupted.

Parameters:
obj Pointer to application object.
events Number of events which the object has.

Definition at line 519 of file application.c.

void app_trigger_event uint8_t  obj,
uint8_t  event
 

Fire an event.

Parameters:
obj Id of Object whose event should be triggered. This id is returned by app_register_object() or, in case of the static version, must be manually calculated.
event Event id.

Definition at line 500 of file application.c.


Generated on Fri Oct 17 16:45:54 2003 for OpenHome by doxygen 1.3.3