In general, a HomePort installation consists of the HomePort library, one or more adapters and applications, and a main program that combines everything into one executable.
Adapter: A module that provides a connection to one or more devices.
Application: A module that utilises this data, typically by providing an interface to a cloud.
Public header files
The header files provided by HomePort (excluding the common utilities) are structured in the following way:
Their purpose:
hpd_types.h: Only type definitions, can be used in header files to obtain the types without the functions.
hpd_shared_api.h: Functionality shared between adapters and applications, used in libraries that may be used for both.
hpd_adapter_api.h: Adapter functionality, should only be included by adapters.
hpd_application_api.h: Application functionality, should only be included by applications.
hpd_daemon_api.h: Daemon functionality, should only be included in file defining main().
hpd_api.h: Everything in one file for the lazy, sometimes used inside HomePort when it is not possible to separate between adapter and application functionality.
Use cases covered by the API
Actors involved:
Configurator: Collects a set of modules into an executable file with a main function.
In addition, the adapter developer may need to browse the models provided by the adapter, when communicating with the underlying network (as they can store data within these models) [Shared API (Adapters and Applications) - Part II].