Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions urlApp/src/URLDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,11 @@
#include <Magick++.h>
using namespace Magick;

#include "ADDriver.h"

#include <epicsExport.h>

#define DRIVER_VERSION 2
#define DRIVER_REVISION 3
#define DRIVER_MODIFICATION 0
#include <URLDriver.h>

static const char *driverName = "URLDriver";

/** URL driver; reads images from URLs, such as Web cameras and Axis video servers, but also files, etc. */
class URLDriver : public ADDriver {
public:
URLDriver(const char *portName, int maxBuffers, size_t maxMemory,
int priority, int stackSize);

/* These are the methods that we override from ADDriver */
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
virtual void report(FILE *fp, int details);
void URLTask(); /**< Should be private, but gets called from C, so must be public */

protected:
int URLName;
#define FIRST_URL_DRIVER_PARAM URLName

private:
/* These are the methods that are new to this class */
virtual asynStatus readImage();

/* Our data */
Image image;
epicsEventId startEventId;
epicsEventId stopEventId;
};

#define URLNameString "URL_NAME"


asynStatus URLDriver::readImage()
{
Expand Down Expand Up @@ -288,7 +256,7 @@ void URLDriver::URLTask()
}
}


/** Called when asyn clients call pasynInt32->write().
* This function performs actions for some parameters, including ADAcquire, ADColorMode, etc.
* For all parameters it sets the value in the parameter library and calls any registered callbacks..
Expand Down Expand Up @@ -337,7 +305,7 @@ asynStatus URLDriver::writeInt32(asynUser *pasynUser, epicsInt32 value)




/** Report status of the driver.
* Prints details about the driver if details>0.
* It then calls the ADDriver::report() method.
Expand Down
32 changes: 32 additions & 0 deletions urlApp/src/URLDriver.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "ADDriver.h"

#define DRIVER_VERSION 2
#define DRIVER_REVISION 3
#define DRIVER_MODIFICATION 1

/** URL driver; reads images from URLs, such as Web cameras and Axis video servers, but also files, etc. */
class URLDriver : public ADDriver {
public:
URLDriver(const char *portName, int maxBuffers, size_t maxMemory,
int priority, int stackSize);

/* These are the methods that we override from ADDriver */
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
virtual void report(FILE *fp, int details);
void URLTask(); /**< Should be private, but gets called from C, so must be public */

protected:
int URLName;
#define FIRST_URL_DRIVER_PARAM URLName

private:
/* These are the methods that are new to this class */
virtual asynStatus readImage();

/* Our data */
Image image;
epicsEventId startEventId;
epicsEventId stopEventId;
};

#define URLNameString "URL_NAME"