Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Examples

service.h File Reference


Detailed Description

Header file for the Contiki service mechanism.

Author:
Adam Dunkels <adam@sics.se>

Definition in file service.h.

#include "contiki.h"

Go to the source code of this file.

Data Structures

struct  service

Service declaration and defition

#define SERVICE_INTERFACE(name, interface)
 Define the name and interface of a service.
#define SERVICE(name, service_name,)
 Define an implementation of a service interface.

Calling a service

#define SERVICE_CALL(service_name, function)
 Call a function from a specified service, if it is registered.

Service registration and removal

#define SERVICE_REGISTER(name)
 Register a service.
#define SERVICE_REMOVE(service_name)
 Remove a service.

Defines

#define SERVICE_EXISTS(service_name)   (service_find(service_name##_name) != NULL)
#define SERVICE_FIND(service_name)
 Find service.

Functions

void service_register (struct service *s)
void service_remove (struct service *s)
serviceservice_find (const char *name)


Define Documentation

#define SERVICE_CALL service_name,
function   ) 
 

Call a function from a specified service, if it is registered.

Parameters:
service_name The name of the service that is to be called.
function The function that is to be called. This is a full function call, including parameters.
Examples:
example-use-service.c.

Definition at line 148 of file service.h.

Referenced by tcpip_output().


Generated on Thu Jun 22 17:45:43 2006 for Contiki 2.x by  doxygen 1.4.4