Getting Started

If you want to build an E1.17 application uisng DMP on top of SDT using IP version 4 then your best place to start is with the sample applications in the demo directory.

Summary
Getting StartedIf you want to build an E1.17 application uisng DMP on top of SDT using IP version 4 then your best place to start is with the sample applications in the demo directory.
Building
Configuration
DependenciesAcacian has been built on a number of Linux systems using GCC and Gnu Make.
Running
SLPThe demo device and controller use OpenSLP which is available as an option on most Linux distributions.
environment
DDL SupportAll DMP messages relate to property addresses.

Building

Configuration

Configuration file acncfg_local.h

You need to create your own version of acncfg_local.h which contains some basic choices including:

  • A single component or a multi-component application (CF_MULTI_COMPONENT).  A single component application can omit a significant amount of code which tracks multiple local components.
  • Whether your component(s) is a device (CF_DMPCOMP__D) a controller (CF_DMPCOMP_C_) or both (CF_DMPCOMP_CD).  The DMP code for each can be quite different.

The other configuration you will probably want to play around with while developing code is logging.  The default is to log notice and worse messages to standard error.  You will likely want to set this to debug for some module s and you may also want to turn on function entry and exit logging initially though this is very verbose.  See CF_LOGLEVEL and CF_LOGFUNCS.

If your application is a straightforward DMP controller or device (or both) most of the default configuration choices are likely OK but all choices are are documented in acncfg.h.

Dependencies

C and C Libraries

Acacian has been built on a number of Linux systems using GCC and Gnu Make.  It tries to use standard ANSI C99 or to mark deviations from this with #ifdef __GNUC__.  It uses fairly standard ANSI or POSIX C library calls and BSD Sockets interface and should compile with minor changes against most good standard C Libraries.

Expat

The Acacian DDL Parser is built on top of the expat streaming parser.  Expat is widely available and versatile.  It is available as a full featured library in most Linux distros, but for small embedded systems it is quite easy to download the source and compile it diectly into your application.  The relevant demo Makefiles allows either option.

Service Location Protocol

ACN specifies Service Location Protocol for discovery.  See SLP below.

Running

SLP

The demo device and controller use OpenSLP which is available as an option on most Linux distributions.  Unfortnately the rules of ACN effectively force every component to implement a service agent (controllers would not normally expect to do so) and this in turn means the SLP Daemon needs to be running.

Code in discovery.c is available to create the necessary service URL and attribute advertisement strings from the information in a Local omponent structure.  For service agents all that is needed is to call a few simple functions in the OpenSLP library.

environment

DDL_PATHA directory search list (directories separated by ‘:’) used by the resolver to search for DDL files.  If not set then the default directory $HOME/.acacian/ddlcache is searched.

DDL Support

All DMP messages relate to property addresses.  Applications, whether devices or controllers need to map these to and from their own property structures.  Acacian’s DMP code does this using address map structures (see addrmap_u and Address search structures) which are optimized for looking up addresses in incoming messages and resolving them to DMP property strustures.  The addrmap_s for any device, whether a local one you are implementing or a remote one you are accessing, is built from its DDL description.

DMP Device

A DMP device which exposes properties and receives GET PROPERTY and SET PROPERTY messages should have its address map compiled into the code.  To do this the utility mapgen is available which uses the Acacian DDL parser on the host system to generate a C cource file.  Thus you need to create the DDL description of your device as part of writing its code.  Building the internal address map in this way ensures that the map and properties used by the device agree with the description served to controllers.  The Makefile for device_demo contains rukes for building the mapgen utility.

An extension to DDL (<propext>) allows additional fields and functions which have local meaning only to your own code to be incorporated into the DMP property structures.  (The extension elements have their own XML namespace so if you do not strip them out before distributing the DDL to a controller, a DDL conformant parser should simply ignore them).

DMP Controller

A generic DMP controller must parse DDL dynamically to create the address maps it needs for devices it encounters.  The Acacian DDL parser can efficiently generate maps on-the-fly from discovery information.

One or many components?
Build DMP device code only
Build DMP controller code only
Build combined device and controller code
determine what level of messages are logged.
Log function entry and exit
The demo device and controller use OpenSLP which is available as an option on most Linux distributions.
Utilities for SLP (Service Location Protocol) as specified in epi19
an address map, type specified by maptype_e.
Address search maps may be of different types.
Close