Skip to main content
1-Visitor
December 2, 2015
Question

How do I Bind multiple things from C SDK

  • December 2, 2015
  • 1 reply
  • 2056 views

Hi,

I am developing TW agent using C SDK which will collect data from multiple assets connected to gateway. Each asset is different. Hence I want to treat it as separate thing. Now agent initializes, I can register each different thing and its properties separately. Can I then call twApi_BindThing for each different thing e.g. twApi_BindThing(thing1), twApi_BindThing(thing2) etc and then call twApi_Connect(CONNECT_TIMEOUT, twcfg.connect_retries); to connect to the server. I assume that each thing will shown as connected on Server. This sort of functionality is possible in ready EMS server. But I want to do it similarly using C SDK.

Please confirm above approach is correct OR suggest solution if wrong.

Thanks

Regards

Satish

1 reply

5-Regular Member
December 7, 2015

Hello Satish,

What you described is the correct approach.  Call twApi_BindThing() once for each thing you want to register.

-Mike