1 ***********************************************************************************************************
3 ***********************************************************************************************************
5 Copyright (C) 2012, GENIVI Alliance, Inc.
6 Copyright (C) 2012, BMW AG
8 This file is part of GENIVI Project AudioManager.
10 Contributions are licensed to the GENIVI Alliance under one or more
11 Contribution License Agreements.
14 This Source Code Form is subject to the terms of the
15 Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
16 this file, You can obtain one at http://mozilla.org/MPL/2.0/.
18 author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
20 For further information see http://www.genivi.org/.
22 ***********************************************************************************************************
24 ***********************************************************************************************************
25 The licenses of this project are split into two parts:
26 1) the AudioManagerDaemon, licensed under MPL 2.0
27 2) all other parts that serve as example code that can be taken to build up an own project with it -
28 these parts are licensed with the MIT license
30 Contribution is done under GENIVI CLA.
32 ***********************************************************************************************************
34 ***********************************************************************************************************
35 The current version can be taken out of the git. The version 1.0.0 is the first GENIVI compliant code,
36 in the compliance statement of discovery (2.0)
38 ***********************************************************************************************************
40 ***********************************************************************************************************
41 - compile options with default values:
44 CMAKE_INSTALL_PREFIX /usr/local
45 GLIB_DBUS_TYPES_TOLERANT ON
49 WITH_DOCUMENTATION OFF
51 WITH_PLUGIN_COMMAND ON
52 WITH_PLUGIN_CONTROL ON
53 WITH_PLUGIN_ROUTING ON
59 In order to change these options, you can modify this values with ccmake, do the appropriate changes in
60 CmakeList.txt or via the commandline for cmake or (when installed via ccmake)
62 You will need some packages in order to comile the GENIVI AudioManager Daemon, these are:
63 -dbus (only when DBUS_WRAPPER==ON) [tested on version 1.2.16]
64 -sqlite3 [tested on version 3.6.22]
65 -automotive-dlt [greater 2.5.0]
66 -doxygen (only when WITH_DOCUMENTATION==ON) [tested on version 1.6.3]
68 to install them in a build environment like Ubuntu you can use:
69 sudo apt-get install libdbus-1-dev libsqlite3-dev doxygen git cmake build-essential
71 For building the tests, you will need the following packages:
72 -google mock [tested on version 1.6.0-1]
73 -google test [tested on version 1.6.0]
74 -python [tested on version 2.6]
76 to install them in a build environment like Ubuntu you can use:
77 sudo apt-get install libgtest-dev google-mock python2.6-dev
79 More details in the CMake Files CmakeList.txt in the projects.
81 The build was tested on a freshly setup LinuxMint 12 (don't like Unity) with the following steps:
84 sudo apt-get install libdbus-1-dev libsqlite3-dev doxygen libgtest-dev google-mock git cmake
85 build-essential python2.6-dev
87 git clone https://<kavi-account>:<kavi-password>@git.genivi.org/srv/git/AudioManager
89 In order to build the project (out of source build), please follow these instructions on the commandline:
96 after the script finished, you should have:
98 a bin/ folder which contains all executables and the libraries:
99 a build/ folder which has all build objects (erase that if you need a clean build)
100 a doc/ folder in case you turned the documentation on
102 in order to install the AudioManager, you can do
106 package generation is supported via CPack. To build packages, you have to
110 this will create one package if your CMake version is < 2.8.5 (all binaries stripped):
112 AudioManager-<git verison>-Linux.deb
114 if your version is above, you will get 4 packages (all binaries stripped) :
116 AudioManager-<git verison>-Linux-bin.deb [AudioManager binary]
117 AudioManager-<git verison>-Linux-dev.deb [header files needed to compile plugins]
118 AudioManager-<git verison>-Linux-sampleplugins.deb [sample plugins]
119 AudioManager-<git verison>-Linux-tests.deb [tests including tests for sample plugins,
120 installed in the ~/AudioMAnagerTests]
122 to create a tar.gz file of all sources (not including .git, build and bin folder,config files), you can do:
126 This will create the following package:
128 AudioManager-<git verison>-Source.tar.gz
130 All packages will be placed in a folder called packages
132 The commandline options of the AudioManager:
134 Usage: AudioManagerDaemon [options]
137 -h: print this message
138 -i: info about current settings
140 -V: print DLT logs to stdout
141 -d: daemonize AudioManager
142 -T: DbusType to be used by CAmDbusWrapper (0=DBUS_SESSION[default], 1=DBUS_SYSTEM)
143 -p<path> path for sqlite database (default is in memory)
144 -t<port> port for telnetconnection
145 -m<max> number of max telnetconnections
146 -c<Name> use controllerPlugin <Name> (full path with .so ending)
147 -l<Name> replace command plugin directory with <Name> (full path)
148 -r<Name> replace routing plugin directory with <Name> (full path)
149 -L<Name> add command plugin directory with <Name> (full path)
150 -R<Name> add routing plugin directory with <Name> (full path)
153 ***********************************************************************************************************
155 ***********************************************************************************************************
156 The audiomanager has a build- in telnetserver that serves for debuggin purposes.
157 If you compile your AudioManager with TelnetServer support (cmake -DWITH_TELNET=ON), you will be able to
158 set with commandline argument -t the port number and with -m the maximum supported connections.
159 The default telnet port is 6060.
161 For example, launch a telnet session on port 6060:
162 telnet localhost 6060
164 #>Welcome to GENIVI AudioManager ver-0.0.1-37-ga004215
167 press 'help' to get a list of all supported commands on this level:
170 ####################################################
171 ####### The following commands are supported: ######
172 ####################################################
174 #exit - quit telnet session
175 #get - Go into 'get'-submenu
176 #help - show all possible commands
177 #info - Go into 'info'-submenu
178 #list - Go into 'list'-submenu
179 #set - Go into 'set'-submenu
183 Now type one of these commands, for example 'get', followed with another 'help' to get a list of supported commands:
188 ####################################################
189 ####### The following commands are supported: ######
190 ####################################################
192 #.. - one step back in menu tree (back to root folder)
193 #exit - close telnet session
194 #help - show all possible commands
195 #recv - show receiverversion
196 #routing - show current routing
197 #sendv - show senderversion
201 You can also execute several commands in a line:
203 #\Get>recv sendv .. help exit
205 # Ctrl: 1 | Cmd: 1 | Routing: 1
207 # Ctrl: 1 | Cmd: 1 | Routing: 1
208 ####################################################
209 ######## The following commands are supported: ######
210 ####################################################
212 #exit - quit telnet session
213 #get - Go into 'get'-submenu
214 #help - show all possible commands
215 #info - Go into 'info'-submenu
216 #list - Go into 'list'-submenu
217 #set - Go into 'set'-submenu
219 #Your wish is my command ... bye!
220 #Connection closed by foreign host.
223 ***********************************************************************************************************
225 ***********************************************************************************************************
226 The source code if formatted with eclipse, the style sheet used can be found in the cmake folder:
227 cmake/AudioManager_Codestyle.xml
229 ***********************************************************************************************************
230 Working on the code & contribution
231 ***********************************************************************************************************
232 First get the code from the git:
233 git clone https://<kavi-account>:<kavi-password>@git.genivi.org/srv/git/AudioManager
235 Get an overview of all branches:
238 Switch to the branch you want to work on (see versioning schmeme, the master is the feature branch)
239 and verify that it has switched (* changed)
240 git checkout <your branch>
243 Best practice is to create a local branch based on the current branch:
244 git branch working_branch
246 Start working, best practice is to commit smaller, compilable peaced during the work that makes it easier to
249 If you want to commit you changes, send them to the audiomanager-dev list, you can create a patch like this:
250 git format-patch working_branch <your branch>
252 This creates a set of patches that are published via the mailing list (this is already the submission under CLA).
253 The patches will be discussed and then merged & uploaded on the git. For more information about git checkout the
254 Genivi wiki and the stuff on the web.
259 __.--'`._/_\j_____/_||___\ `----.
260 _.--'_____ | \ _____ /
261 _j /,---.\ | =o | /,---.\ |_
262 [__]==// .-. \\==`===========/==// .-. \\=[__]
263 `-._|\ `-' /|___\_________/___|\ `-' /|_.'