NanoService device game controller for NSPong.

Dependencies:   Beep C12832_lcd EthernetInterface MMA7660 mbed-rtos mbed nsdl_lib

NS_Game_Controller

NS_Game_Controller is a game controller software for NSPong.

NSPong is a HTML5 demo game developed on top of ARM Sensinode’s NanoService Platform. The game uses for example RealTimeMultiplayerNodeJS, Box2D and CAAT libraries, which are specifically built for HTML5 multiplayer games with the client/server model.

NSPong is available at https://github.com/NSPong/NSPong.

Demo video is available at https://vimeo.com/95207889.

Committer:
Shage
Date:
Tue May 13 17:17:38 2014 +0000
Revision:
0:e8d7be634e3c
Initial version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Shage 0:e8d7be634e3c 1 // Support functions for the NSDL library
Shage 0:e8d7be634e3c 2
Shage 0:e8d7be634e3c 3 #ifndef NSDL_SUPPORT_H
Shage 0:e8d7be634e3c 4 #define NSDL_SUPPORT_H
Shage 0:e8d7be634e3c 5
Shage 0:e8d7be634e3c 6 #include "mbed.h"
Shage 0:e8d7be634e3c 7 #include <stdint.h>
Shage 0:e8d7be634e3c 8 #include "sn_nsdl.h"
Shage 0:e8d7be634e3c 9 #include "sn_coap_header.h"
Shage 0:e8d7be634e3c 10 #include "sn_coap_protocol.h"
Shage 0:e8d7be634e3c 11 #include "sn_nsdl_lib.h"
Shage 0:e8d7be634e3c 12
Shage 0:e8d7be634e3c 13 typedef uint8_t (*sn_grs_dyn_res_callback_t)(sn_coap_hdr_s *, sn_nsdl_addr_s *, sn_proto_info_s *);
Shage 0:e8d7be634e3c 14
Shage 0:e8d7be634e3c 15 extern "C" void *nsdl_alloc(uint16_t size);
Shage 0:e8d7be634e3c 16 extern "C" void nsdl_free(void* ptr_to_free);
Shage 0:e8d7be634e3c 17 void nsdl_create_static_resource(sn_nsdl_resource_info_s *resource_structure, uint16_t pt_len, uint8_t *pt, uint16_t rpp_len, uint8_t *rpp_ptr, uint8_t *rsc, uint16_t rsc_len);
Shage 0:e8d7be634e3c 18 void nsdl_create_dynamic_resource(sn_nsdl_resource_info_s *resource_structure, uint16_t pt_len, uint8_t *pt, uint16_t rpp_len, uint8_t *rpp_ptr, uint8_t is_observable, sn_grs_dyn_res_callback_t callback_ptr, int access_right);
Shage 0:e8d7be634e3c 19 sn_nsdl_ep_parameters_s* nsdl_init_register_endpoint(sn_nsdl_ep_parameters_s *endpoint_structure, uint8_t* name, uint8_t* ypename_ptr, uint8_t *lifetime_ptr);
Shage 0:e8d7be634e3c 20 void nsdl_clean_register_endpoint(sn_nsdl_ep_parameters_s **endpoint_structure);
Shage 0:e8d7be634e3c 21 void nsdl_init();
Shage 0:e8d7be634e3c 22 void nsdl_event_loop();
Shage 0:e8d7be634e3c 23
Shage 0:e8d7be634e3c 24 #endif // NSDL_SUPPORT_H