Protected global variables with mutex; minor optimizations; corrected doxygen documen...
[profile/ivi/persistence-client-library.git] / README
1 ----------------------------
2 Environment
3 ----------------------------
4 The Persistence Client Library has been developed using Ubuntu 11.10
5 Required packages
6
7 - automotive-dlt: available via GENIVI projects
8 - Itzam/C: download from http://www.coyotegulch.com/products/itzam/c/index.html
9      In order to work with the PCL package config replace in the Itzam/C configure.ac GENERIC_LIBRARY_NAME=libitzam with GENERIC_LIBRARY_NAME=itzam
10      copy itzam package confiuration file libitzam.pc into folder /usr/local/lib/pkgconfig
11      There is an error like: "aclocal: couldn't open directory `m4': No such file or directory" just create the 'm4' directory
12      Autotools will also complain that COPYING, NEWS, README and AUTHORS file is missing, just create also these files
13 -dbus-1: install via Synaptic Package Manger or use apt-get
14 - autotools: install via Synaptic Package Manger or use apt-get
15 - libtool: install via Synaptic Package Manger or use apt-get
16 - GNU c compiler: install via Synaptic Package Manger or use apt-get
17
18 ----------------------------
19 Documentation
20 ----------------------------
21 http://projects.genivi.org/persistence-client-library/documentation
22
23 ----------------------------
24 How to compile
25 ----------------------------
26 For the Persistence Client Library autotools will be used to generate makefiles.
27 To build the client library perform the following steps:
28
29     "autoreconf -vi"
30     "./configure --enable-test"
31         --enable-test will be needed to enable the building of the test code
32     "make"
33
34
35 ----------------------------
36 How to run
37 ----------------------------
38
39 - Simulation of required dbus interfaces
40 The PCL requires to communicate with the lifcycle and the persistence administration service dbus interface.
41 As this components may not yet available on you platform the PCL brings to mockup applications simulation this two interfaces.
42 The two applications are located in the test folder:
43
44     persistence_lifeCycle_mockup
45     persistence_admin_service_mockup
46
47 You need to register the admin service and the lifecycle dbus interface.
48 for this just copy the service files (org.genivi.NodeStateManager.conf and org.genivi.persistence.admin.conf) into /ets/dbus-1/system.d/ folder.
49
50 The Lifecycle service file can be found in the NodeStateManager gir repo the folder /NodeStateManager/config/.
51 For the Pers Admin Service the following service file can be used.
52
53 - Run the test application
54 After building the client library and the test code the test data needs to be copied to the appropriate place.
55 The test data is located in the test subdirectory test/data/Data.tar.gz and needs be extracted to the root/Data folder.
56 The data structure must look like similar like this, section Data organization.
57
58
59 Now run the test application ./persistence_client_library_test.
60 The output should look like the following:
61 100%: Checks: 10, Failures: 0, Errors: 0
62 persistence_client_library_test.c:85:P:GetData:test_GetData:0: Passed
63 persistence_client_library_test.c:206:P:SetData:test_SetData:0: Passed
64 persistence_client_library_test.c:236:P:SetDataNoPRCT:test_SetDataNoPRCT:0: Passed
65 persistence_client_library_test.c:252:P:GetDataSize:test_GetDataSize:0: Passed
66 persistence_client_library_test.c:274:P:DeleteData:test_DeleteData:0: Passed
67 persistence_client_library_test.c:148:P:GetDataHandle:test_GetDataHandle:0: Passed
68 persistence_client_library_test.c:396:P:DataHandle:test_DataHandle:0: Passed
69 persistence_client_library_test.c:462:P:DataHandleOpen:test_DataHandleOpen:0: Passed
70 persistence_client_library_test.c:360:P:DataFile:test_DataFile:0: Passed
71 persistence_client_library_test.c:528:P:Cursor:test_Cursor:0: Passed
72
73
74 If there are also some error messages like:
75 process 19908: arguments to dbus_message_get_args() were incorrect, assertion "message != NULL" failed in file ../../dbus/dbus-message.c line 1848.
76 This is normally a bug in some application using the D-Bus library.
77
78 This is OK unless lifecycle management and the persistence administration service are not running.
79 The persistence client library registers to lifecycle management and the persistence administration service.
80 If the components are not available and do not respond to the dbus register message, the error message above will be created.
81
82
83 ----------------------------
84 How to create doxygen documentation
85 ----------------------------
86
87 The doxygen package must be installed.
88 run "doxygen doc/pcl_doxyfile" and the html documentation will be generated in the doc folder. 
89
90
91
92