areaDetector  3-5-0
EPICS areaDetector framework
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
RestAPI Class Reference

#include <restApi.h>

Public Member Functions

 RestAPI (std::string const &hostname, int port=80, size_t numSockets=5)
 
int get (sys_t sys, std::string const &param, std::string &value, int timeout=DEFAULT_TIMEOUT)
 
int put (sys_t sys, std::string const &param, std::string const &value="", std::string *reply=NULL, int timeout=DEFAULT_TIMEOUT)
 
int initialize (void)
 
int arm (int *sequenceId)
 
int trigger (int timeout, double exposure=0.0)
 
int disarm (void)
 
int cancel (void)
 
int abort (void)
 
int wait (void)
 
int statusUpdate (void)
 
int getFileSize (const char *filename, size_t *size)
 
int waitFile (const char *filename, double timeout=DEFAULT_TIMEOUT)
 
int getFile (const char *filename, char **buf, size_t *bufSize)
 
int deleteFile (const char *filename)
 
int getMonitorImage (char **buf, size_t *bufSize, size_t timeout=500)
 

Static Public Member Functions

static int buildMasterName (const char *pattern, int seqId, char *buf, size_t bufSize)
 
static int buildDataName (int n, const char *pattern, int seqId, char *buf, size_t bufSize)
 

Static Public Attributes

static const char * sysStr [SSCount]
 

Constructor & Destructor Documentation

◆ RestAPI()

RestAPI::RestAPI ( std::string const &  hostname,
int  port = 80,
size_t  numSockets = 5 
)

Member Function Documentation

◆ abort()

int RestAPI::abort ( void  )

◆ arm()

int RestAPI::arm ( int *  sequenceId)

◆ buildDataName()

int RestAPI::buildDataName ( int  n,
const char *  pattern,
int  seqId,
char *  buf,
size_t  bufSize 
)
static

◆ buildMasterName()

int RestAPI::buildMasterName ( const char *  pattern,
int  seqId,
char *  buf,
size_t  bufSize 
)
static

◆ cancel()

int RestAPI::cancel ( void  )

◆ deleteFile()

int RestAPI::deleteFile ( const char *  filename)

◆ disarm()

int RestAPI::disarm ( void  )

◆ get()

int RestAPI::get ( sys_t  sys,
std::string const &  param,
std::string &  value,
int  timeout = DEFAULT_TIMEOUT 
)

◆ getFile()

int RestAPI::getFile ( const char *  filename,
char **  buf,
size_t *  bufSize 
)

◆ getFileSize()

int RestAPI::getFileSize ( const char *  filename,
size_t *  size 
)

◆ getMonitorImage()

int RestAPI::getMonitorImage ( char **  buf,
size_t *  bufSize,
size_t  timeout = 500 
)

◆ initialize()

int RestAPI::initialize ( void  )

◆ put()

int RestAPI::put ( sys_t  sys,
std::string const &  param,
std::string const &  value = "",
std::string *  reply = NULL,
int  timeout = DEFAULT_TIMEOUT 
)

◆ statusUpdate()

int RestAPI::statusUpdate ( void  )

◆ trigger()

int RestAPI::trigger ( int  timeout,
double  exposure = 0.0 
)

◆ wait()

int RestAPI::wait ( void  )

◆ waitFile()

int RestAPI::waitFile ( const char *  filename,
double  timeout = DEFAULT_TIMEOUT 
)

Member Data Documentation

◆ sysStr

const char * RestAPI::sysStr
static
Initial value:
= {
"/detector/api/version",
"/detector/api/" API_VERSION "/config/",
"/detector/api/" API_VERSION "/status/",
"/filewriter/api/" API_VERSION "/config/",
"/filewriter/api/" API_VERSION "/status/",
"/filewriter/api/" API_VERSION "/command/",
"/detector/api/" API_VERSION "/command/",
"/data/",
"/monitor/api/" API_VERSION "/config/",
"/monitor/api/" API_VERSION "/status/",
"/monitor/api/" API_VERSION "/images/",
"/stream/api/" API_VERSION "/config/",
"/stream/api/" API_VERSION "/status/",
"/system/api/" API_VERSION "/command/",
}

The documentation for this class was generated from the following files: