PandorasAutomation SDK at GitHub

All about PB Automation and custom integration

Moderator: Moderator Group

PandorasAutomation SDK at GitHub

Postby Dennis Kuypers » Sun Nov 15, 2015 4:00 am

We are currently working on a new version of the Pandoras Box Automation SDK that will allow you to remotely control Pandoras Box using various languages (natively). This means that you are no longer bound to the PandorasAutomation.dll (which was Windows only). Another advantage is that we can push new features to you quicker. The code file version will tell you which Pandoras Box is required to use all features (third number in version number X.Y.pbrev)

I started out with a couple of scripting languages and next up is the documentation and a couple of statically typed languages

You can find the GitHub repositories at https://github.com/PandorasBoxSDK



If you like to contribute to the sources, please make sure that you head to https://github.com/PandorasBoxSDK/pbauto-generator and make your changes to the source files in the templates folder. This is because all the code files are generated from the pbauto-generator project, changing the actual code files doesn't help because the next time I generate files those changes would be void.

Questions? Requests? Feedback? Go ahead!

Regards
Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: PandorasAutomation SDK at GitHub

Postby florian » Mon Nov 16, 2015 9:23 am

wow!! a python interface for pandora?! wicked!
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA

Re: PandorasAutomation SDK at GitHub

Postby florian » Mon Nov 16, 2015 6:06 pm

this automatic interface library generator concept is reminiscent of google's protocol buffer library.

really cool idea. what other scripting environments do you think should be made with it?

also, this level of SDK expansion has to mean that interesting days are ahead for the WD. :)
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA

Re: PandorasAutomation SDK at GitHub

Postby Dennis Kuypers » Mon Nov 16, 2015 8:13 pm

Florian,

I think anything that consists of letters can be made with the generator. I only put the generator out so that people can access the templates if they only need minor changes. Then it is way easier just to make the changes to the template and then run the generator instead of doing Regex Wizardry.

It is currently not documented, but a library basically consists of 3 parts.
1. A Buffer that has all the readBool, read* and writeBool, write* functions. It should be able to convert that to big endian binary packaged data
2. A Connector that does the protocol related works. Currently PB supports HTTP, TCP and UDP. HTTP being the very basic one and TCP the more sophisticated/faster one
3. The generated functions that use the Buffer to build the message, use the Connector to send and recieve, use the Buffer again to parse the response

Anything in particular you are interested in? I'm currently doing C# & Docs when I get to have some spare time.

Regards
Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: PandorasAutomation SDK at GitHub

Postby florian » Mon Nov 16, 2015 8:45 pm

I was thinking that using the python interactive shell with the pbauto library loaded would basically give me that Pandora Command Line, I've been wishing for. :)

It would be handy if the autobuild script could provide you with an automatically generated synopsis of supported functions with their respective arguments, or just a neat list of the function declaration headings:

ie:
assignResourceByName(self, siteId, deviceId, resourcePath, parameterName, forMesh)
assignResourceToSelection(self, dmxFolderId, dmxFileId, forMesh)
...


it seems like the sort of hack you could get a build script to do (i don't know how to do it), so if it's easy... as it is, I know I can just go dig through pbauto.py and make my own docs.

thanks again!
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA

Re: PandorasAutomation SDK at GitHub

Postby Dennis Kuypers » Thu Jan 14, 2016 1:07 pm

Hey,

a quick update: I have added C# as a language and also added some documentation on the protocol itself. The repo is still not available, but if you drop an email to support we can send you an update.

Anyone up for testing? (C#, JS, python2/3)

Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: PandorasAutomation SDK at GitHub

Postby Dennis Kuypers » Mon Feb 22, 2016 6:01 pm

Update: Repositories are back up! (new url!)

Enjoy.
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: PandorasAutomation SDK at GitHub

Postby florian » Fri Apr 15, 2016 7:11 pm

Hi Dennis,

Not sure if this is the right place to discuss this, but...

I think I found a bug in the Python port of the SDK.

We were having issues with:

def set_param_double(self, site_id, device_id, parameter_name, parameter_value, do_silent, do_direct)

the values seem to be getting parsed wrong.

I traced the issue back to ByteUtil():

def write_double(self, val):
self.__data.extend(struct.pack('!d', val)) <--- this statement parses the bytes to a big-endian format

modifying the call to struct.pack to use 'd' formatting resolved the issue:

def write_double(self, val):
self.__data.extend(struct.pack('d', val))
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA

Re: PandorasAutomation SDK at GitHub

Postby Dennis Kuypers » Sat Apr 16, 2016 6:25 am

Hi Flo,

I'm not sure how this got through my testing but I fixed it, see:
https://github.com/PandorasBoxSDK/pbaut ... 2291ebe067

If you like you can fix it and push changes to the Pandoras Box generator OR file an issue at https://github.com/PandorasBoxSDK/pbauto-python/issues

Forum is fine though, maybe create a new topic.

Thanks for reporting!
Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: PandorasAutomation SDK at GitHub

Postby florian » Sat Apr 16, 2016 2:24 pm

Copy that, I'll try keeping issues on github, since that's what it's there for.

Thanks!
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA

Re: PandorasAutomation SDK at GitHub

Postby merCUrium » Mon Mar 26, 2018 2:39 pm

Hi,

thanks for this great source for cross-platform controll especially the python-bindings opens up some quite nice project possibilities with RaspberryPi etc.

Would it be possible to createa c++ library?

I have a project in mind where I would like to use arduino/teensy to read position-data of kinectic stage elements via CAN-Bus or SPI to directly manipulate layer values e.g Position, Rotation, Quad-mask-Corners etc.
There are two main reasons why I would like to avoid using WD for this are a) to keep the WD-Performance available for other tasks and b) (probably more important) to keep the PB-System and the Drawbar/Stage-kinectic System (Theta Automation) as strictly separated as possbile, which means we will read the raw inputstream of the controll-interface (up to 130 measured axis) so we don't need to call into the controll-software and this way avoid any system failure on their side which could easily lead to fatal consequences.

In general this probably would be possible with python I think, but probbably (or obivously?) c++ would be performing way better. And I guess a conversion to pure C would be to tough since the lib relies to heavy on classes.

PS: sorry if my question resolves to be stupid, since I'm not really an educated developer, but just some one who hacks his way into projects till they do what I want them to do. Or leave the project behind if it proves to be to hard :P
merCUrium
 
Posts: 20
Joined: Wed Nov 04, 2009 8:17 am
Location: Munich

Re: PandorasAutomation SDK at GitHub

Postby florian » Sat Jul 20, 2019 12:24 am

Hi Dennis,

It looks like the code on github hasn’t been updated in a while. is it worthwhile to do a rebuild from the current sdk revision?
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA


Return to Integration of 3rd party applications (SDK)

Who is online

Users browsing this forum: No registered users and 1 guest