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]
136 -h: print this message
137 -i: info about current settings
139 -d: daemonize AudioManager
140 -p<path> path for sqlite database (default is in memory)
141 -t<port> port for telnetconnection
142 -m<max> number of max telnetconnections
143 -c<Name> use controllerPlugin <Name> (full path with .so ending)
144 -l<Name> replace command plugin directory with <Name> (full path)
145 -r<Name> replace routing plugin directory with <Name> (full path)
146 -L<Name> add command plugin directory with <Name> (full path)
147 -R<Name> add routing plugin directory with <Name> (full path)
150 ***********************************************************************************************************
152 ***********************************************************************************************************
153 The audiomanager has a build- in telnetserver that serves for debuggin purposes.
154 If you compile your AudioManager with TelnetServer support (cmake -DWITH_TELNET=ON), you will be able to
155 set with commandline argument -t the port number and with -m the maximum supported connections.
156 The default telnet port is 6060.
158 For example, launch a telnet session on port 6060:
159 telnet localhost 6060
161 #>Welcome to GENIVI AudioManager ver-0.0.1-37-ga004215
164 press 'help' to get a list of all supported commands on this level:
167 ####################################################
168 ####### The following commands are supported: ######
169 ####################################################
171 #exit - quit telnet session
172 #get - Go into 'get'-submenu
173 #help - show all possible commands
174 #info - Go into 'info'-submenu
175 #list - Go into 'list'-submenu
176 #set - Go into 'set'-submenu
180 Now type one of these commands, for example 'get', followed with another 'help' to get a list of supported commands:
185 ####################################################
186 ####### The following commands are supported: ######
187 ####################################################
189 #.. - one step back in menu tree (back to root folder)
190 #exit - close telnet session
191 #help - show all possible commands
192 #recv - show receiverversion
193 #routing - show current routing
194 #sendv - show senderversion
198 You can also execute several commands in a line:
200 #\Get>recv sendv .. help exit
202 # Ctrl: 1 | Cmd: 1 | Routing: 1
204 # Ctrl: 1 | Cmd: 1 | Routing: 1
205 ####################################################
206 ######## The following commands are supported: ######
207 ####################################################
209 #exit - quit telnet session
210 #get - Go into 'get'-submenu
211 #help - show all possible commands
212 #info - Go into 'info'-submenu
213 #list - Go into 'list'-submenu
214 #set - Go into 'set'-submenu
216 #Your wish is my command ... bye!
217 #Connection closed by foreign host.
220 ***********************************************************************************************************
222 ***********************************************************************************************************
223 The source code if formatted with eclipse, the style sheet used can be found in the cmake folder:
224 cmake/AudioManager_Codestyle.xml
226 ***********************************************************************************************************
227 Working on the code & contribution
228 ***********************************************************************************************************
229 First get the code from the git:
230 git clone https://<kavi-account>:<kavi-password>@git.genivi.org/srv/git/AudioManager
232 Get an overview of all branches:
235 Switch to the branch you want to work on (see versioning schmeme, the master is the feature branch)
236 and verify that it has switched (* changed)
237 git checkout <your branch>
240 Best practice is to create a local branch based on the current branch:
241 git branch working_branch
243 Start working, best practice is to commit smaller, compilable peaced during the work that makes it easier to
246 If you want to commit you changes, send them to the audiomanager-dev list, you can create a patch like this:
247 git format-patch working_branch <your branch>
249 This creates a set of patches that are published via the mailing list (this is already the submission under CLA).
250 The patches will be discussed and then merged & uploaded on the git. For more information about git checkout the
251 Genivi wiki and the stuff on the web.
256 __.--'`._/_\j_____/_||___\ `----.
257 _.--'_____ | \ _____ /
258 _j /,---.\ | =o | /,---.\ |_
259 [__]==// .-. \\==`===========/==// .-. \\=[__]
260 `-._|\ `-' /|___\_________/___|\ `-' /|_.'