problems about thin client

asked 2014-04-08 00:04:09 -0700

zhengkun gravatar image
  1. I use Arduino Due as the thin client and want to add the functions ProperStore , About service to it. So I add PropertyStore and About files in Arduino\libraries\Alljoyn(this is compiled about the thin client according to the guiding document ),but as you know, the library in Arduino is written in C++, so I rename propertystore.c to propertystore.cpp. There appears errors thich I have mentioned in another post: "Hi, I think I have found an error in PropertyStore.c (sample_apps\tcl\AppsCommon\src) on line 106 and 107, because you can't specify an int value to an enumeration type directly, and executive a "+ +" operation ." Yeah, it's no problem in C, but with Arduino compiler, how can I do if I want to add the functions ProperStore and About service to it?
  2. As we all know , there are samples about thin client, as AJ_signal_service ,AJ_signalConsumer_client . But there is no AJSC In parallel, how can I execute them ?
  3. Except Arduino , what other things can I regard as thin client and be supported by alljoyn?
edit retag flag offensive close merge delete


Hi zhengkun, could you please show me how to find the PropertyStore.c module? Thanks a lot!

congtam ( 2014-10-01 01:12:10 -0700 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-04-10 19:43:11 -0700

taolin gravatar image

this is OK to change .c to .cpp for Arduino platform, it seems that Arduino compiler is more strict, you have to change the enum type to int type to executive "++" operation, following code is F.Y.I.

AJSVC_PropertyStoreFieldIndices AJSVC_PropertyStore_GetFieldIndex(const char* fieldName) { int fieldIndex = 0; for (; fieldIndex < AJSVC_PROPERTY_STORE_NUMBER_OF_KEYS; fieldIndex++) { if (!strcmp(propertyStoreProperties[fieldIndex].keyName, fieldName)) { return (AJSVC_PropertyStoreFieldIndices )fieldIndex; } } return AJSVC_PROPERTY_STORE_ERROR_FIELD_INDEX; }

AJSC have signal_service.cc and signalConsumer_client.cc which are same sample as AJ_signal_service ,AJ_signalConsumer_client in thin client.


edit flag offensive delete publish link more


Hi Tao, Thank you for your reply. What I mean in question 2 is that AJ_signal_service (thin client on Arduino) can communicate with signalConsumer_client.exe(standard client on windows platform)? I have tried that they can't communicate .Can you provide more samples between thin client and standard client ?

zhengkun ( 2014-04-10 20:50:58 -0700 )edit

Zhangkun, alljoyn device can't tell peer use standard aljoyn or thin client alljoyn, if they have same interface, service name, service path and service path, they will communitate each other. I notice that signal related sample have the exact same alljoyn parameter: static const char InterfaceName[] = "org.alljoyn.Bus.signal_sample"; static const char ServiceName[] = "org.alljoyn.Bus.signal_sample"; static const char ServicePath[] = "/"; static const uint16_t ServicePort = 25; so AJ_singal_service should work with signalConsumer_client. have you ever run basic_service and basic_client on DUE and PC? Tao

taolin ( 2014-04-24 20:07:08 -0700 )edit

Hi Tao, I'm dealing with the same problem like ZhengKun. In my PropertyStore.cpp module, I have the error "No match operator++ in "fieldIndex++" at the line: for (int fieldIndex = 0; fieldIndex < AJSVC_PROPERTY_STORE_NUMBER_OF_KEYS; fieldIndex++) Although I change the type of fieldIndex to Int: // AJSVC_PropertyStoreFieldIndices fieldIndex = 0; int fieldIndex = 0; Do we have to define the values for bs I couldn't find their values in the library: AJSVC_PROPERTY_STORE_ERROR_FIELD_INDEX = -1, AJSVC_PROPERTY_STORE_DEVICE_ID, AJSVC_PROPERTY_STORE_APP_ID, AJSVC_PROPERTY_STORE_DEVICE_NAME, AJSVC_PROPERTY_STORE_NUMBER_OF_RUNTIME_KEYS, AJSVC_PROPERTY_STORE_DEFAULT_LANGUAGE = AJSVC_PROPERTY_STORE_NUMBER_OF_RUNTIME_KEYS, AJSVC_PROPERTY_STORE_APP_NAME, AJSVC_PROPERTY_STORE_DEFAULT_LANGUAGE, AJSVC_PROPERTY_STORE_PASSCODE, AJSVC_PROPERTY_STORE_REALM_NAME, AJSVC_PROPERTY_STORE_NUMBER_OF_RUNTIME_KEYS, Thanks a lot,

congtam ( 2014-10-06 08:06:53 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-04-08 00:04:09 -0700

Seen: 228 times

Last updated: Apr 10 '14