Indigresso Wiki

Open Source Stuff for DASH7

User Tools

Site Tools


ALP APIs (OTlib)

OpenTag implements an API that is designed to give the user the ability to work with DASH7 networking. For more information about the API and how to use it, check the API article linked about. This article describes the implementation of the API in OTlib.

ALPs Used in the API

The ALPs below are all API-like in that they map to functions in OTlib

OpenTag-specific APIs
ALP ID Description
0x03 Logger API
0x80 Session API (Session Module Functions)
0x81 System API (Kernel/MAC Functions)
0x82 Query API (M2QP/Transport Functions)
DASH7-specific APIs
ALP ID Description
0x00 Null ALP
0x01 Filedata ALP
0x02 Sensor ALP
0x1X Crypto-Security ALPs

Implementation Notes

OpenTag follows a client-server architecture and the roles of client and server ALP APIs are mirror images of each other. The Server ALP implementation must parse/process incoming ALP messages, take the corresponding actions, and then respond using some valid return data specified in the ALP. The Client ALP implementation is basically a sandboxed, function-based implementation of OTAPI, where the function calls are converted into ALP messages and sent to the server to be parsed. Therefore, an OTAPI function call on a client gets converted into a message that gets re-converted to an OTAPI function call on a server.

Client Implementation
The Client ALP API is implemented via OTAPI.h, alp.h, and alp_api_client.c. Typically, MPipe and NDEF are also needed to push the message onto the server, although technically a client and a server could be implemented on the same device as two processes. In this case, any interprocess pipe do the work of the MPipe.

Server Implentation
The Server ALP API requires all of the alp… files in OTlib/ to be present and compiled. If the server build is configured not to use one or more optional ALPs (via the Application configuration), there are preprocessor conditionals in the alp…c files that will prevent that code from being built. Therefore, it is best to put all of the alp…c files into you makefile or project and to use the application configuration to select which ones get built.


opentag/otlib/alp_api.txt · Last modified: 2012/03/26 18:21 by jpnorair