tdGetNumberOfDevices

Moderator: Telldus

tdGetNumberOfDevices

Postby matson1111 » Tue Feb 22, 2011 8:10 pm

Is there a simple explanation the below doesn't work, tdGetNumberOfDevices returns -6 with or without the tdInit() call. I've configured 3 devices that can be toggled in TelldusCenter.
I'm running 10.6.6 and Xcode 3.2.5

// buildcommand: gcc foo.cpp -framework TelldusCore -arch i386 -lstdc++ -o thing

#include "TelldusCore/telldus-core.h"
#include <iostream>

int main()
{
tdInit();
std::cout << "There are " << tdGetNumberOfDevices() << " devices" << std::endl;

return 0;
}
matson1111
 
Posts: 13
Joined: Fri Feb 18, 2011 11:15 am

Re: tdGetNumberOfDevices

Postby micke.prag » Wed Feb 23, 2011 8:26 am

What version are you running?
-6 means TELLSTICK_ERROR_CONNECTING_SERVICE but isn't available in our stable series.

Have you compiled the framework by yourself?

About error codes, read the section "Error codes" here:
http://developer.telldus.se/doxygen/
Micke Prag
Software
Telldus Technologies
micke.prag
Site Admin
 
Posts: 2206
Joined: Thu Jul 27, 2006 8:25 pm
Location: Lund

Re: tdGetNumberOfDevices

Postby matson1111 » Wed Feb 23, 2011 8:45 am

micke.prag wrote:What version are you running?
-6 means TELLSTICK_ERROR_CONNECTING_SERVICE but isn't available in our stable series.

Have you compiled the framework by yourself?

About error codes, read the section "Error codes" here:
http://developer.telldus.se/doxygen/


I'm building against 2.0.4 in default framework location /Library/Frameworks. I realised what it means, looked in telldus-core.h. That's why I thought it was wierd.
I just tried adding a -F/Library/Frameworks to the build command, which gave the same result.
Why do you write that it isn't availiable in your stable series?
matson1111
 
Posts: 13
Joined: Fri Feb 18, 2011 11:15 am

Re: tdGetNumberOfDevices

Postby micke.prag » Wed Feb 23, 2011 9:56 am

That define isn't defined in 2.0.4. It was added later.

Do you have TELLSTICK_ERROR_CONNECTING_SERVICE defined in telldus-core.h?
Micke Prag
Software
Telldus Technologies
micke.prag
Site Admin
 
Posts: 2206
Joined: Thu Jul 27, 2006 8:25 pm
Location: Lund

Re: tdGetNumberOfDevices

Postby matson1111 » Wed Feb 23, 2011 10:13 am

micke.prag wrote:That define isn't defined in 2.0.4. It was added later.

Do you have TELLSTICK_ERROR_CONNECTING_SERVICE defined in telldus-core.h?



Ahh, sweet, now we are rock'n. The Current symlink in /Library/Frameworks/TelldusCore.frameworks/Versions pointed to a 2.0.103. I tried to build from source earlier so it must have been created. Can't remember if I installed the prebuilt TelldusCenter after that though.
Deleted /Library/Frameworks/TelldusCore.framework and reinstalled.

Thanx
matson1111
 
Posts: 13
Joined: Fri Feb 18, 2011 11:15 am


Return to Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests