User Tools

Site Tools


plugins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
plugins [2018/08/11 15:22] – update for APIv2 James Sentmanplugins [2018/08/11 15:37] – added language support info James Sentman
Line 5: Line 5:
 \\ \\
  
-Introduced in XTension version 9.3 you can now create new plugins for otherwise unsupported devices using Python. The plugins run as separate processes and communicate to XTension through a TCP socket. All direct communications and parsing of XTension packets are handled by the plugin include files so you don’t have to handle any of that. You can send commands to XTension to control units, update data or displays and the plugin classes provide events you can use to receive commands or be alerted to other changes to information. Since the plugin runs as a separate process from XTension you can use any combination of blocking or threaded operations without worrying about blocking the host appIf you perform a blocking action in response to a received command from XTension that should be bumped out to a separate thread to await it’s return. XTension will regularly send a ping to your interface that needs to be returned or it will recycle your interface thinking it had hung up. You should not block in any event received from XTension.+Introduced in XTension version 9.3 you can now create new plugins for otherwise unsupported devices using Python. The plugins run as separate processes and communicate to XTension through a TCP socket. All direct communications and parsing of XTension packets are handled by the plugin include files so you don’t have to handle any of that. You can send commands to XTension to control units, update data or displays and the plugin classes provide events you can use to receive commands or be alerted to other changes to information. 
 + 
 +====Language Support==== 
 +At this moment I have plugin connectors for Python and for [[http://xojo.com/|Xojo]]. All examples on this site are using python 2.7. I also have an alpha level build of the connectors for NodeJS though that is problematic due to the necessity of also having node js installed on the Mac in questionIt may be an option if no python or other libraries are available for performing whatever you need to do. I have also documented the raw [[plugins:rawprotocol|XTension Interapplication Communications Protocol]] given that it should be possible to implement that in any modern language and provide a plugin in C++, Lua, PHP or whatever you prefer. Contact me if you wish the Xojo examples or want to discuss the implementation of a different language.
  
  
Line 39: Line 42:
  
 The XTension interface to managing plugins is a work in progress, there is no way as of 9.4.8 to check plugins for available updates or to install or remove them. To remove a plugin select “Reveal Plugins Folder In This Database” from the Database menu and the database bundle will be opened and the Plugins folder within it highlighted. Drag the plugin you wish to remove out of that folder to the trash. Then delete any configured instances of that plugin. The XTension interface to managing plugins is a work in progress, there is no way as of 9.4.8 to check plugins for available updates or to install or remove them. To remove a plugin select “Reveal Plugins Folder In This Database” from the Database menu and the database bundle will be opened and the Plugins folder within it highlighted. Drag the plugin you wish to remove out of that folder to the trash. Then delete any configured instances of that plugin.
 +
 +===Blocking and Non-Blocking Plugins===
 +Since the plugin runs as a separate process from XTension you can use any combination of blocking or threaded operations without worrying about blocking the host app. If you perform a blocking action in response to a received command from XTension that should be bumped out to a separate thread to await it’s return. XTension will regularly send a ping to your interface that needs to be returned or it will recycle your interface thinking it had hung up. You should not block in any event received from XTension.
  
  
 NEXT: [[plugins:01_files|]] NEXT: [[plugins:01_files|]]