1 # Application Framework - Service Template
5 Duplicate directory and adjust names. In particular, replace 'xxxxxx' by a proper service name.
7 * adjust CMakeLists.txt (project name and version)
8 * ajdust config.xml (description, author, license...)
9 * rename xxxxxx-service-binding.c to something meaningful
10 * store icon file in icons directory and update the variable PROJECT_ICON in CMakeLists.txt
25 Copy the .wgt file on the target through ssh and install it (adjust BOARDIP to your real IP address):
29 $ scp xxxxxx-service.wgt root@$BOARDIP:/tmp
31 # afm-util install /tmp/xxxxxx-service.wgt
35 ## Run service manually
40 # afm-util start xxxxxx-server@0.1
41 # ps -ef| grep afb-daemon | grep xxx
47 # PORT=12345 # adjust the port depending in on afb-daemon instance: use ps -ef to check
48 # curl -v http://localhost:$PORT/api/xxxxxx/ping
50 * Connected to localhost (127.0.0.1) port 5555 (#0)
51 > GET /api/xxxxxx/ping HTTP/1.1
52 > Host: localhost:5555
53 > User-Agent: curl/7.44.0
57 < Connection: Keep-Alive
59 < Set-Cookie: x-afb-uuid-5555=30ab9573-cbc8-43f7-b385-0186feebc69a; Path=/api; Max-Age=3600; HttpOnly
60 < Date: Sun, 10 Jul 2016 00:09:14 GMT
62 * Connection #0 to host localhost left intact
63 {"response":"Some String","jtype":"afb-reply","request":{"status":"success","info":"Ping Binder Daemon tag=pingSample count=1 query={ }","uuid":"30ab9573-cbc8-43f7-b385-0186feebc69a"}}root@porter:~#