00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00026 #ifndef __APPLICATION_H
00027 #define __APPLICATION_H
00028
00029 #include <avr/pgmspace.h>
00030 #include <inttypes.h>
00031 #include "net/buffers.h"
00032 #include "net/network.h"
00033 #include "net/transport.h"
00034 #include "net.h"
00035
00039 typedef struct {
00040 uint8_t in;
00041 uint8_t out;
00042 } param_desc_t PROGMEM;
00043
00044 typedef void appObjCallback_t(void *self, uint8_t method, uint8_t *buf, uint8_t *result, uint8_t repeated);
00045
00053 struct AppObject {
00054 const param_desc_t *method_sizes;
00055 const param_desc_t *event_sizes;
00056 appObjCallback_t *Callback;
00057 };
00058
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif
00062
00063 void app_init(void);
00064 void app_process(void);
00065 void app_trigger_event(uint8_t obj, uint8_t event);
00066 #ifndef APP_STATIC
00067 uint8_t app_register_obj(struct AppObject *obj, uint8_t events);
00068 #endif
00069
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073
00074 #endif