All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Write Components

Legato Components

Software components are collections of functionally related software that communicate with other components via well-defined interfaces. See Component-based Approach for more background on component-based software.

In the Legato framework, each component is kept in its own directory and must contain a file called Component.cdef that describes its contents. The name of the directory is the name that is used to refer to the component when including it in executables and applications.

Components can be implemented in any supported programming language.

Note
Only C is supported right now.

Components built using a compiled language, like C or Java, get built into libraries that can be placed into executables. Source files for interpreted languages don't get compiled, but can also be placed into executables, in which case, the appropriate interpreter also gets included in the executable.

When multiple components written in the same programming language get included in the same executable together, they can call each other's exported API functions, just as one library can call another library's API functions in a normal program.

But if a language-independent IPC approach to component-based development is followed, interfaces can be implemented in one language and used in another. This opens up opportunities for code reuse from projects written in different languages, and frees developers to use the language best suited for a given task.

But even when an entire project is written in the same language, using language-independent IPC makes the component inherently more reusable, creates opportunities for function isolation in different processes or different application sandboxes, and automatically creates debugging trace points.

What's Next?

Other component writing topics:

Create a Basic Component
Hello IPC
Components Into Apps
Multi Component Executables

Or move to the next level:

Definition Files
Services
C APIs


Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.