cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

C SDK thing name as identifier

dstoyanovsky
1-Visitor

C SDK thing name as identifier

I've encountered an issue with Thing identifiers in the context of C SDK. In one of Java SDK tutorials it is mentioned that when we use remote things we can associate it with thing using identifier, however C SDK does not have magic property 'identifier' like JAVA SDK's VirtualThing constructor does. Java SDK is supplied without sources, so no straight possibility to look inside and see what to do to get the same in C SDK.

Taking into account that my search how to convert thing name to identifier gave nothing, I guess it can be useful mentioning here that if you need to use thing name as 'identifier' (isIdentifier will be checked in the list of unbound things and then you will be able to associate thing with remote thing by identifier) you should add asterisk '*' before remote thing name in your C code.

NOTE: Understanding this I was able to find some places in the Edge SDK documentation where this is mentioned implicitly, nevertheless I can't find explicit explanation of asterisk before thing's name in association with identifier of unbound thing.

1 REPLY 1
dmoon
12-Amethyst
(To:dstoyanovsky)

If you want to use "identifier" in C sdk, you can simply add "*" in front of the thing name without space. For example, when you define a thing name in your code, do like 'char * thingName = "*SteamSensor1";'.

Announcements


Top Tags