PropellerManager Class Reference

The PropellerManager class provides an abstraction layer between PropellerSession and PropellerDevice instances. More...

#include <PropellerManager>

Inherits QObject.

Signals

void portListChanged ()
 

Public Member Functions

 PropellerManager (QObject *parent=0)
 
 ~PropellerManager ()
 
const QStringList & listPorts ()
 
void enablePortMonitor (bool enabled)
 

Detailed Description

The PropellerManager class provides an abstraction layer between PropellerSession and PropellerDevice instances.

There are several advantages to the PropellerManager approach.

  • Applications are easier to write without device connectivity and error handling.
  • Does not require multi-threading, which is not always available.
  • Applications can immediately leverage new download strategies without changing code.
  • Cleanly shares devices without ever disconnecting, side-stepping a host of platform usability issues.
  • Build your applications on a battle-hardened Propeller implementation instead of rolling your own.

PropellerManager mediates access to hardware and allows it to be shared between applications seamlessly.

PropellerManager works by acting as a signal router between PropellerSession and PropellerDevice instances, preventing them from interacting with each other directly.

PropellerSession session(&manager);
QByteArray data;
session.write(data);

One of the unique features of PropellerManager is that it makes opening and closing devices unnecessary. It does so by maintaining a count of the number of sessions currently accessing any given device, and as long as this count remains above 0, the device will be held open.

Port Monitoring

PropellerManager enables you to monitor all available connections in the background of your application, and provides functions to update it in real-time.

Enabling port monitoring in your application is simple. Here is an example Qt class with monitoring configured.

And that's it! Now your application knows what Propeller devices are connected at any given time.

Constructor & Destructor Documentation

PropellerManager::PropellerManager ( QObject *  parent = 0)
PropellerManager::~PropellerManager ( )

Member Function Documentation

void PropellerManager::enablePortMonitor ( bool  enabled)
const QStringList & PropellerManager::listPorts ( )

Lists all available devices on the current system via any interface.

void PropellerManager::portListChanged ( )
signal