/** Name of the jMpxLoader*/
final static String JMPX_LOADER_NAME = "jmpxloader"

/** Callback when java part of application is started*/
final static String JMPX_LOADER_CB_START = "jStart"

/**  name of mpx manager for accessing callbacks registered by manager itself */
final static String MPXMGR_NAME = "mpxmgr"

/**  callback event name for start event (every plugin was loaded) */
final static String MPXMGR_CB_START = "Start"

/**  callback event name for exit event (application is shutting down, but everything is still functional (message processing, mpxCtrl library is still alive,...) */
final static String MPXMGR_CB_EXIT = "Exit"

/**  tray menu changed */
final static String MPXMGR_CB_MENU_CHANGED = "MenuChanged"

/**  new frame was created */
final static String MPXMGR_CB_FRAME_NEW = "FrameCreated"

/**  frame will be deleted (still exist during callback) */
final static String MPXMGR_CB_FRAME_DEL = "FrameDelete"

/**  frame data were changed */
final static String MPXMGR_CB_FRAME_DCHNG = "FrameDataChanged"

/**  frame attributes were changed */
final static String MPXMGR_CB_FRAME_ACHNG = "FrameAttrChanged"

/**  "plugin name" for access callback events registered by MpxCtrl library */
final static String MPXCTRL_NAME = "mpxctrl"

/**  Acq. is going to start (either start or wait for start trigger, depends on mode) */
final static String MPXCTRL_CB_ACQPRESTART = "AcqPreStart"

/**  acquisition was started (for triggered acq) */
final static String MPXCTRL_CB_ACQSTART = "AcqStarted"

/**  Data are going to be read-out (shutter is closed) */
final static String MPXCTRL_CB_ACQPREREAD = "AcqPreReadData"

/**  single acquisition was completed (acq. finished, data read) */
final static String MPXCTRL_CB_ACQCOMPL = "AcqCompleted"

/**  acquisition series completed */
final static String MPXCTRL_CB_ACQSERCOMPL = "AcqSerCompleted"

/**  callback event name for info/error messages */
final static String MPXCTRL_CB_INFOMSG = "InfoMsg"

/**  DACs were set (changed) */
final static String MPXCTRL_CB_DACSSET = "DACs set"

/**  PixCfg changed */
final static String MPXCTRL_CB_PIXCFG = "PixCfg"

/**  new mpx device was detected */
final static String MPXCTRL_CB_MPXNEW = "MpxDevNew"

/**  mpx device was "reconnected" (e.g. some mpx device was switched on one of interfaces) */
final static String MPXCTRL_CB_MPXCHANGED = "MpxDevChanged"

/**  external DAC was changed (value and/or it replaces another DAC) */
final static String MPXCTRL_CB_EXTDACSET = "ExtDACSet"

/**  interface type index of Dummy interface  */
final static String IFT_DUMMY = 1  

/**  interface type index of File Device interface */
final static String IFT_FILEDEVICE = 2   

/**  interface type index of MUROS interface */
final static String IFT_MUROS = 3   

/**  interface type index of Medipix2 USB Interface */
final static String IFT_USB = 4   

/**  interface type index of Medipix2 USB Lite Interface */
final static String IFT_USB_LITE = 5   

/**  interface type index of Space Wire interface */
final static String IFT_SPACEWIRE = 6   

/**  interface type index of Flat Panel interface */
final static String IFT_FLATPANEL = 7   

/**  interface type index of GxCCD interface */
final static String IFT_GXCCD = 8   

/**  interface type index of FITPix interface */
final static String IFT_FITPIX = 9   

/**  interface type index of New FITPix interface */
final static String IFT_FITPIX2 = 10   

/**  interface type index of RPI interface */
final static String IFT_RPI = 11   

/**  vendor ID of IEAP CTU */
final static String IFV_IEAP = 1 

/** ??? */
final static String FAN_CUSTOMNAME = "Custom name"

/** ??? */
final static String FAN_PIXELMANVERSION = "Pixelman version"

/** ??? */
final static String FAN_MPXTYPE = "Mpx type"

/** ??? */
final static String FAN_CHIPBOARDID = "ChipboardID"

/** ??? */
final static String FAN_INTERFACE = "Interface"

/** ??? */
final static String FAN_MPXCLOCK = "Mpx clock"

/** ??? */
final static String FAN_ACQTIME = "Acq time"

/** ??? */
final static String FAN_POLARITY = "Polarity"

/** ??? */
final static String FAN_ACQMODE = "Acq mode"

/** ??? */
final static String FAN_HWTIMER = "Hw timer"

/** ??? */
final static String FAN_DACS = "DACs"

/** ??? */
final static String FAN_STARTTIME = "Start time"

/** ??? */
final static String FAN_STARTTIMESTR = "Start time (string)"

/** ??? */
final static String FAN_APPLIEDFILTERS = "Applied filters"

/**  data in frame are in chip by chip format (not super matrix) */
final static String FAN_DATACHIPBYCHIP = "ChipByChip"

/**  width of frame in chips */
final static String FAN_LAYOUTWIDTH = "Matrix width"

/**  height of frame in chips */
final static String FAN_LAYOUTHEIGHT = "Matrix height"

/**  order of chips in the frame */
final static String FAN_LAYOUTCHIPS = "Chips layout"

/**  angles for each chips in matrix [0=0deg, 1=90deg, 2=180deg, 3=270deg] */
final static String FAN_LAYOUTANGLES = "Chips angles layout"

/** ??? */
final static String FAN_MPX3COUNTER = "Mpx3Counter"

/** ??? */
final static int PIXCFG_MASK = 1

/** ??? */
final static int PIXCFG_TEST = 2

/** ??? */
final static int PIXCFG_THL = 3

/** ??? */
final static int PIXCFG_THH = 4

/** ??? */
final static int PIXCFG_MODE = 5

/** ??? */
final static int PIXCFG_GAIN = 6

/**  maximum length of registered names for plugins, callback events, function names... (in ExtFunctionInfo,...) */
final static int NAME_LENGTH = 32

/**  maximum length of description string for plugins, callback events, function names... (in ExtFunctionInfo,...) */
final static int DESC_LENGTH = 128

/**  maximum length of menu item path (path1|path2|item) */
final static int MENU_LENGTH = 256

/**  maximum number of input/output parameters (limits number of ExtParamInfo in ExtFunctionInfo) */
final static int MAX_PARAM = 8

/**  invalid Device ID (DEVID type) */
final static int INVALID_DEVID_VALUE = 0xffffffff

/**  invalid thread ID (u32) */
final static int INVALID_THREADID_VALUE = 0xffffffff

/**  invalid ITEMID (functions, callbacks or filters) */
final static int INVALID_ITEMID_VALUE = 0

/**  "chipNumber" for operation with all chips */
final static int ALLCHIPS = -1

/**  "frameNumber" for operation with all frames */
final static int ALLFRAMES = -1

/**  first filter instance id */
final static int INST_STARTID = 100000000

/**  function is a filter, (function parameters - two input parameters - frameID and instance id (for adjustable filters, 0 for simple filters), so the type should be: int func(INTPTR, &{FRAMEID, ITEMID}, 0)) */
final static int FUNCFLAG_FILTER = 0x01

/**  function is adjustable filter (userData has to contained pointer to filled AdjFilterPars structure) */
final static int FUNCFLAG_ADJFILTER = 0x02

/**  attribute was added */
final static int FATTR_CHANGE_ADD = 1

/**  attribute was deleted */
final static int FATTR_CHANGE_DEL = 2

/**  all attributes were removed */
final static int FATTR_CHANGE_DELALL = 3

/**  attribute's value was changed  */
final static int FATTR_CHANGE_SET = 4

/**  get last error and makes it part of logged error string (to simplify error reporting when WINAPI calls fail) */
final static int MGRLOG_GET_SYSERROR = 0x1

/**  show messagebox with error */
final static int MGRLOG_SHOW_MSGBOX = 0x2

/**  show message window which is not modal */
final static int MGRLOG_SHOW_MSGBOX_UM = 0x4

/**  created frame will be filled with zeros */
final static int FCREATE_ZERO = 0x0100

/**  mask bits */
final static int SRVFRAME_MASKBITS = 1

/**  test bits */
final static int SRVFRAME_TESTBITS = 2

/**  THL adj. bits */
final static int SRVFRAME_THLADJ = 3

/**  THH adj. bits (does not exist for Timepix) */
final static int SRVFRAME_THHADJ = 4

/**  mode bits (Timepix) */
final static int SRVFRAME_MODE = 5

/**  mode bits (Mpx3) */
final static int SRVFRAME_GAIN = 6

/**  just convenient constant, not valid frame */
final static int SRVFRAME_LAST = 7

/**  HW timer enabled */
final static int MPXCTRL_HWTIMER_ENABLE = 0

/**  HW timer disabled (PC timer used) */
final static int MPXCTRL_HWTIMER_DISABLE = 1

/**  MpxCtrl library decides which timer will be used according to time of measurement and capabilities of device */
final static int MPXCTRL_HWTIMER_AUTO = 2

/** ??? */
final static int REFDAC_THL = 0x01

/** ??? */
final static int REFDAC_THH = 0x02

/**  frames to memory */
final static int MPXCTRL_ACQTYPE_FRAME = 0

/**  frames to files */
final static int MPXCTRL_ACQTYPE_FRAME_FILE = 1

/**  frames integrated to single frame in memory */
final static int MPXCTRL_ACQTYPE_INTEGRAL = 2

/**  frames integrated to single file */
final static int MPXCTRL_ACQTYPE_INTEGRAL_FILE = 3

/** ??? */
final static int MPXMGR_CURVERSION = 206

/**  original medipix2.x */
final static int MPX_ORIG = 1

/**  medipix mxr 2.0 */
final static int MPX_MXR = 2

/**  timepix */
final static int MPX_TPX = 3

/**  medipix 3 */
final static int MPX_3 = 4

/**  start trigger (mpxCtrlTrigger(TRIGGER_ACQSTART)) */
final static int TRIGGER_ACQSTART = 1

/**  stop trigger (mpxCtrlTrigger(TRIGGER_ACQSTOP)) */
final static int TRIGGER_ACQSTOP = 2

/**  acq. is started immediately (after startAcq call), acq. is stopped by timer (HW or PC) - "common acq" */
final static int ACQMODE_ACQSTART_TIMERSTOP = 0x001

/**  acq. is started immediately (after startAcq call), acq. is stopped by trigger from HW library (e.g. ext shutter monitor) */
final static int ACQMODE_ACQSTART_HWTRIGSTOP = 0x002

/**  acq. is started immediately (after startAcq call), acq. is stopped by mpxCtrlTrigger(TRIGGER_ACQSTOP) trigger to HW library (e.g. ext shutter monitor) */
final static int ACQMODE_ACQSTART_SWTRIGSTOP = 0x004

/**  acq. is started by trigger from HW library, stopped by timer (HW or PC) */
final static int ACQMODE_HWTRIGSTART_TIMERSTOP = 0x010

/**  acq. is started by trigger from HW library, stopped by trigger from HW library */
final static int ACQMODE_HWTRIGSTART_HWTRIGSTOP = 0x020

/**  acq. is started by mpxCtrlTrigger(TRIGGER_ACQSTART), stopped by timer  (HW or PC) */
final static int ACQMODE_SWTRIGSTART_TIMERSTOP = 0x040

/**  acq. is started by mpxCtrlTrigger(TRIGGER_ACQSTART), stopped by mpxCtrlTrigger(TRIGGER_ACQSTOP) */
final static int ACQMODE_SWTRIGSTART_SWTRIGSTOP = 0x080

/**  shutter is controlled externally during acq. (e.g. independently on SW) */
final static int ACQMODE_EXTSHUTTER = 0x100

/** burst mode enabled */
final static int ACQMODE_BURST = 0x1000

/**  save in binary format */
final static int FSAVE_BINARY = 0x0001

/**  save in ASCII format */
final static int FSAVE_ASCII = 0x0002

/**  append data file to existing file if exists */
final static int FSAVE_APPEND = 0x0004

/**  save as 16bit integer */
final static int FSAVE_I16 = 0x0010

/**  save as unsigned 32bit integer */
final static int FSAVE_U32 = 0x0020

/**  save as double */
final static int FSAVE_DOUBLE = 0x0040

/**  do not save description file */
final static int FSAVE_NODESCFILE = 0x0100

/**  save only nonzero position in [x y count] format */
final static int FSAVE_SPARSEXY = 0x1000

/**  save only nonzero position in [x count] format */
final static int FSAVE_SPARSEX = 0x2000

/**  frame will not be saved :) */
final static int FSAVE_NOFILE = 0x8000

/**  value can be changed */
final static int ITEMINFO_CANCHANGE = 0x0002

/**  value will be stored in config file */
final static int MPX_HWINFO_CFGSAVE = 0x0001

/**  value can be changed */
final static int MPX_HWINFO_CANCHANGE = 0x0002

/**  value should be stored for each frame */
final static int MPX_HWINFO_MPXFRAME = 0x0004

/**  value changes parameter that requires reconnecting of device (e.g. binning, pixcount, ...) */
final static int MPX_HWINFO_NEEDRECONNECT = 0x0008

/**  maximum length of error message for some mpxCtrl functions */
final static int MPXCTRL_MAX_MSGLENGTH = 4096

/**  maximum length of error message */
final static int MPX_MAX_MSGLENGTH = 4096

/**  maximum length of path for file handling */
final static int MPX_MAX_PATH = 512

/**  max length of chipboard ID */
final static int MPX_MAX_CHBID = 64

/**  max length of ifaceName name */
final static int MPX_MAX_IFACENAME = 64

/**  chip matrix size */
final static int MATRIX_SIZE = 65536

/**  C bool values */
final static int FALSE = 0

/**  C bool values */
final static int TRUE = 1

/**  Medipix/Timepix chip configuration  */
final static int CFGTYPE_MEDIPIX = 0

/**  Plugin configuration */
final static int CFGTYPE_PLUGIN = 1

/**  Configuration of other device, e.g. motors */
final static int CFGTYPE_DEVICE = 2

/**  Miscellaneous configuration/user custom cfg */
final static int CFGTYPE_MISC = 3

/**  default configuration for the device */
final static int CFGFLAG_DEFAULT = 0x01

/**  public configuration accessible to all users */
final static int CFGFLAG_PUBLIC = 0x02

/**  public configuration accessible to all users within the account */
final static int CFGFLAG_PUBLIC_ACCOUNT = 0x04

/**  Plugin config location: automatic */
final static int CFGLOC_AUTO = 0

/**  Plugin config location: local disk */
final static int CFGLOC_LOCAL = 1

/**  Plugin config location: server  */
final static int CFGLOC_SERVER = 2

/**  Plugin config location: both local disk and server */
final static int CFGLOC_BOTH = 3

/** ??? */
final static int MPX_MAX_AUTH_LEN = 256

/** ??? */
final static int MPX_MAX_GROUP_LEN = 256

/** ??? */
final static int MPX_MAX_DEV_LEN = 256

/** ??? */
final static int MPX_MAX_CFGDESC_LEN = 2048

/**  calibration with A,B,C,T matrixes */
final static int MPX_CALIBTYPE_ABCT = 0

/**  calibration with polygon matrixes */
final static int MPX_CALIBTYPE_POLYGON = 1


 /**
 * <p>Helper function for PluginFunction and GetFrameAttrib callbacks to get
 * data from c++ byte* pointer.</p>
 * <p>Get Data in the buffer at address specified by "pointer"
 * @param buffer buffer where data will be saved. Buffer must be big enough</p>
 *        size must be the same as buffer size.
 * @param size size of the buffer
 * @param pointer pointer where data are (in c++)
 */
pixelman.getBufferAtAddress(Buffer buffer, int size, long pointer)

/**
 * <p>Helper function for PluginFunction and GetFrameAttrib callbacks to set
 * data to c++ byte* pointers.</p>
 * <p>Set Data from  buffer to address specified by "pointer"</p>
 * @param buffer buffer containing data.
 *        size must be the same as buffer size.
 * @param size size of the buffer
 * @param pointer pointer where data shoudl be saved (in c++)
 */
pixelman.setBufferAtAddress(Buffer buffer, int size, long pointer)

/**
 * <p> Gets list containigs all menu items. Uses pixelman's
 * getFirsMenuItem and getNextMenuItem functions</p>
 * <p> Should be used instead of these functions.</p>
 * @return vector of menu items
 */
pixelman.getMenuItemsList()

/**
 *<p> Gets list of all registered functions. Uses pixelman's
 * getRegFirstFunc and getRegNextFunc functions. </p>
 *<p> Should be used instead of these functions.</p>
 * @return list of functions information
 */
pixelman.getRegFuncsList()

/**
 * <p>Gets list of all callbacks events. Uses pixelman's
 * getRegFirstCBEvent and getRegNextCBEvent functions.</p>
 * <p> Should be used instead of these functions.</p>
 * @return list of callback evnets information
 */
pixelman.getRegCBEventsList()

/**
 * <p>Gets list of all filterchains. Uses pixelman's
 * getFirstFilterChain and getNextFilterChain functions.</p>
 * <p> Should be used instead of these functions.</p>
 * @return list of filter chains information
 */
pixelman.getFilterChainsList()

/**
 * <p> Gets list of all filter instances belonging to specified filter.
 * Uses pixelman's getFirstFilterInst and getNextFilerInst functions.</p>
 * <p> Should be used instead of these functions.</p>
 * @param filterID id of the filter to get instances of
 * @return list of filter instances
 */
pixelman.getFilterInstsList(int filterID)

/**
 * <p>Gets list of all frame IDs. Uses pixelman's
 * getFirstFrame and getNextFrame function's</p>
 * <p> Should be used instead of these functions.</p>
 * @return list of IDs of frames
 */
pixelman.getFrameIDsList()

/**
 * <p>Gets list of all attributes of specified frame. Uses pixelman's
 * getFirstFrameAttrib and getNextFrameAttrib functions.
 * <p> Should be used instead of these functions.</p>
 * @param frameID  frame id to get attribs of
 * @return list of attributes information
 */
pixelman.getFrameAttribsList(int frameID)

/**
 * <p>Gets List of all Mpx Device IDs. Uses pixelman's
 * getFirstMpx and getNextMpx functions.</p>
 * <p> Should be used instead of these functions.</p>
 * @return list of IDs of all devices
 */
pixelman.mpxCtrlGetMpxsList()


/**
 * Calls menu item function by it's id and it's invoked in MFC UI Thread
 * @return 0 = OK, != 0 Error
 */
pixelman.callMenuItemInUIThread(int itemID)

/**
 * Gets c++ pointer to functtable for c++ parts of the plugins
 * @return pointer to funcs table
 */
pixelman.getPixelmanFuncsPointer()

/**
 * Sets Mpx3 specific Acq parameters. Uses internaly function setSpecAcqPars.
 * @param devID id of the deice
 * @param pars acq parameters for mpx3 device
 * @return 0 = OK, != 0 Error
 */
pixelman.setMpx3AcqPars(int devID, Mpx3AcqParameters pars)

/**
 * Gets Mpx3 specific Acq parameters. Uses internaly function mpxCtrlGetSpecAcqPars.
 * @param devID id of the deice
 * @param pars acq parameters for mpx3 device
 * @return 0 = OK, != 0 Error
 */
pixelman.getMpx3AcqPars(int devID, Mpx3AcqParameters pars)

/**
 * gets path to configs directory where all configuration files should be stored <br>
 * [out] path - output buffer for path (path end with (back)slash) <br>
 *
 */
pixelman.getCfgsPath(String[] path)

/**
 * error logging function type <br>
 * [in] pluginName - name of plugin which request loging <br>
 * [in] format - "printf-like" format string <br>
 * [in] flags - bitwise MGRLOG_XXX flags <br>
 * [in] ... - ellipsis (printf-like) <br>
 *
 */
pixelman.logMsg(String pluginName, String format, long flags)

/**
 * shows/hides log window error login functions types <br>
 * [in] show - TRUE to show log window, FALSE to hide it <br>
 *
 */
pixelman.logShowWindow(boolean show)

/**
 * shows/hides windows with list of items managed by manager <br>
 * [in] show - TRUE to show window, FALSE to hide it <br>
 *
 */
pixelman.managedItemsShowWindow(boolean show)

/**
 * function for registering plugin in Manager <br>
 * [in] fileName - fileNamePath to DLL <br>
 *
 */
pixelman.addPlugin(String fileName)

/**
 * function type for adding item in Loader menu <br>
 * [in] pluginName - name of plugin which adds item to menu <br>
 * [in] itemName - name of item in menu <br>
 * [in] menuPath - sequence of submenus where menuitem will be placed, submenus are separated by pipe (|) e.g. "Special Plugins|Filteres" <br>
 * [in] func - pointer to function that will be called when user clicks on menuitem <br>
 * [in] param - parameter which will be given to function 'func' <br>
 * [out] menuItemID - pointer to ID which will be assigned to this menuitem, this can be 0 (NULL) if caller is not interested in this value (this ID is used for removing menuitem from menu) <br>
 * [in] flags - reserved flags, use 0 <br>
 *
 */
pixelman.addMenuItem(String pluginName, String itemName, String menuPath, MenuFuncInterface func, long param, long[] menuItemID, long flags)

/**
 * function type for adding item in Loader menu to submenu corresponding to Medipix device identified by devID <br>
 * [in] devID - device ID of medipix <br>
 * [in] pluginName - name of plugin which adds item to menu <br>
 * [in] itemName - name of item in menu <br>
 * [in] menuPath - sequence of submenus where menuitem will be placed, submenus are separated by pipe (|) e.g. "Special Plugins|Filteres", these submenus will be placed in submenu correspnding to spedified mpx device <br>
 * [in] func - pointer to function that will be called when user clicks on menuitem <br>
 * [in] param - parameter which will be given to function 'func' <br>
 * [out] menuItemID - pointer to ID which will be assigned to this menuitem, this can be 0 (NULL) if caller is not interested in this value (this ID is used for removing menuitem from menu) <br>
 * [in] flags - reserved flags, use 0 <br>
 *
 */
pixelman.addMpxMenuItem(int devID, String pluginName, String itemName, String menuPath, MenuFuncInterface func, long param, long[] menuItemID, long flags)

/**
 * function type for removing item in Loader menu <br>
 * [in] menuItemID - ID of item that will be removed <br>
 *
 */
pixelman.removeMenuItem(long menuItemID)

/**
 * [in] devID - device ID of medipix <br>
 * [out] menuPath - path to "menu folder" of mpx device <br>
 *
 */
pixelman.getMpxMenuPath(int devID, String[] menuPath)

/**
 * type of function for calling menu item <br>
 * [in] name - path name of menu item <br>
 *
 */
pixelman.callMenuItemByName(String name)

/**
 * type of function for calling menu item <br>
 * [in] itemID - ID of menu item <br>
 *
 */
pixelman.callMenuItemByID(long itemID)

/**
 * function type for registering plugin function in Manager <br>
 * [in] funcInfo - this structure has to be filled to give manager all informations about function <br>
 *
 */
pixelman.addFuncItem(ExtFunctionInfo funcInfo)

/**
 * function type for unregistering plugin function in Manager <br>
 * [in] pluginName - name of plugin containing function that should be removed <br>
 * [in] functionName - name of function that should be unregistered <br>
 *
 */
pixelman.removeFuncItem(String pluginName, String functionName)

/**
 * type of function for getting function info via plugin.functionName <br>
 * [in] funcID - id of function <br>
 * [out] extFuncInfo - this structure will be filled by manager to provide all informations about registered function <br>
 *
 */
pixelman.getFuncItemID(long funcID, ExtFunctionInfo extFuncInfo)

/**
 * type of function for getting function info via plugin.functionName <br>
 * [in] pluginName - name of plugin where function resides <br>
 * [in] functionName - name of function we are interested in <br>
 * [out] extFuncInfo - this structure will be filled by manager to provide all informations about registered function <br>
 *
 */
pixelman.getFuncItem(String pluginName, String functionName, ExtFunctionInfo extFuncInfo)

/**
 * type of function for calling function info via plugin.functionName <br>
 * [in] pluginName - name of plugin where function resides <br>
 * [in] functionName - name of function we are interested in <br>
 * [in] in - input parameters for specified function <br>
 * [out] out - output parameters for specified function <br>
 *
 */
pixelman.callFuncItem(String pluginName, String functionName, Buffer in, Buffer out)

/**
 * function type for registering callback event (by plugin) in Manager <br>
 * [in] cbEventInfo - structure describing callback event which will be registered <br>
 * [out] eventID - assigned ID, this value should be used for setting cb event <br>
 *
 */
pixelman.addCBEvent(ExtCBEventInfo cbEventInfo, long[] eventID)

/**
 * function type for unregistering callback event (by plugin) in Manager <br>
 * [in] pluginName - name of plugin where function resides <br>
 * [in] cbEventName - name of callback event that shoud be unregistered <br>
 *
 */
pixelman.removeCBEvent(String pluginName, String cbEventName)

/**
 * type of function for setting the registered callback event (Manager then calls registered callback function for this "callback event" <br>
 * [in] ID - event ID that should be set <br>
 * [in] par - parameter that will be given to callback function registered for this event <br>
 *
 */
pixelman.setCBEvent(long ID, long par)

/**
 * type of function for registering to receive notifications about callback event <br>
 * [in] pluginName - name of plugin which offers required cb event <br>
 * [in] cbEventName - name of event for which we register <br>
 * [in] callback - pointer to call back that should be called when event occures <br>
 * [in] userData - custom user data for provided callback function (callback is identified by <callback, userData> pair <br>
 * so it is possible to register same function several times for single event with different userData <br>
 *
 */
pixelman.registerCallback(String pluginName, String cbEventName, CallbackFuncInterface callback, long userData)

/**
 * type of function for registering to receive notifications about callback event <br>
 * [in] pluginName - name of plugin which offers the event <br>
 * [in] cbEventName - name of event for which should be registration changed <br>
 * [in] callback - callback function which we want remove from "call list" when event occurres <br>
 * [in] userData - custom user data for provided callback function (has to be some as for registration) <br>
 *
 */
pixelman.unregisterCallback(String pluginName, String cbEventName, CallbackFuncInterface callback, long userData)

/**
 * function type for registering custom frame attribute template <br>
 * [in] attribInfo - this structure has to be filled to give manager required informations <br>
 *
 */
pixelman.addFrameAttribTempl(ExtFrameAttribInfo attribInfo)

/**
 * function type for unregistering custom frame attribute template <br>
 * [in] attribName - name of attribName that should be unregistered <br>
 *
 */
pixelman.removeFrameAttribTempl(String attribName)

/**
 * type of function for creating chain of filters <br>
 * [in] pluginName - name of plugin which is creating chain of filters <br>
 * [in] filterChainName - name of filter chain <br>
 * [out] filterChainID - ID of created filter chain <br>
 *
 */
pixelman.createFilterChain(String pluginName, String filterChainName, long[] filterChainID)

/**
 * removes filter chain <br>
 * [in] filterChainID - ID of filter chain that should be removed <br>
 *
 */
pixelman.removeFilterChain(long filterChainID)

/**
 * type of function for adding filter to chain of filters <br>
 * [in] filterChainID - ID of filter chain to which the filter will be added <br>
 * [in] filtInstID - instance ID of filter (obtained via MgrCreateFilterInstType) <br>
 * [in] order - zero based index of filter in chain (0 add to begining, MAXDWORD - add to end) <br>
 *
 */
pixelman.addToFilterChain(long filterChainID, long filtInstID, long order)

/**
 * type of function for removing filter from chain of filters <br>
 * [in] filterChainID - ID of filter chain from which the filter will be removed <br>
 * [in] order - order of filter (zero based) <br>
 *
 */
pixelman.removeFromFilterChain(long filterChainID, long order)

/**
 * type of function for getting frame processed by filter chain <br>
 * [in] filterChainID - ID of filter chain which will be used <br>
 * [in] inID - ID of input frame <br>
 * [out] outID - ID of created output frame <br>
 *
 */
pixelman.getFilteredFrame(long filterChainID, int inID, int[] outID)

/**
 * [in] filterChainID - ID of filter chain <br>
 * [out] filterChainInfo - this structure will be filled by manager to provide all informations about filter chain, caller must supply filterChainInfo->filterNames and filterChainInfo->filterIDs buffer and their size if he wants fill informations about filter names and/or filter IDs, filterChainInfo->filterNamesSize and filterChainInfo->filterIDsSize will contain required size of buffers <br>
 *
 */
pixelman.getFilterChainInfo(long filterChainID, ExtFilterChainInfo filterChainInfo)

/**
 * [in] filterID - ID of filter <br>
 * [in] name - name of instance (no need to be unique) <br>
 * [out] instID - ID of filter instance <br>
 *
 */
pixelman.createFilterInst(long filterID, String name, long[] instID)

/**
 * [in] instID - ID of filter instance <br>
 *
 */
pixelman.deleteFilterInst(long instID)

/**
 * [in] instID - instance ID of filter <br>
 * [in] idx - zero-based index of parameter <br>
 * [in] data - data for parameter <br>
 * [in] dataSize - size of data <br>
 *
 */
pixelman.setFilterPar(long instID, int idx, Buffer data, int dataSize)

/**
 * [in] instID - instance ID of filter <br>
 * [in] idx - zero-based index of parameter or -1, in case of -1, *dataSize will contain number of parameters of adjustable filters, (info will be unused so it can be NULL) <br>
 * [in/out] info - data for parameter, info->data can contain allocated buffer for param. value, if info->data is NULL info structure will be filled without data <br>
 * [in/out] dataSize - dataSize should contain size of allocated buffer in info->data (in bytes), after return it will contain required size of data buffer for parameter <br>
 *
 */
pixelman.getFilterPar(long instID, int idx, ItemInfo info, int[] dataSize)

/**
 * [in] fileName - name of the file where filterChains will be saved. can be NULL, if NULL, default file name is used. <br>
 *
 */
pixelman.saveFilterChainsToFile(String fileName)

/**
 * creates frame <br>
 * [out] frameID - ID of new created frame <br>
 * [in] width - width of frame <br>
 * [in] height - height of frame <br>
 * [in] flags - combination of type of frame (TYPE_I16, TYPE_U32, TYPE_DOUBLE) and FCREATE_XXX flags <br>
 *
 */
pixelman.createFrame(int[] frameID, long width, long height, int flags, String creatorName)

/**
 * read number of frames specified file <br>
 * [in] fileName - name of description or data file <br>
 * [out] frameCount - number of frames <br>
 *
 */
pixelman.getFrameCount(String fileName, int[] frameCount)

/**
 * load frame from file, file can contain more than one frame <br>
 * [out] frameID - ID of new loaded frame <br>
 * [in] fileName - name of description or data file <br>
 * [in] idx - 0-based index of frame <br>
 *
 */
pixelman.loadFrame(int[] frameID, String fileName, int idx)

/**
 * save frame to file, if FSAVE_APPEND flag is set frame will be added to multi-frame file <br>
 * [in] frameID - ID of new loaded frame <br>
 * [in] fileName - name of data file <br>
 * [in] flags - bitwise combination of FSAVE_* flags see common.h for details <br>
 *
 */
pixelman.saveFrame(int frameID, String fileName, long flags)

/**
 * makes copy of frame <br>
 * [in] origID - ID of original frame <br>
 * [out] newID - ID of new created copy <br>
 *
 */
pixelman.duplicateFrame(int origID, int[] newID)

/**
 * open specified frame (increase reference count, if reference count drops to zero, frame is automatically deleted) <br>
 * [in] frameID - frame to open <br>
 * [out] refCount - actual reference count <br>
 *
 */
pixelman.openFrame(int frameID, long[] refCount)

/**
 * close specified frame (decrease reference count, if reference count drops to zero, frame is automatically deleted) <br>
 * [in] frameID - frame to lock <br>
 * [out] refCount - actual reference count <br>
 *
 */
pixelman.closeFrame(int frameID, long[] refCount)

/**
 * locks frame for exclusive access <br>
 * [in] frameID - frame to lock <br>
 * [in] timeout - how long wait (in ms) for lock in ms (if lock will not be successfull in timeout milliseconds, function will return MPXERR_LOCK_TIMEOUT) <br>
 *
 */
pixelman.lockFrame(int frameID, long timeout)

/**
 * unlocks frame (this function has to be called after successful MgrLockFrameType or MgrGetLockedFrameBuffType) <br>
 * [in] frameID - frame to unlock <br>
 *
 */
pixelman.unlockFrame(int frameID)

/**
 * retrieves type of selected frame <br>
 * [in] frameID - frame identification <br>
 * [out] type - type of frame (TYPE_I16, TYPE_U32, TYPE_DOUBLE) <br>
 *
 */
pixelman.getFrameType(int frameID, int[] type)

/**
 * sets type of selected frame (converts frame to specified format) <br>
 * [in] frameID - frame identification <br>
 * [in] type - type of frame (TYPE_I16, TYPE_U32, TYPE_DOUBLE) <br>
 *
 */
pixelman.setFrameType(int frameID, int type)

/**
 * retrieves information about frame size <br>
 * [in] frameID - frame identification <br>
 * [out] width - width of frame <br>
 * [out] height - height of frame <br>
 *
 */
pixelman.getFrameSize(int frameID, long[] width, long[] height)

/**
 * sets frame size <br>
 * [in] frameID - frame identification <br>
 * [in] width - width of frame <br>
 * [in] height - height of frame <br>
 *
 */
pixelman.setFrameSize(int frameID, long width, long height)

/**
 * copy supplied buffer to frame internal data buffer <br>
 * [in] frameID - frame identification <br>
 * [in] buffer - buffer to copy <br>
 * [in] byteSize - size of buffer (in bytes) <br>
 *
 */
pixelman.setFrameData(int frameID, Buffer buffer, long byteSize)

/**
 * retrieves data (copy) from frame in specified format <br>
 * [in] frameID - frame identification <br>
 * [out] buffer - output buffer for data <br>
 * [in/out] byteSize - size of supplied buffer (in bytes) <br>
 * [in] type - type of output format (TYPE_I16, TYPE_U32, TYPE_DOUBLE) <br>
 *
 */
pixelman.getFrameData(int frameID, Buffer buffer, long[] byteSize, int type)

/**
 * locks frame and retrieves pointer to internal data buffer <br>
 * [in] frameID - frame identification <br>
 * [out] buffer - pointer to internal data buffer <br>
 * [out] byteSize - size (in bytes) of internal data buffer <br>
 * [in] timeout - how long wait (in ms) for lock in ms (if lock will not be successfull in timeout milliseconds, function will return MPXERR_LOCK_TIMEOUT) <br>
 *
 */
pixelman.getLockedFrameBuff(int frameID, ByteBufferRef buffer, long[] byteSize, long timeout)

/**
 * loads data file to existing frame <br>
 * [in] frameID - frame identification <br>
 * [in] fileName - name of data file <br>
 * [in] flags - flags describing data file format (bitwise combination of following flags: FSAVE_BINARY, FSAVE_ASCII, FSAVE_I16, FSAVE_U32, FSAVE_DOUBLE, FSAVE_NODESCFILE) <br>
 * flags FSAVE_BINARY/FSAVE_ASCII and flags FSAVE_I16/FSAVE_U32/FSAVE_DOUBLE are mutually exclusive <br>
 *
 */
pixelman.loadFrameData(int frameID, String fileName, long flags)

/**
 * sets frame name <br>
 * [in] frameID - frame identification <br>
 * [in] name - frame name <br>
 *
 */
pixelman.setFrameName(int frameID, String name)

/**
 * gets frame name <br>
 * [in] frameID - frame identification <br>
 * [out] name - frame name <br>
 *
 */
pixelman.getFrameName(int frameID, String[] name)

/**
 * sets creator name (it should be plugin name that created frame) <br>
 * [in] frameID - frame identification <br>
 * [in] name - creator name <br>
 *
 */
pixelman.setFrameCreatorName(int frameID, String name)

/**
 * gets creator name (it should be plugin name that created frame) <br>
 * [in] frameID - frame identification <br>
 * [out] name - creator name <br>
 *
 */
pixelman.getFrameCreatorName(int frameID, String[] name)

/**
 * sets "logical" path of frame ("logical" path defines context of frame) <br>
 * [in] frameID - frame identification <br>
 * [in] path - logical path (folders are separated by '|', e.g. "myplugin|filtered|device1" <br>
 *
 */
pixelman.setFrameLogPath(int frameID, String path)

/**
 * gets "logical" path of frame ("logical" path defines context of frame) <br>
 * [in] frameID - frame identification <br>
 * [out] path - logical path (folders are separated by '|', e.g. "myplugin|filtered|device1" <br>
 *
 */
pixelman.getFrameLogPath(int frameID, String[] path)

/**
 * gets current frame file name <br>
 * [in] frameID - frame identification <br>
 * [out] path - current frame file name (if exists - it was saved or loaded, otherwise "") <br>
 *
 */
pixelman.getFrameFileName(int frameID, String[] path)

/**
 * adds attribute to frame <br>
 * [in] frameID - frame identification <br>
 * [in] name - name of attribute <br>
 * [in] desc - description of attribute <br>
 * [in] type - type of data of attribute <br>
 * [in] data - data of attribute ('count' of items of type 'type') <br>
 * [in] count - number of items of type 'type' in 'data' buffer <br>
 *
 */
pixelman.addFrameAttrib(int frameID, String name, String desc, int type, byte[] data, long count)

/**
 * sets value of selected attribute of selected frame <br>
 * [in] frameID - frame identification <br>
 * [in] name - name of attribute to set <br>
 * [in] data - data (value) of attribute <br>
 * [in] size - size of 'data' buffer in bytes <br>
 *
 */
pixelman.setFrameAttrib(int frameID, String name, Buffer data, long size)

/**
 * gets value of selected attribute of selected frame <br>
 * [in] frameID - frame identification <br>
 * [in] name - name of attribute to get <br>
 * [in] data - buffer for attribute value <br>
 * [in/out] size - size of 'data' buffer in bytes, if 'data' buffer is not big enough MPXERR_BUFFER_SMALL is returned and size contains required size of buffer) <br>
 * [out] type - type of attribute (may be 0 if caller do not want this information) <br>
 *
 */
pixelman.getFrameAttrib(int frameID, String name, Buffer data, long[] size, int[] type)

/**
 * removes selected attribute from frame <br>
 * [in] frameID - frame identification <br>
 * [in] name - name of attribute to remove <br>
 *
 */
pixelman.removeAttrib(int frameID, String name)

/**
 * removes all attributes from frame <br>
 * [in] frameID - frame identification <br>
 *
 */
pixelman.removeAllAttribs(int frameID)

/**
 * creates a new subframe <br>
 * [in] frameID - frame identification <br>
 * [out] subframeIdx - index of new subframe <br>
 * [in] width - width of subframe <br>
 * [in] height - height of subframe <br>
 * [in] flags - combination of type of frame (TYPE_I16, TYPE_U32, TYPE_DOUBLE) and FCREATE_XXX flags <br>
 *
 */
pixelman.createSubframe(int frameID, int[] subframeIdx, long width, long height, int flags)

/**
 * retrieves number of subframes in frame <br>
 * [in] frameID - frame identification <br>
 * [out] subframeCount - will be filled with number of subframes <br>
 *
 */
pixelman.getSubframeCount(int frameID, int[] subframeCount)

/**
 * retrieves type of selected subframe <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [out] type - type of frame (TYPE_I16, TYPE_U32, TYPE_DOUBLE) <br>
 *
 */
pixelman.getSubframeType(int frameID, int subframeIdx, int[] type)

/**
 * sets type of selected subframe (converts subframe to specified format) <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [in] type - type of frame (TYPE_I16, TYPE_U32, TYPE_DOUBLE) <br>
 *
 */
pixelman.setSubframeType(int frameID, int subframeIdx, int type)

/**
 * retrieves information about subframe size <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [out] width - width of frame <br>
 * [out] height - height of frame <br>
 *
 */
pixelman.getSubframeSize(int frameID, int subframeIdx, long[] width, long[] height)

/**
 * sets subframe size <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [in] width - width of frame <br>
 * [in] height - height of frame <br>
 *
 */
pixelman.setSubframeSize(int frameID, int subframeIdx, long width, long height)

/**
 * copy supplied buffer to subframe internal data buffer <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [in] buffer - buffer to copy <br>
 * [in] byteSize - size of buffer (in bytes) <br>
 *
 */
pixelman.setSubframeData(int frameID, int subframeIdx, Buffer buffer, long byteSize)

/**
 * retrieves data (copy) from subframe in specified format <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [out] buffer - output buffer for data <br>
 * [in/out] byteSize - size of supplied buffer (in bytes) <br>
 * [in] type - type of output format (TYPE_I16, TYPE_U32, TYPE_DOUBLE) <br>
 *
 */
pixelman.getSubframeData(int frameID, int subframeIdx, Buffer buffer, long[] byteSize, int type)

/**
 * locks frame and retrieves pointer to internal data buffer for specified subframe <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [out] buffer - pointer to internal data buffer <br>
 * [out] size - size (in bytes) of internal data buffer <br>
 * [in] timeout - how long wait (in ms) for lock in ms (if lock will not be successfull in timeout milliseconds, function will return MPXERR_LOCK_TIMEOUT) <br>
 *
 */
pixelman.getLockedSubframeBuff(int frameID, int subframeIdx, ByteBufferRef buffer, long[] byteSize, long timeout)

/**
 * sets subframe name <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [in] name - frame name <br>
 *
 */
pixelman.setSubframeName(int frameID, int subframeIdx, String name)

/**
 * gets subframe name <br>
 * [in] frameID - frame identification <br>
 * [in] subframeIdx - subframe index <br>
 * [out] name - frame name <br>
 *
 */
pixelman.getSubframeName(int frameID, int subframeIdx, String[] name)

/**
 * gets service frame ID of selected type for particular device <br>
 * [in] devID - device ID of medipix <br>
 * [in] type - type of service frame (SRVFRAME_xxx) <br>
 * [out] frameID - id of service frame (it is constant for certain FRAMEID during program run) <br>
 *
 */
pixelman.getServiceFrame(int devID, long type, int[] frameID)

/**
 * Tries to connect to server with login credentials and open session.  <br>
 * if account, user, and passwords are "", then defulat saved credentials are used. <br>
 * [in] account - name of the server account. <br>
 * [in] user - user name. <br>
 * [in] password - password <br>
 * [out] sessionID - id that is used to identify each session, as input parameters of all other server functions <br>
 *
 */
pixelman.serverConnect(String account, String user, String password, int[] sessionID)

/**
 * Closes session and disconnects from server <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 *
 */
pixelman.serverDisconnect(int sessionID)

/**
 * Sends a direct command to server. For manual and advance usage. <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] command - command that is send directly to server. For direct, and advance server communication <br>
 * [out] response - buffer with a response of the server <br>
 * [in] size - size of the repsonse in the buffer. <br>
 *
 */
pixelman.serverSendCommand(int sessionID, String command, Buffer response, long[] size)

/**
 * Saves credentials as default. These are used when connecting with (account="", user="", password="") <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] account - account name <br>
 * [in] user - user name <br>
 * [in] password - password <br>
 *
 */
pixelman.saveServerCredentials(String account, String user, String password)

/**
 * Gets saved account and user name <br>
 * [out] account - saved account name <br>
 * [out] user - saved user name <br>
 *
 */
pixelman.getSavedServerCredentials(String[] account, String[] user)

/**
 * Gets number of configs available on server for specified type, group and devID <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] type - config type (CFGTYPE_XXX constants) <br>
 * [in] group - config group. For plugin config it is plugin's name, for chip is empty ("") <br>
 * [in] devID - device ID - id of the device or chip <br>
 * [out] coutn - number of available configs on the server <br>
 *
 */
pixelman.getServerConfigCount(int sessionID, int type, String group, String devID, int[] count)

/**
 * Gets first config for specified parameters. To enumerate configs, function MgrGetServerFirstConfigInfoType has to be called first then <br>
 * function MgrGetServeNextConfigInfoType has to be called to get next item. If return code is 0 then <br>
 * output parameters conaints information about config. To enumerate all available configs for specified <br>
 * parameters call the "next" function until the return code != 0 (is 1) <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] type - config type (CFGTYPE_XXX constants) <br>
 * [in] group - config group. For plugin config it is plugin's name, for chip is empty ("") <br>
 * [in] devID - device ID - id of the device or chip <br>
 * [out] itemID - pointer to "browse handle", do not change its value <br>
 * [out] cfgInfo - ouput structure containing information about config <br>
 *
 */
pixelman.getServerFirstConfigInfo(int sessionID, int type, String group, String devID, int[] itemID, ExtConfigInfo cfgInfo)

/**
 * Gets next config. To enumerate configs, function MgrGetServerFirstConfigInfoType has to be called first then <br>
 * function MgrGetServeNextConfigInfoType has to be called to get next item. If return code is 0 then <br>
 * output parameters conaints information about config. To enumerate all available configs for specified <br>
 * parameters call the "next" function until the return code != 0 (is 1) <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in/out] itemID - pointer to "browse handle", do not change its value <br>
 * [out] cfgInfo - ouput structure containing information about config <br>
 *
 */
pixelman.getServerNextConfigInfo(int sessionID, int[] itemID, ExtConfigInfo cfgInfo)

/**
 * Gets config info structure for specified parameters <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] type - config type (CFGTYPE_XXX constants) <br>
 * [in] group - config group. For plugin config it is plugin's name, for chip is empty ("") <br>
 * [in] devID - device ID - id of the device or chip <br>
 * [in] cfgID - id of the config <br>
 * [out] cfgInfo - ouput structure containing information about config <br>
 *
 */
pixelman.getServerConfigInfo(int sessionID, int type, String group, String devID, double cfgID, ExtConfigInfo cfgInfo)

/**
 * Changes config information 
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] cfgID - id of the config <br>
 * [in] cfgInfo - input structure containing information about config <br>
 *
 */
pixelman.setServerConfigInfo(int sessionID, double cfgID, ExtConfigInfo cfgInfo)

/**
 * Adds a new config to the server <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] cfgInfo - structure containing information about the new config <br>
 * [in] data - buffer of config data <br>
 * [in] size - size of the data buffer in bytes <br>
 *
 */
pixelman.addServerConfig(int sessionID, ExtConfigInfo cfgInfo, Buffer data, long size)

/**
 * Removes a config from the server <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] type - config type (CFGTYPE_XXX constants) <br>
 * [in] group - config group. For plugin config it is plugin's name, for chip is empty ("") <br>
 * [in] devID - device ID - id of the device or chip <br>
 * [in] cfgID - id of the config <br>
 *
 */
pixelman.removeServerConfig(int sessionID, int type, String group, String devID, double cfgID)

/**
 * Gets data of the config <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] type - config type (CFGTYPE_XXX constants) <br>
 * [in] group - config group. For plugin config it is plugin's name, for chip is empty ("") <br>
 * [in] devID - device ID - id of the device or chip <br>
 * [in] cfgID - id of the config <br>
 * [in] fileName - file in the config which data shuld be retrieved. Should be normaly "" <br>
 * [out] data - config data buffer <br>
 * [in/out] size - size of the supplied data buffer (in bytes). it buffer is too small MPXERR_BUFF_SMALL is returned and size contains required size. <br>
 *
 */
pixelman.getServerConfigData(int sessionID, int type, String group, String devID, double cfgID, String fileName, Buffer data, long[] size)

/**
 * Sets config data <br>
 * [in] sessionID - session ID obtained in serverConnect function <br>
 * [in] type - config type (CFGTYPE_XXX constants) <br>
 * [in] group - config group. For plugin config it is plugin's name, for chip is empty ("") <br>
 * [in] devID - device ID - id of the device or chip <br>
 * [in] cfgID - id of the config <br>
 * [in] fileName - file in the config which data shuld be replaced. Should be normaly "" <br>
 * [in] data - config data buffer <br>
 * [in] size - size of the data buffer in bytes <br>
 *
 */
pixelman.setServerConfigData(int sessionID, int type, String group, String devID, double cfgID, String fileName, Buffer data, long size)

/**
 * Saves plugin configuration to the server or a local disk <br>
 * [in] pluginName - name of the plugin (short name, e.g. mpxctrlui) <br>
 * [in] devID - medipix device identification for plugins that are bound to the device or INVALID_DEVID_VALUE for general plugins. <br>
 * [in] location - location where the config should be saved (constants CFGLOC_AUTO, CFGLOC_LOCAL, CFGLOC_SERVER, CFGLOC_BOTH, ...) <br>
 * [in] data - data buffer of the configuration <br>
 * [in] size - size of the configuration <br>
 *
 */
pixelman.savePluginConfig(String pluginName, int devID, int location, Buffer data, long size)

/**
 * Loads plugin configuration from the server or a local disk <br>
 * [in] pluginName - name of the plugin (short name, e.g. mpxctrlui) <br>
 * [in] devID - medipix device identification for plugins that are bound to the device or INVALID_DEVID_VALUE for general plugins. <br>
 * [in] location - location from where the config should be loaded (constants CFGLOC_AUTO, CFGLOC_LOCAL, CFGLOC_SERVER, CFGLOC_BOTH, ...) <br>
 * [out] data - data buffer of the configuration <br>
 * [in/out] size - size of the data buffer in bytes. If the buffer is too small, MPXERR_SMALL_BUFF is returned and size contais required size. <br>
 *
 */
pixelman.loadPluginConfig(String pluginName, int devID, int location, Buffer data, long[] size)

/**
 * Chip calibration functions <br>
 * Get type of calibration and number of calibration matrixes <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based index of chip <br>
 * [out] calibType - type of the calibration (MPX_CALIBTYPE_ABCT, MPX_CALIBTYPE_POLYGON) <br>
 * [out] matrixCount - number of matrixes that calibration contains <br>
 *
 */
pixelman.getCalibrationType(int devID, int chipNumber, int[] calibType, int[] matrixCount)

/**
 * Sets type of calibration and number of matrixes. It will automatically delete any previous calibration <br>
 * and create empty matrixes and buffers for new calibration in chip attributes <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based index of chip <br>
 * [in] calibType - type of the calibration (MPX_CALIBTYPE_ABCT, MPX_CALIBTYPE_POLYGON) <br>
 * [in] matrixCount - number of matrixes that calibration contains <br>
 *
 */
pixelman.setCalibrationType(int devID, int chipNumber, int calibType, int matrixCount)

/**
 * Gets data of the calibration matrix <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based index of chip <br>
 * [in] matrixIndex - zero-based index of matrix <br>
 * [out] data - data of the matrix <br>
 * [in/out] size - size in bytes of the supplied buffer. If the buffer is small, function returns MPXERR_BUFFER_SMALL <br>
 * and size will contain required size of buffer <br>
 *
 */
pixelman.getCalibrationMatrix(int devID, int chipNumber, int matrixIndex, Buffer data, long[] size)

/**
 * Sets data of the calibration matrix <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based index of chip <br>
 * [in] matrixIndex - zero-based index of matrix <br>
 * [in] data - new matrix data <br>
 * [in] size - size of data buffer <br>
 *
 */
pixelman.setCalibrationMatrix(int devID, int chipNumber, int matrixIndex, Buffer data, long size)

/**
 * Gets calibration matrix info data (for polygon calibration double value - energy of matrix) <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based index of chip <br>
 * [in] matrixIndex - zero-based index of matrix <br>
 * [out] data - data of the matrix info <br>
 * [in/out] size - size in bytes of the supplied buffer. If the buffer is small, function returns MPXERR_BUFFER_SMALL <br>
 * and size will contain required size of buffer <br>
 *
 */
pixelman.getCalibrationMatrixInfoData(int devID, int chipNumber, int matrixIndex, Buffer data, long[] size)

/**
 * Sets calibration matrix info data (for polygon calibration a double value - energy of matrix) <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based index of chip <br>
 * [in] matrixIndex - zero-based index of matrix <br>
 * [in] data - new matrix info data <br>
 * [in] size - size of data buffer <br>
 *
 */
pixelman.setCalibrationMatrixInfoData(int devID, int chipNumber, int matrixIndex, Buffer data, long size)

/**
 * Calibrates frame with calibration saved in device chip attributes <br>
 * [in] devID - medipix device identification <br>
 * [in] inID - FRAMEID of source frame that will be calibrated <br>
 * [out] outID - FRAMEID of newly created frame with calibrated source frame <br>
 * [in] tpxClockFactor -  multiplication factor to correct for Timepix clock differenc for  calibration. <br>
 * if 0, the proper value will be calculated from actual device timepix clock <br>
 *
 */
pixelman.getCalibratedFrame(int devID, int inID, int[] outID, double tpxClockFactor)

/**
 * Gets information about license
 * [out] licenseText get name/text of the license
 */
pixelman.getLicenseInfo(String[] licenseText)

/**
 * Checks if plugin/module is licensed. Plugin needs to fill pluginVendor, pluginClass and pluginID. 
 * If device variables can be 0 if plugin license does not depend on particular device
 * [in] pluginName name of the plugin requiring license checking
 * [in] pluginVendor vendor of the plugin
 * [in] pluginClass class of the plugin
 * [in] pluginID id of the plugin
 * [in] deviceType type of the device (e.g. Fitpix, USB, ..) plugins requires to run
 * [in] deviceVendor vendor of the device the plugin requires to run
 * [in] deviceID id of the device the plugin requires to run
 * [out] isLicensed TRUE if licensed
*/
pixelman.checkLicense(String pluginName, int pluginVendor, int pluginClass, int pluginID, int deviceType, int deviceVendor, int deviceID, boolean[] isLicensed)

/**
 * tries to find new devices (it will notify via MPXCTRL_CB_NEWMPX callback) <br>
 *
 */
pixelman.mpxCtrlFindNewMpxs()

/**
 * it will "reconnect" (reinitialize) the interface and connected medipix (for hot swap of medipix on interface) <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlReconnectMpx(int devID)

/**
 * type of function for getting number of "hardware info items" for particular Medipix <br>
 * "hardware info items" are used to access interface specific variables to obtain or set interface specifice information (e.g. muros clock frequency) <br>
 * [in] devID - medipix device identification <br>
 * [out] count - number of hw info items of this device <br>
 *
 */
pixelman.mpxCtrlGetHwInfoCount(int devID, int[] count)

/**
 * obtains selected HwInfoItem structure <br>
 * [in] devID - medipix device identification <br>
 * [in] index - zero-based index of "hardware info item", should be in <0, count-1> (count is obtained via mpxCtrlGetHwInfoCount) <br>
 * [out] infoItem - structure that will contain informations about selected item <br>
 * [in/out] dataSize - size of infoItem->data for "raw item data", if the dataSize is not big enough for item data, <br>
 * the function returns error (!=0) and *dataSize will contain required size (to allow caller allocate big enough data buffer) <br>
 *
 */
pixelman.mpxCtrlGetHwInfoItem(int devID, int index, HwInfoItem infoItem, int[] dataSize)

/**
 * set selected "hardware info item" data <br>
 * [in] devID - medipix device identification <br>
 * [in] index - zero-based index of "hardware info item", should be in <0, count-1> (count is obtained via mpxCtrlGetHwInfoCount) <br>
 * [in] data - pointer to data <br>
 * [in] dataSize - size of data (to allow sizecheck of data for certain hw info item) <br>
 *
 */
pixelman.mpxCtrlSetHwInfoItem(int devID, int index, Buffer data, int dataSize)

/**
 * sets custom name for mpx device <br>
 * [in] devID - medipix device identification <br>
 * [in] name - custom name for mpx device <br>
 *
 */
pixelman.mpxCtrlSetCustomName(int devID, String name)

/**
 * gets custom name for mpx device <br>
 * [in] devID - medipix device identification <br>
 * [out] name - custom name for mpx device <br>
 *
 */
pixelman.mpxCtrlGetCustomName(int devID, String[] name)

/**
 * try to locks medipix device for exclusive access <br>
 * [in] devID - medipix device identification <br>
 * [out] success - TRUE if locking was successful <br>
 * [in] timeout - how long wait (in ms) for lock in ms (if lock will not be successfull in timeout milliseconds, function will return MPXERR_LOCK_TIMEOUT) <br>
 *
 */
pixelman.mpxCtrlTryLockDevice(int devID, boolean[] success, long timeout)

/**
 * release locked device, MUST be called after each successful call to MpxCtrlTryLockDevice <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlReleaseDevice(int devID)

/**
 * [in] devID - medipix device identification <br>
 * [out] id - id of thread that currently owns medipix device lock <br>
 *
 */
pixelman.mpxCtrlGetLockOwnerID(int devID, long[] id)

/**
 * tries to revive selected device (e.g. after short disconnection) <br>
 * difference between MpxCtrlReviveMpxDeviceType and MpxCtrlInitMpxDeviceType is that init uses the same config as during start up ("safe values") while revive preserves current config (dacs, pix cfg, etc.) <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlReviveMpxDevice(int devID)

/**
 * saves current configuration of particular Medipix device to selected medipix configuration file <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - filepathname of medipix configuration file, can be NULL, if it is NULL default fileName (based on chipboard ID is used) <br>
 *
 */
pixelman.mpxCtrlSaveMpxCfg(int devID, String fileName)

/**
 * initialize particular Medipix device with values from medipix configuration file <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - filepathname of medipix configuration file, can be NULL, if it is NULL default fileName (based on chipboard ID is used) <br>
 *
 */
pixelman.mpxCtrlLoadMpxCfg(int devID, String fileName)

/**
 * saves current configuration as default one (this configuration is used as default <br>
 * for new devices which do not have their own cfgs files created yet) <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlSaveMpxCfgAsDefault(int devID)

/**
 * SET/GET ACQUISITION SETTING <br>
 * <br>
 * sets device specific acq. parameters <br>
 * [in] devID - medipix device identification <br>
 * [in] pars - pointer to structure describing mpx device-specific acq. settings (Mpx3SpecificAcqParams for Mpx3, unused for Mpx2) <br>
 * [in] size - structure size (for size check) <br>
 *
 */
pixelman.mpxCtrlSetDevSpecAcqPars(int devID, Buffer pars, long size)

/**
 * gets device specific acq. parameters <br>
 * [in] devID - medipix device identification <br>
 * [out] pars - pointer to structure describing mpx device-specific acq. settings (Mpx3SpecificAcqParams for Mpx3, unused for Mpx2) <br>
 * [in] size - structure size (for size check) <br>
 *
 */
pixelman.mpxCtrlGetDevSpecAcqPars(int devID, Buffer pars, long size)

/**
 * sets polarity of selected Medipix device <br>
 * [in] devID - medipix device identification <br>
 * [in] positive - TRUE for positive polarity, FALSE for negative <br>
 *
 */
pixelman.mpxCtrlSetPolarity(int devID, boolean positive)

/**
 * gets polarity setting for selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] positive - TRUE for positive polarity, FALSE for negative <br>
 *
 */
pixelman.mpxCtrlGetPolarity(int devID, boolean[] positive)

/**
 * sets acquisition mode for selected Medipix device <br>
 * [in] devID - medipix device identification <br>
 * [in] mode - acq. mode to set (check ACQMODE_MANUAL, ACQMODE_xxxx) <br>
 *
 */
pixelman.mpxCtrlSetAcqMode(int devID, int mode)

/**
 * gets currently selected acquisition mode for selected Medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] mode - current acq mode (check ACQMODE_MANUAL, ACQMODE_xxxx) <br>
 *
 */
pixelman.mpxCtrlGetAcqMode(int devID, int[] mode)

/**
 * selects which timer is used for selected Medipix device <br>
 * [in] devID - medipix device identification <br>
 * [in] state - MPXCTRL_HWTIMER_ENABLE, MPXCTRL_HWTIMER_DISABLE, MPXCTRL_HWTIMER_AUTO <br>
 *
 */
pixelman.mpxCtrlSetHwTimer(int devID, int state)

/**
 * gets HW timer setting <br>
 * [in] devID - medipix device identification <br>
 * [out] state - MPXCTRL_HWTIMER_ENABLE, MPXCTRL_HWTIMER_DISABLE, MPXCTRL_HWTIMER_AUTO (see definitions) <br>
 *
 */
pixelman.mpxCtrlGetHwTimer(int devID, int[] state)

/**
 * sets all DACs of all chips to default (typical for usage) values, depends on currently set polarity <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlSetDACsDefault(int devID)

/**
 * sets DACs of particular chip or all chips of certain device <br>
 * [in] devID - medipix device identification <br>
 * [in] dacVals - array of DAC values <br>
 * [in] size - size of array dacVals (should be number of DACs, 13 original, 14 MXR or numberOfDacs*number of chips if chipNumber == ALLCHIPS) <br>
 * [in] chipNumber - zero-based index of chip or ALLCHIPS (all chips values are set) <br>
 *
 */
pixelman.mpxCtrlSetDACs(int devID, short[] dacVals, int size, int chipNumber)

/**
 * gets DAC values for one chip of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] dacVals - output array for DAC values <br>
 * [in] size - size of array dacVals (should be number of DACs, 13 original, 14 MXR or numberOfDacs*number of chips if chipNumber == ALLCHIPS) <br>
 * [in] chipNumber - zero-based index of chip or ALLCHIPS (all chips values are gset) <br>
 *
 */
pixelman.mpxCtrlGetDACs(int devID, short[] dacVals, int size, int chipNumber)

/**
 * gets single DAC value of single chip or all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] dacVals - output for DAC analog values, size of array should be 1 for single value or numberOfChips to read from all chips (if its 2 or 2*numberOfChips, the second part will contain std. deviation of reading (if senseCount > 1)) <br>
 * [in] size - size of dacVals array (for size check) <br>
 * [in] dacNumber - number from DACS_ORDER specifying which DAC analog value should be read <br>
 * [in] chipNumber - zero-based index of chip or ALLCHIPS if dac value should be read from all chips <br>
 * [in] senseCount - number of sensing (to receive mean of senseCount values) <br>
 *
 */
pixelman.mpxCtrlGetSingleDACAnalog(int devID, double[] dacVals, int size, int dacNumber, int chipNumber, int senseCount)

/**
 * gets all DACs values from specified chip or from all chips  of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] dacVals - output array for DAC values, size has to be double[number of dacs] for single chip or le[numberOfChips*number of dacs] for all chips <br>
 * [in] size - size of dacVals array (for size check) <br>
 * [in] chipNumber - zero-based index of chip or ALLCHIPS if all the dacs values should be read from all chips <br>
 *
 */
pixelman.mpxCtrlGetDACsAnalog(int devID, double[] dacVals, int size, int chipNumber)

/**
 * sends last set DAC values to all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlRefreshDACs(int devID)

/**
 * sends last set DAC values to all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] names - *names is const array of names (const char *) of DACs of medipix chip <br>
 * [out] precisions - *precisions is const array of precisions of individual DACs in bits <br>
 * [out] size - *size of *names array, (e.g. 13 for normal mpx chip, 12 for MXR) <br>
 *
 */
pixelman.mpxCtrlGetDACsNames(int devID, StringArrayRef names, IntArrayRef precisions, int[] size)

/**
 * sets external DAC value <br>
 * [in] devID - medipix device identification <br>
 * [in] dacNumber - medipix DAC index that should be replaced by external DAC, -1 means that ext DAC is not used <br>
 * [in] value - value in V, the valid range and step can be obtained from DevInfo structure <br>
 *
 */
pixelman.mpxCtrlSetExtDAC(int devID, int dacNumber, double value)

/**
 * gets external DAC value <br>
 * [in] devID - medipix device identification <br>
 * [out] dacNumber - medipix DAC index that is currently overloaded by external DAC, -1 means ext DAC is not used <br>
 * [out] value - value in V <br>
 *
 */
pixelman.mpxCtrlGetExtDAC(int devID, int[] dacNumber, double[] value)

/**
 * sets pixels configurations of one selected chip or all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [in] pixCfgs - array of pixels configurations, PixelCfg for MPX_ORIG and MPX_MXR and TpxPixCfg for MPX_TPX, size should be MATRIX_SIZE for one selected chip or numberOfChips*MATRIX_SIZE for all chips mode <br>
 * [in] size - byte size of pixCfgs array (for size check) (e.g. MATRIX_SIZE*sizeof(PixelCfg) ) <br>
 * [in] chipNumber - zero-based number of selected chip or ALLCHIPS for "all chips mode" <br>
 *
 */
pixelman.mpxCtrlSetPixelsCfg(int devID, Buffer pixCfgs, int size, int chipNumber)

/**
 * gets pixels configurations of one selected chip or all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] pixCfgs - array for pixels configurations, PixelCfg for MPX_ORIG and MPX_MXR and TpxPixCfg for MPX_TPX, size should be MATRIX_SIZE for one selected chip or numberOfChips*MATRIX_SIZE for all chips mode <br>
 * [in] size - byte size of pixCfgs array (for size check) (e.g. MATRIX_SIZE*sizeof(PixelCfg) ) <br>
 * [in] chipNumber - zero-based number of selected chip or ALLCHIPS for "all chips mode" <br>
 *
 */
pixelman.mpxCtrlGetPixelsCfg(int devID, Buffer pixCfgs, int size, int chipNumber)

/**
 * resets pixels configurations (nothing masked, no test bits, adj bits 7) of one selected chip or all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or ALLCHIPS  for "all chips mode" <br>
 *
 */
pixelman.mpxCtrlResetPixelsCfg(int devID, int chipNumber)

/**
 * sets pixels configurations of all chips of selected medipix device from one "super matrix" (e.g. for quad 512x512) <br>
 * [in] devID - medipix device identification <br>
 * [in] pixCfgs - buffer of pix. cfgs <br>
 * [in] size - size of buffer <br>
 *
 */
pixelman.mpxCtrlSetSuperMatrixPixCfg(int devID, Buffer pixCfgs, int size)

/**
 * gets pixels configurations of all chips of selected medipix device in one "super matrix" <br>
 * [in] devID - medipix device identification <br>
 * [out] pixCfgs - output buffer for pix. cfgs <br>
 * [in] size - size of buffer for size-check <br>
 *
 */
pixelman.mpxCtrlGetSuperMatrixPixCfg(int devID, Buffer pixCfgs, int size)

/**
 * sends last set pixels cfgs to all chips of selected medipix device <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlRefreshPixelsCfg(int devID)

/**
 * sets masked pixels suppression <br>
 * the distance is given by spacing parameter (min 1, max 256) <br>
 * [in] devID - medipix device identification <br>
 * [in] suppress - if TRUE masked pixels are set 0 instead of taken value (suppress unmaskable pixels) <br>
 *
 */
pixelman.mpxCtrlSetSuppressMasked(int devID, boolean suppress)

/**
 * gets masked pixels suppression <br>
 * [in] devID - medipix device identification <br>
 * [out] suppress - gets settings of "masked suppression" <br>
 *
 */
pixelman.mpxCtrlGetSuppressMasked(int devID, boolean[] suppress)

/**
 * sets auto conversion of frame to "super matrix" for quad, enabled by default, useful to disable this for per chip operation <br>
 * [in] devID - medipix device identification <br>
 * [in] enable - if TRUE each frame is automatically converted to "super matrix" (512*512 matrix for quad) at the end (no effect for single) <br>
 *
 */
pixelman.mpxCtrlSetAutoConvToSM(int devID, boolean enable)

/**
 * gets settings of auto conversion of frame to "super matrix" for quad <br>
 * [in] devID - medipix device identification <br>
 * [out] enable - if TRUE each frame is automatically converted to "super matrix" (512*512 matrix for quad) at the end (no effect for single) <br>
 *
 */
pixelman.mpxCtrlGetAutoConvToSM(int devID, boolean[] enable)

/**
 * function for conversion of "chip by chip" frame to "super matrix" frame (for quad) <br>
 * [in] devID - medipix device identification <br>
 * [in] chipByChip - input buffer containing frame where data are in chip by chip order <br>
 * [out] superMatrix - output buffer for super matrix frame (frame contains proper image) <br>
 * [in] buffSize - size of buffer in bytes (for size check) <br>
 * [in] buffType - buffer types (allowed values - TYPE_I16, TYPE_I32, TYPE_DOUBLE) <br>
 *
 */
pixelman.mpxCtrlConvToSuperMatrix(int devID, byte[] chipByChip, Buffer superMatrix, long buffSize, int buffType)

/**
 * function for conversion of "super matrix" frame to "chip by chip" frame (for quad) <br>
 * [in] devID - medipix device identification <br>
 * [in] superMatrix - input buffer with super matrix frame (frame contains proper image) <br>
 * [out] chipByChip - output buffer containing frame in chip by chip order <br>
 * [in] buffSize - size of buffer in bytes (for size check) <br>
 * [in] buffType - buffer types (allowed values - TYPE_I16, TYPE_I32, TYPE_DOUBLE) <br>
 *
 */
pixelman.mpxCtrlConvFromSuperMatrix(int devID, byte[] superMatrix, Buffer chipByChip, long buffSize, int buffType)

/**
 * function for setting chips layout of matrix <br>
 * [in] devID - medipix device identification <br>
 * [in] width - width of matrix in chips <br>
 * [in] height - height of matrix in chips <br>
 * [in] chips - list of custom ordered chip numbers (position of chips in matrix). Chips are filled to matrix as follow: [row, column]=chips[i], e.g for Quad (2x2): [0,0]=chips[0], [0,1]=chips[1], [1,0]=chips[2], [1,1]=chips[3] <br>
 * [in] angles - list of rotation angles for each chip (0 = 0deg, 1 = 90deg, 2 = 180deg, 3 = 270deg) <br>
 * [in] createSubFrames - if TRUE, for each chip a subframe is created <br>
 *
 */
pixelman.mpxCtrlSetMatrixLayout(int devID, int width, int height, int[] chips, int[] angles, boolean createSubFrames)

/**
 * function for getting chips layout of matrix <br>
 * [in] devID - medipix device identification <br>
 * [out] width - width of matrix in chips <br>
 * [out] height - height of matrix in chips <br>
 * [out] chips - list of custom ordered chip numbers (position of chips in matrix). Chips are filled to matrix as follow: [row, column]=chips[i], e.g for Quad (2x2): [0,0]=chips[0], [0,1]=chips[1], [1,0]=chips[2], [1,1]=chips[3] <br>
 * [out] angles - list of rotation angles for each chip (0 = 0deg, 1 = 90deg, 2 = 180deg, 3 = 270deg) <br>
 * [out] createSubFrames - if TRUE, for each chip a subframe is created <br>
 *
 */
pixelman.mpxCtrlGetMatrixLayout(int devID, int[] width, int[] height, int[] chips, int[] angles, boolean[] createSubFrames)

/**
 * loads pixels configurations (mask bit, test bit, and 3-bit threshold adjustements) from "binary pixels configuration" file <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - file name path of binary file, if it is NULL default filename based on chipboard ID is used <br>
 * [in] loadDacs - if TRUE, DACs are loaded from "$fileName.dacs" <br>
 *
 */
pixelman.mpxCtrlLoadPixelsCfg(int devID, String fileName, boolean loadDacs)

/**
 * saves pixels configurations (mask bit, test bit, and 3-bit threshold adjustements) to "binary pixels configuration" file <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - file name path of binary file, can be NULL, if it is NULL default fileName (based on chipboard ID is used) <br>
 * [in] saveDacs - if TRUE, current DACs are saved to file "$fileName.dacs" <br>
 *
 */
pixelman.mpxCtrlSavePixelsCfg(int devID, String fileName, boolean saveDacs)

/**
 * loads pixels configurations (mask bit, test bit, and 3-bit threshold adjustements) from several ASCII files <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - file name path of ASCII file containing part of pix. cfg. <br>
 * [in] part - PIXCFG_XXX flag specifying which part of pix. cfg. ASCII file contains (mask bit, test bit, THL adj...) <br>
 * [in] loadDacs - if TRUE, DACs are loaded from "$fileName.dacs" <br>
 *
 */
pixelman.mpxCtrlLoadPixelsCfgAscii(int devID, String fileName, int part, boolean loadDacs)

/**
 * saves pixels configurations (mask bit, test bit, and 3-bit threshold adjustements) to several ASCII files <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - file name path for saving part of pix. cfg. <br>
 * [in] part - PIXCFG_XXX flag specifying which part of pix. cfg. should be save (mask bit, test bit, THL adj...) <br>
 * [in] saveDacs - if TRUE, current DACs are saved to file "$fileName.dacs" <br>
 *
 */
pixelman.mpxCtrlSavePixelsCfgAscii(int devID, String fileName, int part, boolean saveDacs)

/**
 * ACQUISITION CONTROL <br>
 * <br>
 * perform acquisition in frame mode <br>
 * [in] devID - medipix device identification <br>
 * [in] numberOfFrames - acquisition count <br>
 * [in] timeOfEachAcq - time of each acquistion in seconds <br>
 * [in] fileFlags - combinations of format flags (use bitwise or "|") for saving (FSAVE_BINARY, FSAVE_ASCII, FSAVE_I16, FSAVE_U32, FSAVE_DOUBLE, FSAVE_NODESCFILE), if fileFlags=0 frames are held in memory <br>
 * [in] fileName - basename of filename (if fileFlags is set properly), resulting file name is created by appending acquisition number to basename <br>
 * flags FSAVE_BINARY/FSAVE_ASCII and flags FSAVE_I16/FSAVE_U32/FSAVE_DOUBLE are mutually exclusive <br>
 *
 */
pixelman.mpxCtrlPerformFrameAcq(int devID, int numberOfFrames, double timeOfEachAcq, long fileFlags, String fileName)

/**
 * perform acquisition in integral mode <br>
 * [in] devID - medipix device identification <br>
 * [in] numberOfAcq - acquisition count <br>
 * [in] timeOfEachAcq - time of each acquistion in seconds <br>
 * [in] fileFlags - combinations of format flags (use bitwise or "|") for saving (FSAVE_BINARY, FSAVE_ASCII, FSAVE_I16, FSAVE_U32, FSAVE_DOUBLE, FSAVE_NODESCFILE) <br>
 * [in] fileName - filename (if fileFlags is set properly) to which integral frame will be automatically saved <br>
 *
 */
pixelman.mpxCtrlPerformIntegralAcq(int devID, int numberOfAcq, double timeOfEachAcq, long fileFlags, String fileName)

/**
 * perform test pulse acquisition <br>
 * [in] devID - medipix device identification <br>
 * [in] spacing - distance between nonmasked pixels (number of subacq. is spacing*spacing) <br>
 * [in] pulseHeight - height of pulses, double[1] for mpx2 (pulse height in [V]), double[2] for mpx3 (charge in [ke]) <br>
 * [in] period - period of pulses [s] (distance between pulses is same as length i.e. period/2) <br>
 * [in] pulseCount - number of pulses <br>
 * [in] manual - controls manual/automatic handling of spacing/ctpr, 0 = automatic, or pointer to column test pulse register, for MXR/TPX u32[1], for Mpx3 u32[8] <br>
 * [in] manualTPBits - if true test bit will be set ON in spacing algorithm only on pixels that have alreay test bit ON selected by user <br>
 *
 */
pixelman.mpxCtrlPerformTestPulseAcq(int devID, int spacing, double[] pulseHeight, double period, long pulseCount, long[] manual, boolean manualTPBits)

/**
 * perform full digital test (write random matrix, read it back and counts number of pixels where values agree) <br>
 * [in] devID - medipix device identification <br>
 * [out] goodPixels - number fo good pixels (custom, may be NULL) <br>
 * [out] frameID - if frameID is specified (custom, may be NULL), frame is created and its ID is stored in *frameID, caller is then responsible for closing frame <br>
 * [in] delay - delay between writing and reading matrix (in s) <br>
 *
 */
pixelman.mpxCtrlPerformDigitalTest(int devID, long[] goodPixels, int[] frameID, boolean show, double delay)

/**
 * abort operation in progress <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlAbortOperation(int devID)

/**
 * SW trigger for acq. start/stop; can be also used to prematurely terminate acq. in other modes than SW triggered <br>
 * [in] devID - medipix device identification <br>
 * [in] trigger - trigger type (TRIGGER_ACQSTART/TRIGGER_ACQSTOP) <br>
 *
 */
pixelman.mpxCtrlTrigger(int devID, int trigger)

/**
 * BUFFER CONTROL <br>
 * <br>
 * close opened frames <br>
 * [in] devID - medipix device identification <br>
 *
 */
pixelman.mpxCtrlCloseFrames(int devID)

/**
 * copy frame from last acquisition to supplied i16[] buffer, this functionality is availaible for all acquisition modes (even for acquisition to files) <br>
 * this function can be used for asynchronous access to buffer (e.g. during acquisition, so buffer for error message should be provided <br>
 * [in] devID - medipix device identification <br>
 * [out] buffer - supplied buffer for frame <br>
 * [in] size - size of buffer (for size-check) <br>
 * [in] frameNumber - zero-based index of frame <br>
 *
 */
pixelman.mpxCtrlGetFrame16(int devID, int[] buffer, long size, long frameNumber)

/**
 * copy frame from last acquisition to supplied u32[] buffer, this functionality is availaible for all acquisition modes (even for acquisition to files) <br>
 * this function can be used for asynchronous access to buffer (e.g. during acquisition, so buffer for error message should be provided <br>
 * [in] devID - medipix device identification <br>
 * [out] buffer - supplied buffer for frame <br>
 * [in] size - size of buffer (for size-check) <br>
 * [in] frameNumber - zero-based index of frame <br>
 *
 */
pixelman.mpxCtrlGetFrame32(int devID, long[] buffer, long size, long frameNumber)

/**
 * copy frame from last acquisition to supplied double[] buffer, this functionality is availaible for all acquisition modes (even for acquisition to files) <br>
 * this function can be used for asynchronous access to buffer (e.g. during acquisition, so buffer for error message should be provided <br>
 * [in] devID - medipix device identification <br>
 * [out] buffer - supplied buffer for frame <br>
 * [in] size - size of buffer (for size-check) <br>
 * [in] frameNumber - zero-based index of frame <br>
 *
 */
pixelman.mpxCtrlGetFrameDouble(int devID, double[] buffer, long size, long frameNumber)

/**
 * saves selected frame to file in various formats <br>
 * [in] devID - medipix device identification <br>
 * [in] fileName - filepathname of file, if output is set to multiple files (see flags parameter) this filename is a base name (final filename contains index suffix) <br>
 * [in] frameNumber - zero-based frame index, if frameNumber is ALLFRAMES all frames are saved <br>
 * [in] flags - bitwise combination of following flags: FSAVE_BINARY, FSAVE_ASCII, FSAVE_I16, FSAVE_U32, FSAVE_DOUBLE, FSAVE_NODESCFILE <br>
 * flags FSAVE_BINARY/FSAVE_ASCII and flags FSAVE_I16/FSAVE_U32/FSAVE_DOUBLE are mutually exclusive <br>
 *
 */
pixelman.mpxCtrlSaveFrame(int devID, String fileName, int frameNumber, long flags)

/**
 * retrieve value of attribute from selected frame <br>
 * [in] devID - medipix device identification <br>
 * [in] frameNumber - zero-based index of frame from last series of acquisition <br>
 * [in] name - name of attribute <br>
 * [out] value - output buffer for attribute <br>
 * [in/out] size - size of output buffer, if buffer is too small for data of selected attribute MPXERR_BUFFER_SMALL is returned and "size" contains required buffer size <br>
 * [out] type - type of attribute (may be 0 if caller do not want this information) <br>
 *
 */
pixelman.mpxCtrlGetFrameAttrib(int devID, int frameNumber, String name, Buffer value, long[] size, int[] type)

/**
 * converts frameNumber to frameID <br>
 * if frame acquisition was performed to file and therefore there is not corresponding frame registered in manager the new frame is created and registered <br>
 * [in] devID - medipix device identification <br>
 * [in] frameNumber - zero-based index of frame from last series of acquisition <br>
 * [out] frameID - id of corresponding frame <br>
 *
 */
pixelman.mpxCtrlGetFrameID(int devID, int frameNumber, int[] frameID)

/**
 * INFO FUNCTIONS <br>
 * <br>
 * gets info about device (interface+medipix) <br>
 * [in] devID - medipix device identification <br>
 * [out] devInfo - info structure describing capabilities of interface+medipix <br>
 *
 */
pixelman.mpxCtrlGetDevInfo(int devID, DevInfo devInfo)

/**
 * gives basic information about selected medipix device <br>
 * [in] devID - medipix device identification <br>
 * [out] numberOfChips - number of chips <br>
 * [out] numberOfRows - number of rows to which is chips are placed in <br>
 * [out] chipBoardID - chipboard ID <br>
 * [out] ifaceName - name of hardware interface (muros, usb,... ) which is used <br>
 *
 */
pixelman.mpxCtrlGetMedipixInfo(int devID, int[] numberOfChips, int[] numberOfRows, String[] chipBoardID, String[] ifaceName)

/**
 * provides information about acquisition (in progress or completed), (acqNumber, ...) pointers can be NULL <br>
 * [in] devID - medipix device identification <br>
 * [out] acqNumber - zero-based acqusition number <br>
 * [out] acqTotalCount - total number of acquisition which was ordered <br>
 * [out] acqType - type of acqusition (possible output values - MPXCTRL_ACQTYPE_FRAME, MPXCTRL_ACQTYPE_FRAME_FILE, MPXCTRL_ACQTYPE_INTEGRAL, MPXCTRL_ACQTYPE_INTEGRAL_FILE) <br>
 * [out] frameFilled - number of frames that are available from last serie (in integral mode - number of integrated frames) <br>
 *
 */
pixelman.mpxCtrlGetAcqInfo(int devID, int[] acqNumber, int[] acqTotalCount, int[] acqType, long[] frameFilled)

/**
 * gets info/error message for selected medipix device <br>
 * MpxCtrl library registeres several callback events (see MPXCTRL_CB_XXX) - one of this is MPXCTRL_CB_INFOMSG <br>
 * when important/error condition occurred this event is set and plugins registered for this event can call in callback function mpxCtrlGetInfoMsg function to obtain this info/error message <br>
 * [in] devID - medipix device identification <br>
 * [out] msgType - info/error code <br>
 * [out] msg - pointer to info/error message <br>
 *
 */
pixelman.mpxCtrlGetInfoMsg(int devID, int[] msgType, String[] msg)

/**
 * gets chip id of chip selected by index <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip <br>
 * [out] chipID - id of the chip <br>
 *
 */
pixelman.mpxCtrlGetChipID(int devID, int chipNumber, String[] chipID)

/**
 * adds a new chip/chipboard attribute <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [in] attribName - name of the new attribute <br>
 * [in] description - description of the new attribute <br>
 * [in] type - type of the attribute data (TYPE_I16, TYPE_U32, TYPE_DOUBLE, ...). Cannot be TYPE_STRING. <br>
 * [in] data - data of the attribute <br>
 * [in] count - number of data items (e.g. if type is TYPE_DOUBLE, it is number of double values in data buffer) <br>
 *
 */
pixelman.mpxCtrlAddChipAttrib(int devID, int chipNumber, String attribName, String description, int type, Buffer data, long count)

/**
 * gets data of chip/chipboard attribute <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [in] attribName - name of the attribute <br>
 * [in] data - buffer for attribute value. (may be NULL if use wants to check if attribute exists) <br>
 * [in/out] size - size of 'data' buffer in bytes, if 'data' buffer is not big enough MPXERR_BUFFER_SMALL is returned and size contains required size of buffer) <br>
 * [out] type - type of attribute (may be NULL if caller do not want this information) <br>
 *
 */
pixelman.mpxCtrlGetChipAttribData(int devID, int chipNumber, String attribName, Buffer data, long[] size, int[] type)

/**
 * locks chip/chipboard attribute and retrieves pointer to internal data buffer <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [in] attribName - name of the attribute <br>
 * [out] buffer - pointer to internal data buffer <br>
 * [out] byteSize - size (in bytes) of internal data buffer <br>
 * [out] type - type of attribute (may be NULL if caller do not want this information) <br>
 * [in] timeout - how long wait (in ms) for lock in ms (if lock will not be successfull in timeout milliseconds, function will return MPXERR_LOCK_TIMEOUT) <br>
 *
 */
pixelman.mpxCtrlGetLockedChipAttribDataBuff(int devID, int chipNumber, String attribName, ByteBufferRef buffer, long[] byteSize, int[] type, long timeout)

/**
 * unlocks chip/chipboard attribute (this function has to be called after successful MpxCtrlGetLockedChipAttribDataBuffType) <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [in] attribName - name of the attribute <br>
 *
 */
pixelman.mpxCtrlUnlockChipAttrib(int devID, int chipNumber, String attribName)

/**
 * sets data of chip/chipboard attribute <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [in] attribName - name of the attribute <br>
 * [in] data - data (value) of attribute <br>
 * [in] size - size of 'data' buffer in bytes <br>
 *
 */
pixelman.mpxCtrlSetChipAttribData(int devID, int chipNumber, String attribName, Buffer data, long size)

/**
 * removes chip/chipboard attribute <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [in] attribName - name of the attribute <br>
 *
 */
pixelman.mpxCtrlRemoveChipAttrib(int devID, int chipNumber, String attribName)

/**
 * gets first chip attribute. To enumerate chip attributes, this function has to be called first then <br>
 * function MpxCtrlGetNextChipAttribType has to be called to get next item. If return code is 0 then <br>
 * output parameters conaints information about chip attrib. To enumerate all atributes call the "next" function <br>
 * until the return code != 0 (is 1) <br>
 * [in] devID - medipix device identification <br>
 * [in] chipNumber - zero-based number of selected chip or -1 for chipboard attribute <br>
 * [out] itemID - pointer to "browse handle", do not change its value <br>
 * [out] attribName - name of the atribute <br>
 * [out] description - description of the attribute <br>
 * [out] type - type of the attribute <br>
 * [out] size - size of the attribute in bytes <br>
 *
 */
pixelman.mpxCtrlGetFirstChipAttrib(int devID, int chipNumber, long[] itemID, String[] attribName, String[] description, int[] type, long[] size)

/**
 * gets next chip attribute. To enumerate chip attributes, function MpxCtrlGetFirstAttributeType has to be called first then <br>
 * function MpxCtrlGetNextChipAttribType has to be called to get next item. If return code is 0 then <br>
 * output parameters conaints information about chip attrib. To enumerate all atributes call the "next" function <br>
 * until the return code != 0 (is 1) <br>
 * [in] devID - medipix device identification <br>
 * [in/out] itemID - pointer to "browse handle", do not change its value <br>
 * [out] attribName - name of the atribute <br>
 * [out] description - description of the attribute <br>
 * [out] type - type of the attribute <br>
 * [out] size - size of the attribute in bytes <br>
 *
 */
pixelman.mpxCtrlGetNextChipAttrib(int devID, long[] itemID, String[] attribName, String[] description, int[] type, long[] size)


