0% found this document useful (0 votes)
484 views

SDK Platform Programming Guide Dmed Series: Iray Technology (Shanghai) LTD

This document is the SDK Platform Programming Guide version A0 for the DMED series from iRay Technology. It provides an overview of the SDK release package, instructions for SDK integration and deployment, details on SDK interfaces including functions, commands, events, attributes, error codes and enums, and guidance on functionality implementation such as initialization, reading and writing detector ROM, application modes, and calibration.

Uploaded by

郑书毅
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
484 views

SDK Platform Programming Guide Dmed Series: Iray Technology (Shanghai) LTD

This document is the SDK Platform Programming Guide version A0 for the DMED series from iRay Technology. It provides an overview of the SDK release package, instructions for SDK integration and deployment, details on SDK interfaces including functions, commands, events, attributes, error codes and enums, and guidance on functionality implementation such as initialization, reading and writing detector ROM, application modes, and calibration.

Uploaded by

郑书毅
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Doc No.

903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 1

SDK Platform Programming Guide


DMED Series

Authors : Wei.You
Doc. No. : 903-341-87
Date : 2019-06-18
Version : A0
Status : Released
Project : N/A

1
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 2

Author Wei.You Inspector Pei.Li

Approver Haitao.Ning
Review Record
Department Participant Department Participant
Marketing Quality
Manufactory Service Youlin.Long

R&D Kaifeng.Yu Pre-production Liping.Pan

Laws&Regulat Wei.Pan Application Lishan.Zhao


ions consultant
Delivery Department

Department Department Department Department Department Others


R&D

Revision History

Version Revised by Checked by Approved by Description of changes


A0 Wei.You Pei.Li Haitao.Ning Draft edition

2
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 3

目录
1. Overview.......................................................................................................................................................... 4
2. SDK Release Package...................................................................................................................................... 6
2.1 Package Introduce.................................................................................................................................. 7
2.2 Package Structure...................................................................................................................................7
3. SDK Integration Guide.................................................................................................................................... 8
3.1 Interface Wrapper...................................................................................................................................8
3.2 Code Example...................................................................................................................................... 10
3.3 Deployment.......................................................................................................................................... 10
3.3.1 Binary Files........................................................................................................................................................ 10
3.3.2 Work Directory...................................................................................................................................................11
3.4 Runtime Generated File....................................................................................................................... 11
4. SDK Interface Detail......................................................................................................................................11
4.1 Functions.............................................................................................................................................. 12
4.2 Commands............................................................................................................................................20
4.3 Events................................................................................................................................................... 24
4.4 Attributes.............................................................................................................................................. 25
4.4.1 Attribute Group 1 – Normal............................................................................................................................... 25
4.4.2 Attribute Group 2 – Config Items...................................................................................................................... 27
4.4.3 Attribute Group 3 – User ROM..........................................................................................................................29
4.5 Error Codes.......................................................................................................................................... 32
4.6 Enums...................................................................................................................................................35
4.7 Data Struct............................................................................................................................................44
4.8 Configuration....................................................................................................................................... 46
4.9 Detector State Introduce...................................................................................................................... 46
4.10 Transaction......................................................................................................................................... 46
5. Functionality Implementation........................................................................................................................ 47
5.1 Initialization......................................................................................................................................... 47
5.1.1 Connect To Detector.......................................................................................................................................... 48
5.1.2 Initialization........................................................................................................................................................49
5.2 Read Write Detector ROM...................................................................................................................49
5.3 Application Mode.................................................................................................................................50
5.3.1 Application Mode file........................................................................................................................................ 50
5.3.2 Calibration subset............................................................................................................................................... 52
5.3.3 Application Mode switching.............................................................................................................................. 52
5.4 Calibration............................................................................................................................................52
5.4.1 PreOffset Template Generation..........................................................................................................................53
5.4.2 Gain+Defect Template Generation.................................................................................................................... 54
5.4.3 Upload and Download Calibrating Template.....................................................................................................55
5.4.4 Load Correction template...................................................................................................................................55
5.5 Image Acquisition................................................................................................................................ 57
5.5.1 SyncIn Synchronous Mode................................................................................................................................ 57
5.5.2 SyncOut Synchronous Mode..............................................................................................................................59
3
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 4

6. Multi-device connection................................................................................................................................ 60
6.1 Pleora communication..........................................................................................................................60
6.2 Fiber communication........................................................................................................................... 60
6.3 UDP communication............................................................................................................................60
7. Post Image Processing................................................................................................................................... 61
7.1 EMI.......................................................................................................................................................61
7.2 Individual Defect Correction............................................................................................................... 61
8. Appendix Acronym........................................................................................................................................ 62

1. Overview

4
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 5

iRay Technology Detector SDK is a software components suit based on dynamic


technology, providing an C-Language-Style interface for upper layer user application
integration purpose. It’s optional to use C/C++/C#/Delphi or other programming language to
integrate the iRay SDK.
Here is the system structure diagram:

Figure 1.1 System Structure

This document will introduce the SDK release package and guide the user how to
program with the lib, and will deep into the interface detail and major functionality logic
implementations. So that user application developers can start their work of integration with
iRay Detectors.
SDK can run on Windows XP/Windows 7/Windows 8/Windows10 or Linux(included
embed Linux), and requires computer memory 4 GB minimum. For Windows 7 (64bit) , SP1
must be installed.

5
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 6

The readers of this document are supposed to have fundamental knowledge of software
programming.

2. SDK Release Package

6
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 7

2.1 Package Introduce


iRay SDK is released as a file package in the CD which is shipped with the detector
product. The package contains three parts: dev, tools, and help. The ‘dev’ part is for
engineering development, include interface wrapper codes and other deploy resources from
iRay. The ‘tools’ part includes iRay tool software of detector controlling and the third party
programs which is prepared for runtime environment setup, such as Microsoft Visual
Redistributable Package. The ‘help’ part includes the help documents and example codes.

2.2 Package Structure

Figure 2.1 SDK Package Structure


 dev\cpp header files for C++ interface wrapper;
 dev\cs cs files for C# interface wrapper;
 dev\bin dynamic library files;
 dev\ work_dir detector work directory templates;
 tools\iDetector iRay detector controlling tool software;
 tools\env_setup Redistributable Package and other particular device drivers;
7
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 8

 help\doc help documents;


 help\example example codes;

3. SDK Integration Guide

3.1 Interface Wrapper

8
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 9

Although developers can coding without any wrapper based on the C-Style dynamic
library, it is still strong commented to use the interface wrapper from iRay for
high-efficiency development, C++ and C# codes are provided and the correction of all
definitions is guaranteed. Please specify ‘cdecl’ in the project property while referencing to
the SDK library except Linux x64 platform.
The following table lists C++ header files at dev\cpp folder.
Seq Header File Description
1 IRayFpdSys.h Major functions
2 IRayFpdSysEx.h Help functions
3 IRayVariant.h Data structures
4 IRayImage.h Image data definition
5 IRayCmdDef.h Commands
6 IRayEventDef.h Callbacks
7 IRayAttrDef.h Attributes
8 IRayEnumDef.h Enums
9 IRayErrDef.h Error codes

The following table lists C# files at dev\cs folder.


Seq C# File Description
1 IRayFpdSys.cs Major functions
2 IRayFpdSysEx.cs Help functions
3 IRayVariant.cs Data structures
4 IRayImage.cs Image data definition
5 IRayCmdDef.cs Commands
6 IRayEventDef.cs Callbacks
7 IRayAttrDef.cs Attributes
8 IRayEnumDef.cs Enums
9 IRayErrDef.cs Error codes
9
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 10

3.2 Code Example


This section demonstrates the SDK interface features and conceptions with a VC++
demo program. For other programming platform, the conceptions are also applicable.
These conceptions include:
 Load/Unload the dynamic library
 Get the interface function
 Create/Destroy detector objects
 Get/Set object attributes
 Task invoke
 SDK callback
 Multiple detectors system

Example codes locate in Help\examples\Cpp, or Help\examples\DotNet.

3.3 Deployment

3.3.1 Binary Files

iRay SDK dynamic library files shall be loaded at runtime, please copy these files to
one place which can be found by user application. For example:
 Windows version:
Application directory of user’s
Path of Windows\System32
Other directory which is added to Windows ‘Path’ environment variable
 Linux version:
/usr/lib
Add the path to LD_LIBRARY_PATH
System level runtime libraries should be installed before programming running, please

10
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 11

use the install packages in folder tools\env_setup.

3.3.2 Work Directory

Each detector has its own WorkDir (work directory), the full path of the work directory
should be provided for detector object creation, shown as section 3.2 in the example code. If
user application system connects multiple iRay detectors, multiple WorkDir should be
specified for the corresponding detector. Each WorkDir contents configuration files,
calibration data, log files and other files which are product type depended. SDK will use
these information for device connection, logic control and image correction.
The original WorkDir for a certain iRay detector product type can be found in the SDK
release package. WorkDir can be copied and deployed to any user specified path, note that
WorkDir and its contented files should be made writable after the deployment.

3.4 Runtime Generated File


Log file will be generated to WorkDir at runtime, named as ‘Detector.log’.
Calibration data files will be generated after calibration process completed, and the
generated data files will be saved to folder ‘\Correct\Default’ in WorkDir. If calibration
subset was specified, the generated file will be saved to corresponding folder instead of
‘Default’ folder.

4. SDK Interface Detail


11
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 12

4.1 Functions
This section will enumerate the entry library FpdSys exported functions by C language.
For function return value, Please refer to section 4.5 - Error Code.
For pre-defined enum, please refer to section 4.6 – Enum.
For pre-defined data struct, Please refer to section 4.7 - Struct.

Function list:
 int GetSDKVersion (char szVersion[32])
 int SetUserCode (char * pszUserCode)
 int GetAuthority (int *pAuthority)
 int RegisterScanNotify (FnNotifyScanResult pCallback)
 int ScanOnce (char *pszSourceIP)
 int GetProdCount (int *pCount)
 int GetProdList (ProdInfo pProdList[], int nCount)
 int GetErrInfo (int nErrorCode, ErrorInfo *pInfo)
 int GetEnumItemsCount (char *pszEnumTypeName, int *pCount)
 int GetEnumItemList (char *pszEnumTypeName, EnumItem pItemList[], int nCount)

 int Create (const char *pszWorkDir, FnCallback fpCallback, int *pDetectorID)


 int Destroy (int nDetectorID)
 int GetAttr (int nDetectorID, int nAttrID, IRayVariant *pVar)
 int SetAttr (int nDetectorID, int nAttrID, const IRayVariant *pVar)
 int Invoke (int nDetectorID, int nCommandID, IRayCmdParam pars[], int nParCount)
 int Abort (int nDetectorID)
 int GetAttrsCount (int nDetectorID, int *pCount)
 int GetAttrIDList (int nDetectorID, int pnIDList[], int nCount)
 int GetAttrInfo (int nDetectorID, int nAttrID, AttrInfo *pInfo)
 int GetCommandCount (int nDetectorID, int *pCount)
 int GetCommandInfoList (int nDetectorID, CmdInfo pCmdList[], int nCount)
 int GetCmdParamCount (int nDetectorID, int nCmdID, int *pCount)
 int GetCmdParamInfo (int nDetectorID, int nCmdID, CmdParamInfo pInfoList[], int nCount)

 int OpenDefectTemplateFile (const char *pszFilePath, void **ppHandler, unsigned short *pWidth,
unsigned short *pHeight, char **ppPoints, char **ppRows, char **ppCols, char **ppDualReadCols2)
 int SaveDefectTemplateFile (void *pHandler)
 int CloseDefectTemplateFile (void *pHandler)

Callback function definition:

12
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 13

 typedef void(*FnCallback)(int nDetectorID, int nEventID, int nEventLevel, const char* pszMsg, int
nParam1, int nParam2, int nPtrParamLen, void* pParam)

Function Detail:

int Abort (int nDetectorID)


Abort: Abort the current transation processing flow
Parameters:
nDetectorID [in] specify a detector
Returns:
0: succeed, Non-Zero: error code

int CloseDefectTemplateFile (void * pHandler)


CloseDefectTemplateFile: Close the opened defect template file
Parameters:
pHandler [in] the handler of the opened file
Returns:
0: succeed, Non-Zero: error code

int Create (const char * pszWorkDir, FnCallback fpCallback, int * pDetectorID)


Create: Create memory detector object, if work dir has been used, function call will return
error, together with the occuppied detector ID.
Parameters:
pszWorkDir [in] set the working directory for a certain flat panel device
fpCallback [in] set the function pointer for SDK event callback
pDetectorID [out] buffer to receive the created object ID
Returns:
0: succeed, Non-Zero: error code

int Destroy (int nDetectorID)


Destroy: Close the connection of specified detector and release the corresponding memory
object
Parameters:
nDetectorID [in] the ID of memory detector object
Returns:
0: succeed, Non-Zero: error code

int GetAttr (int nDetectorID, int nAttrID, IRayVariant * pVar)


GetAttr: Get attribute value
13
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 14

Parameters:
nDetectorID [in] specify a detector
nAttrID [in] specify an attribute for getting
pVar [out] buffer to receive the value
Returns:
0: succeed, Non-Zero: error code

int GetAttrIDList (int nDetectorID, int pnIDList[], int nCount)


GetAttrIDList: Query public attribute list, please call GetAttrsCount perviously to get the
size for result receiving buffer.
Parameters:
nDetectorID [in] specify a detector
nIDList [out] buffer to receive the result, each element of the array is an attribute ID
nCount [in] size of the buffer, must equals the result of "GetAttrsCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetAttrsCount

int GetAttrInfo (int nDetectorID, int nAttrID, AttrInfo * pInfo)


GetAttrInfo: Query the information of a certain attribute, the information include data type,
min/max value, display name..., even enum name for UI displaying.
Parameters:
nDetectorID [in] specify a detector
nAttrID [in] specify an attribute
pInfo [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetAttrsCount (int nDetectorID, int * pCount)


GetAttrsCount: Query the count of all public attributes
Parameters:
nDetectorID [in] specify a detector
pCount [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetCmdParamCount (int nDetectorID, int nCmdID, int * pCount)


GetCmdParamCount: Query the parameter count of a certain Command
Parameters:
14
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 15

nDetectorID [in] specify a detector


nCmdID [in] specify the Command
pCount [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetCmdParamInfo (int nDetectorID, int nCmdID, CmdParamInfo pInfoList[], int nCount)
GetCmdParamInfo: Query the parameter infomation list for a certain Command, please call
GetEnumItemsCount perviously to get the size for result receiving buffer.
Parameters:
nDetectorID [in] specify a detector
nCmdID [in] specify the Command
pInfoList [out] buffer to receive the result, each element of the array is an
CmdParamInfo struct
nCount [in] size of the buffer, must equals the result of "GetCmdParamCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetCmdParamCount

int GetCommandCount (int nDetectorID, int * pCount)


GetCommandCount: Query the count of SDK supported Commands
Parameters:
nDetectorID [in] specify a detector
pCount [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetCommandInfoList (int nDetectorID, CmdInfo pCmdList[], int nCount)


GetCommandInfoList: Query the Command list, please call GetCommandCount perviously
to get the size for result receiving buffer.
Parameters:
nDetectorID [in] specify a detector
pCmdList [out] buffer to receive the result
nCount [in] size of the buffer, must equals the result of "GetCommandCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetCommandCount

15
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 16

int GetEnumItemList (char * pszEnumTypeName, EnumItem pItemList[], int nCount)


GetEnumItemList: Query the element list of a certain Enum type, please call
GetEnumItemsCount perviously to get the size for result receiving buffer.
Parameters:
pszEnumTypeNam [in] specify the type name of the Enum
e
pItemList [out] buffer to receive the result, each element of the array is an EnumItem
struct
nCount [in] size of the buffer, must equals the result of "GetEnumItemsCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetEnumItemsCount

int GetEnumItemsCount (char * pszEnumTypeName, int * pCount)


GetEnumItemsCount: Query the element count of a certain Enum type, usually this function
is used while attribute value displaying if the value is an Enum.
Parameters:
pszEnumTypeNam [in] specify the type name of the Enum
e
pCount [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetErrInfo (int nErrorCode, ErrorInfo * pInfo)


GetErrInfo: Query information of a certain error by error code
Parameters:
nErrorCode [in] specify the error code
pInfo [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetAuthority(int *pAuthority)


GetAuthority: Get access level
Parameters:
pAuthority [out] 0x00000000: basic access, 0x11111111: full factory access
Returns:
0: succeed, Non-Zero: error code
See also:

16
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 17

Enm_Authority

int GetProdCount (int * pCount)


GetProdCount: Query the count of iRay Detector Products
Parameters:
pCount [out] buffer to receive the result
Returns:
0: succeed, Non-Zero: error code

int GetProdList (ProdInfo pProdList[], int nCount)


GetProdList: Query the product list, please call GetProdCount perviously to get the size for
result receiving buffer.
Parameters:
pProdList [out] buffer to receive the result
nCount [in] size of the buffer, must equals the result of "GetProdCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetProdCount

int GetSDKVersion (char pszVersion[32])


GetSDKVersion: Get IRay FPD SDK software version
Parameters:
pszVersion [out] buffer to receive the version infomation, for example "4.0.1.33"
(MainVer.Function.Fixing.Build)
Returns:
0: succeed, Non-Zero: error code

int Invoke (int nDetectorID, int nCommandID, IRayCmdParam pars[], int nParCount)
Invoke: Call SDK method using a pre-defined command ID, if "pending" returned, it means
an asynchronous task is started and the result will be callback later.
Parameters:
nDetectorID [in] specify a detector
nCommandID [in] specify an command for calling
pars [in] parameter list for a certain command
nParCount [in] the count of parameters
Returns:
0: succeed, Non-Zero: "pending state" or error code

17
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 18

int RegisterScanNotify (FnNotifyScanResult pCallback)


RegisterScanNotify: register the scanning result callback function
Parameters:
pCallback [in] callback function pointer, return the scan result from operation "Scan
once" or firmware pushed online notification.
Returns:
0: succeed, Non-Zero: error code

int ScanOnce (char * pszSourceIP)


ScanOnce: Start a broadcast scan to find reachable detectors, the result notification will be
returned with registered callback
Parameters:
pszIP [in] IP address of selected local network card, NULL or "0.0.0.0" means
broadcast all network cards
Returns:
0: succeed, Non-Zero: error code

int OpenDefectTemplateFile (const char * pszFilePath, void ** ppHandler, unsigned short *


pWidth, unsigned short * pHeight, char ** ppPoints, char ** ppRows, char ** ppCols, char **
ppDualReadCols2)
OpenDefectTemplateFile: Load the specified defect template file for editing
Parameters:
pszFilePath [in] file path
ppHandler [out] return the handler of the opened file
pWidth [out] return width of the image width
pHeight [out] return height of the image width
ppPoints [out] return defect point map of the detector, for each element 0 means normal,
1 means defect
ppRows [out] return defect row map of the detector, for each element 0 means normal,
1 means defect
ppCols [out] return defect column map of the detector, for each element 0 means
normal, 1 means defect , if ppDualReadCols2 not NULL, ppCols means defect
column map of the upper part
ppDualReadCols2 [out] only for the 'Dual-Read' detector, return defect column map of the bottom
part , NULL means not Dual-Read
Returns:
0: succeed, Non-Zero: error code

int SaveDefectTemplateFile (void * pHandler)


SaveDefectTemplateFile: Save the opened defect template file after editing

18
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 19

Parameters:
pHandler [in] the handler of the opened file
Returns:
0: succeed, Non-Zero: error code

int ScanOnce (char * pszSourceIP)


ScanOnce: Start a broadcast scan to find reachable detectors, the result notification will be
returned with registered callback
Parameters:
pszIP [in] IP address of selected local network card, NULL or "0.0.0.0" means
broadcast all network cards
Returns:
0: succeed, Non-Zero: error code

int SetAttr (int nDetectorID, int nAttrID, const IRayVariant * pVar)


SetAttr: Set attribute value
Parameters:
nDetectorID [in] specify a detector
nAttrID [in] specify an attribute for setting
pVar [in] variant to set
Returns:
0: succeed, Non-Zero: error code

int SetUserCode (char * pszUserCode)


SetUserCode: Set user code to obtain the authority specified by the license
Parameters:
pszUserCode [in] user code to match the license
Returns:
0: succeed, Non-Zero: error code

typedef void(*FnNotifyScanResult)(DetectorProfile* pDetectorProfile)


FnNotifyScanResult: Define scan result callback function declaration. To receive the
detector online scan result, user application should set a callback function pointer to SDK,
and the function pointer should meet this declaration specification.
Parameters:
pDetectorProfile [in] scan result data struct
Returns:
void

19
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 20

typedef void(*FnCallback)(int nDetectorID, int nEventID, int nEventLevel, const char*


pszMsg, int nParam1, int nParam2, int nPtrParamLen, void* pParam)
FnCallback: Define the event callback function declaration. To receive the event from
detectors, user application should set a callback function pointer to SDK, and the function
pointer should meet this declaration specification.
Parameters:
nDetectorID [in] the detector which fired the event
nEventID [in] event ID
nEventLevel [in] event level
pszMsg [in] string description for the event
nParam1 [in] parameter with the event, defined for a certain event
nParam2 [in] parameter with the event, defined for a certain event
nPtrParamLen [in] bytes count for pointer typed parameter, defined for a certain event
pParam [in] pointer typed parameter, defined for a certain event
Returns:
void

4.2 Commands
iRay SDK provides a series of user commands, and they can be expanded for new
functionality features, at the same time keep the interface a good stability. User application
dispatch commands by calling the interface function ‘Invoke’. The command execution may
be completed immediately and ‘Invoke’ returns Err_OK, if return value is Err_TaskPending
it means the specified task is just started, and SDK will notify the task result with a callback
Event asynchronously.
Command Description Parameters
Enm_LogLevel
Cmd_SetLogLevel Set Log Level
eLogLevel;

Cmd_Connect Start connect


Cmd_Disconnect Disconnect the detector
IVT_INT
nCorrectOption;
Cmd_SetCorrectOption Set correction option
(combination of
Enm_CorrectOption)
Set subset for calibration
Cmd_SetCaliSubset IVT_STR strSubset;
template files
Restart the detector
Cmd_Reset
Note:For dynamic products,

20
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 21

it’s necessary to invoke


Cmd_SetCaliSubset if you had
loaded offset,gain or defect
template after reset
Detector starts a clear
process, delay a certain
Cmd_ClearAcq
delay time and then start
frame acquisition.
Detector enter ‘Acquiring’
state, and wait images;
Note: This command is an
intelligent acquisition
Cmd_StartAcq
operation, SDK behaviors
depends on static/dynamic
mode, trigger/sync mode, and
continue frames setting.
Stop continues acquisition,
Cmd_StopAcq or close exposure window
while inner acquiring.
Force continues acquisition
even if not in dynamic mode
Cmd_ForceDarkContinuousAcq IVT_INT nFrames;
without exposure, for factory
diagnostic only.
Cmd_ReadUserROM The same result as
Cmd_ReadUserRAM, because ROM
is just used to initialize RAM
while startup and can't be
read directly.
Cmd_WriteUserROM Write FPD User ROM using
current attributes
(Attr_UROM_xxx_W).Detector
will remember the parameters
setting even after power off.
And, RAM will also be updated
with this command.
Notice:Cmd_ReadUserRAM will
be sent after this command
executed successfully, so
there are 2 events will be
return, 1st is
Cmd_WriteUserROM and 2nd is
Cmd_ReadUserRAM.
21
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 22

Cmd_ReadUserRAM Read FPD user RAM to


attributes (Attr_UROM_xxx)
Cmd_WriteUserRAM Write FPD User RAM using
current attributes
(Attr_UROM_xxx_W), note that
when the detector restart,
the parameters updating will
be recovered with ROM
setting.
Notice:same to
Cmd_WriteUserROM
Enm_FW_DeviceType

Cmd_UpdateFirmware Update firmware version eDevType;


IVT_STR strFilePath;

Read current detector


temperature to
Cmd_ReadTemperature
Attr_RdResult_T1 &
Attr_RdResult_T2
Read current detector
Cmd_ReadHumidity humidity to
Attr_RdResult_Humidity
Start offset template
Cmd_OffsetGeneration
generation
Start gain template
Cmd_GainInit
generation
IVT_INT
Select image from acquired
Cmd_GainSelectCurrent nGainPointIndex;
list
IVT_INT nImageIndex;
IVT_INT
Select all image from
Cmd_GainSelectAll nGainPointIndex;
acquired list
IVT_INT nTotalImages;

Generat gain template using


Cmd_GainGeneration
selected images
Start defect template
Cmd_DefectInit
generation
Load temporary image data IVT_INT nImageIndex;
Cmd_LoadTemporaryDefectFile
file from specified folder IVT_STR strFolder

Select image from acquired


Cmd_DefectSelectCurrent IVT_INT nImageIndex;
list
IVT_INT
Select all image from
Cmd_DefectSelectAll nDosePointIndex;
acquired list
IVT_INT

22
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 23

nTotalImageIndex;

Generat defect template using


Cmd_DefectGeneration
acquired images
Clean up generating process
Cmd_FinishGenerationProcess
after template created
Enm_FileTypes
eCaliFileType;
Download calibration file to
Cmd_DownloadCaliFile IVT_INT nMapIndex;
FPD
IVT_STR strFilePath;
IVT_STR strFileDesc;

Upload calibration file from Enm_FileTypes

FPD to PC, , image will be eCaliFileType;

Cmd_UploadCaliFile returned by Event IVT_INT nMapIndex;

Evt_TemplateFileDownload_Re IVT_STR

sult strNewFilePath;
Enm_FileTypes
Select calibration file to
Cmd_SelectCaliFile eCaliFileType;
use in FPD
IVT_INT nMapIndex;

Cmd_HwGeneratePreOffsetTempla Generate Pre-Offset template


te in hardware
update frequency composite
Cmd_UpdateFreqCompositeCoeff coefficient of offset
correction
Query hardware calibration Enm_FileTypes
Cmd_QueryHwCaliTemplateList
template file list from FPD eCaliFileType;

Do defect correction once


using defect template data
which has been loaded, and
corrected data will be filled
back. This command is only IVT_INT nWidth

used for some special kinds of IVT_INT nHeight

grid after the grid removing IPT_BLOCK pData


Cmd_ApplyDefectCorrection
processing. The parameter IVT_INT

nExposureLine is one of the nFreeSyncExposureLin

image properties of e

Evt_Image, and this parameter


must be set if Freesync mode
is used.

Change FPS of current IVT_INT nPGA


Cmd_ChangeParamsOfCurrentAppM
selected AppMode for dynamic IVT_INT nBinning
ode
detectors. Cmd_SetCaliSubset IVT_INT

23
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 24

should be invoked first to nSequenceIntervalT

selecting a AppMode. imeUs

Write specified field of


customized info to the panel
IPT_BLOCK pData;
Cmd_WriteCustomROM ROM, using mask to specify the
IPT_BLOCK pMask;
write-able area.(Totoal 512
bytes)
Read customized info from
panel ROM, Pending Task,
Cmd_ReadCustomROM
Return the data with
Evt_CustomROM

4.3 Events
This section introduces iRay SDK callback Events, about the declaration of callback
Events, please refers to the section 4.1 – Functions.
Note that:
 Pointer typed parameters data (Event parameter ‘pszMsg’ and ‘pParam’) should be
consumed in the life time of the callback function, because the previously allocated
memory may be released after the callback. Data deep copying is commented for
later usage.
 Don’t do synchronous Window painting operations because the event maybe
executed in other thread.
 Don’t do long time blocking operations to avoid inner timeout of SDK.

Event Description Parameters


Evt_GeneralInfo General Info
Evt_GeneralWarn General Warn nParam1: ErrorCode
Evt_GeneralError General Error nParam1: ErrorCode
Evt_TaskResult_Succeed Task succeed nParam1: CmdID
nParam1: CmdID
Evt_TaskResult_Failed Task failed
nParam2: ErrorCode
Evt_TaskResult_Canceled Task been canceled nParam1: CmdID
Task is started which is
not emitted by user
Evt_AutoTask_Started nParam1: CmdID
command, outer or AED image
acquiring will trigger

24
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 25

this event.
nParam1: CaliFileType
(Enm_FileTypes)
Return hardware
Evt_HwCaliTemplateList pParam: Pointer to a XML
calibration template list
string which contents a
list
Notify that current nParam1: eTransaction
Evt_TransactionAborted
transaction was aborted nParam2: nErrorCode
pParam: Pointer to a
Evt_Image Image received
IRayImage struct
Acqusition operation time
Evt_WaitImage_Timeout out(equal: Possiable Image nParam1: Milliseconds
Loss)
Evt_Exp_Prohibit Exposure prohibit
nParam1: Exposure
Evt_Exp_Enable Exposure enable
Window in Milliseconds
Report Process info while
Evt_ConnectProcess
connecting
Evt_CommFailure Communication failed nParam1: ErrorCode
Evt_TemperatureHigh Temperature too high
nParam1: 0 means Low, 1
Evt_FpsOutOfRange Fps too high or too low
means High
nParam1: CaliFileType
Calibration template file
Evt_TemplateOverDue (Enm_FileTypes)
over due
nParam2: Minutes

4.4 Attributes
Data accessing to a detector object is provided as ‘Attribute’. User application can
read/write config items, state, control variable, physical variable, and user-ROM data by
attributes. Interface function GetAttr/SetAttr is used for this purpose.
At ‘Access’ column in the table below, ‘R’ means read-only, ‘W’ means writable, ‘P’
means cannot access outside of SDK.

4.4.1 Attribute Group 1 – Normal

U
Ac
n
Attribute ce DataType Description
i
ss
t

25
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 26

Attr_Prod_Name R IVT_STR Product name


Attr_Prod_Descript
R IVT_STR Product description
ion
Attr_Prod_FullWidt
R IVT_INT Full width of the image
h
Attr_Prod_FullHeig
R IVT_INT Full height of the image
ht
Attr_Prod_BitDepth R IVT_INT Bit Depth, by bits (14, 16)
Attr_WorkDir R IVT_STR Work directory
Enm_Detec
Attr_State R State
torState
Enm_Conne
Attr_ConnState R ctionStat Hardware connection state
e
Attr_CurrentTask R IVT_INT Current task
Current transaction, such as gain template
Attr_CurrentTransa Enm_Trans
R generation or defect template generation
ction action
process
Attr_FsmState P IVT_INT Fsm state,just for factory developing diagnose
Attr_Width R IVT_INT Actually image width after binning zoom
Attr_Height R IVT_INT Actually image height after binning zoom
Enm_Autho
Attr_Authority P Authority level
rity
Enm_Conne
Attr_ConnState_Cmd
P ctionStat 0:break; 1:connected
Ch
e
Enm_Conne
Attr_ConnState_Img
P ctionStat Image channel state
Ch
e
Attr_FWUpdateProgr
R IVT_INT 0%~100%
ess
Attr_RdResult_T1 R IVT_FLT Detector inner temperature
Attr_RdResult_T2 R IVT_FLT Detector inner temperature
Attr_RdResult_Humi
R IVT_FLT Detector inner humidity
dity
Attr_CurrentSubset R IVT_STR Current selected data set name
Attr_CurrentCorrec
R IVT_INT Current correct option
tOption
Attr_OffsetValidit Enm_CaliD
R Offset template state
yState ataState
Attr_GainValidityS Enm_CaliD
R Gain template state
tate ataState
26
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 27

Attr_DefectValidit Enm_CaliD
R Defect template state
yState ataState
Attr_LagValiditySt Enm_CaliD
R Lag template state
ate ataState
Attr_OffsetTotalFr Total frames which needed for Offset
R IVT_INT
ames generation
Attr_OffsetValidFr Valid frames which is already prepared for
R IVT_INT
ames Offset generation
Attr_GainTotalFram
R IVT_INT Total frames which needed for Gain generation
es
Attr_GainValidFram Valid frames which is already prepared for Gain
R IVT_INT
es generation
Attr_DefectTotalFr Total frames which needed for Defect
R IVT_INT
ames generation
Attr_DefectValidFr Valid frames which is already prepared for
R IVT_INT
ames Defect generation

4.4.2 Attribute Group 2 – Config Items

Acc
Attribute DataType Unit Description
ess
WorkDir protocol
Cfg_ProtocolEdition R IVT_INT
edition
WorkDir product
Cfg_ProductNo R IVT_INT
number
Cfg_SN W IVT_STR WorkDir SN
Cfg_DetectorImp P IVT_STR Detector library
Cfg_ConnImp P IVT_STR Connection library
Cfg_CaliImp P IVT_STR Calibration library
Cfg_LogLevel R Enm_LogLevel Log level
Cfg_HostIP W IVT_STR Local IP
Cfg_HostPort W IVT_INT Local port
Cfg_RemoteIP P IVT_STR Detector IP
Cfg_RemotePort P IVT_INT Detector port
Pleora connect
Cfg_PleoraConnStr W IVT_STR
string
Cfg_PCIEBoardIndex W IVT_INT PCIE board index
Offset template
minut
Cfg_OffsetAlarmMinute W IVT_INT validity check
e
interval

27
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 28

Gain template
Cfg_GainAlarmTime W IVT_INT day validity check
interval
Defect template
Cfg_DefectAlarmTime W IVT_INT day validity check
interval
minut
Cfg_CaliValidity_PreWarnMinute W IVT_INT Pre-Warn minutes
e
Calibration
Cfg_CaliValidity_Enable W Enm_Switch template check
enable
Default selected
Cfg_DefaultSubset W IVT_STR
data set name
Default correct
Cfg_DefaultCorrectOption W IVT_INT
option
Defect statistical
Cfg_DefectStatistical_DummyTop P IVT_INT
dummy at top
Defect statistical
Cfg_DefectStatistical_DummyBottom P IVT_INT
dummy at bottom
Defect statistical
Cfg_DefectStatistical_DummyLeft P IVT_INT
dummy at left
Defect statistical
Cfg_DefectStatistical_DummyRight P IVT_INT
dummy at right
Delay time
Cfg_ClearAcqParam_DelayTime W IVT_INT ms parameter for
command ClearAcq
FPS checking
Cfg_FpsCheck_Enable P Enm_Switch
monitor enable flag
By
percent,e.g.value=
Cfg_FpsCheck_Tolerance P IVT_INT %
5 means tolerance is
5%
Firmware upgrade
Cfg_FWUpdTimeOut P IVT_INT s process timeout
value
Reset operation
Cfg_ResetTimeout P IVT_INT s
timeout value
Preview image
Cfg_PreviewImage_Enable W Enm_Switch
enable flag
Temperature high
Cfg_TemperatureHighThreshold P IVT_INT degC
threshold
Cfg_AllowMismatchSN P Enm_Switch Allow SN mismatch
28
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 29

while connecting
Firmware allowed
defect points while
hardware defect
Cfg_FwAllowedDefectPoints P IVT_INT
correction, it is
limited by FPGA
capability

4.4.3 Attribute Group 3 – User ROM

Acc Un
Attribute DataType Description
ess it
Attr_UROM_ProductNo R IVT_INT Product number
Attr_UROM_MainVersi
R IVT_STR Main version
on
Attr_UROM_ReadVersi
R IVT_STR Read version
on
Attr_UROM_MasterBui
R IVT_STR Master build date time
ldTime
Attr_UROM_SlaveBuil
R IVT_STR Slave build date time
dTime
Attr_UROM_Integrate
R IVT_INT us Integrate time
Time
Attr_UROM_ZoomMode R Enm_Zoom Zoom mode, Range[0~13]
Attr_UROM_SequenceI
R IVT_INT ms Time Gap for continuously sampling
ntervalTime
Attr_UROM_SequenceI
ntervalTime_HighPre R IVT_INT us Time gap for continuously sampling
cision
Attr_UROM_ExpMode R Enm_ExpMode Exposure mode
Attr_UROM_TriggerMo Enm_Trigger Trigger mode, work in static
R
de Mode mode,eg.AEC,Manual
Attr_UROM_ExpWindow
R IVT_INT ms Exposure window time, for static mode
Time
Attr_UROM_SyncExpTi
R IVT_INT ms Exposure window time, for dynamic mode
me
Attr_UROM_SyncExpTi
R IVT_INT us Exposure window time, for dynamic mode
me_HighPrecision
Attr_UROM_VT P IVT_FLT v Voltage
Attr_UROM_PGA R Enm_PGA PGA
Attr_UROM_FluroSync R Enm_FluroSy Fluro sync mode

29
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 30

nc
Attr_UROM_SrcPort R IVT_INT Detector port
Attr_UROM_SrcIP R IVT_STR Detector IP
Attr_UROM_SrcMAC R IVT_STR Detector MAC
Attr_UROM_DestPort R IVT_INT Local(eg.PC) port
Attr_UROM_DestIP R IVT_STR Local(eg.PC) IP
Attr_UROM_DestMAC R IVT_STR Local(eg.PC) MAC
Attr_UROM_AcquireDe Delay time from command receiving to
R IVT_INT ms
layTime acquirement action
Attr_UROM_BinningMo
R Enm_Binning Binning mode
de
Attr_UROM_AecMainTi
R IVT_INT ms Aec main time
me
Attr_UROM_DynaOffse
R IVT_INT ms Dyna offset gap
tGapTime
Attr_UROM_HvgXRayEn Enm_SignalL
R Hvg Xray enable
able evel
Enm_SignalL
Attr_UROM_HvgXRayOn R Hvg Xray on
evel
Attr_UROM_HvgXRaySy Enm_SignalL
R Hvg Xray sync out
ncOut evel
Attr_UROM_HvgXRaySy Enm_SignalL
R Hvg Xray sync in
ncIn evel
Attr_UROM_SerialNo R IVT_STR Serial number
Attr_UROM_ExpTimeVa
R IVT_INT % Exposure time valid percentage
lidPercent
Attr_UROM_PowSeries Enable or disable offset correction with
R Enm_Switch
CorrectEnable frequency composite coefficient
Attr_UROM_PulseClea
R IVT_INT Clear times before acquiring in pulse mode
rTimes
Attr_UROM_ROIColSta
R IVT_INT The begin column position of ROI
rtPos
Attr_UROM_ROIColEnd
R IVT_INT The end column position of ROI
Pos
Attr_UROM_ROIRowSta
R IVT_INT The begin row position of ROI
rtPos
Attr_UROM_ROIRowEnd
R IVT_INT The end row position of ROI
Pos
Attr_UROM_Integrate
W IVT_INT us Integrate time
Time_W
Attr_UROM_ZoomMode_
W Enm_Zoom Zoom mode
W
30
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 31

Attr_UROM_SequenceI
W IVT_INT ms Time Gap for continuouly sampling
ntervalTime_W
Attr_UROM_SequenceI
ntervalTime_HighPre W IVT_INT us Time gap for continuouly sampling
cision_W
Attr_UROM_PGA_W W Enm_PGA PGA
Attr_UROM_TriggerMo Enm_Trigger Trigger mode, work in static
W
de_W Mode mode,eg.AEC,Manual
Attr_UROM_ExpWindow
W IVT_INT ms Exposure window time, for static mode
Time_W
Attr_UROM_FluroSync Enm_FluroSy
W Fluro sync mode
_W nc
Attr_UROM_SrcIP_W W IVT_STR Src IP
Attr_UROM_SrcMAC_W W IVT_STR Src MAC
Attr_UROM_DestPort_
W IVT_INT Dest port
W
Attr_UROM_DestIP_W W IVT_STR Dest IP
Attr_UROM_DestMAC_W W IVT_STR Dest MAC
Attr_UROM_AcquireDe Delay time from command receiving to
W IVT_INT ms
layTime_W acquirement action
Attr_UROM_BinningMo
W Enm_Binning Binning mode
de_W
Attr_UROM_AecMainTi
W IVT_INT ms Aec main time
me_W
Attr_UROM_DynaOffse
W IVT_INT ms Dyna offset gap
tGapTime_W
Attr_UROM_HvgXRayEn Enm_SignalL
W Hvg Xray enable
able_W evel
Attr_UROM_HvgXRayOn Enm_SignalL
W Hvg Xray on
_W evel
Attr_UROM_HvgXRaySy Enm_SignalL
W Hvg Xray sync out
ncOut_W evel
Attr_UROM_HvgXRaySy Enm_SignalL
W Hvg Xray sync in
ncIn_W evel
Attr_UROM_ExpTimeVa
W IVT_INT % Exposure time valid percentage
lidPercent_W
Attr_UROM_PowSeries Enable or disable offset correction with
W Enm_Switch
CorrectEnable_W frequency composite coefficient
Attr_UROM_PulseClea
W IVT_INT Clear times in pulse mode
rTimes_W
Attr_UROM_ROIColSta
W IVT_INT The begin column position of ROI
rtPos_W
31
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 32

Attr_UROM_ROIColEnd
W IVT_INT The end column position of ROI
Pos_W
Attr_UROM_ROIRowSta
W IVT_INT The begin row position of ROI
rtPos_W
Attr_UROM_ROIRowEnd
W IVT_INT The end row position of ROI
Pos_W

4.5 Error Codes


This section provides the Error Code list, for diagnostic purpose. Return value of
interface functions is an error code, the parameter ‘nParam1’ in error-level event is also an
Error Code.

Error Description

Err_OK OK

Err_TaskPending Task pending

Err_Unknown Unknown error

Create detector or create workdir failed


Err_DuplicatedCreation
because already existed

Err_DetectorIdNotFound Detector ID not found

Err_StateErr State error

Err_NotInitialized Not initialized

Err_NotImplemented Function not implemented.

Err_AccessDenied Not permitted for interface operation

Err_LoadDllFailed Load dynamic library failed

Dynamic library loaded but create instance


Err_DllCreateObjFailed
failed
Open file failed, may be file not exist or
Err_OpenFileFailed
file access denied

Err_FileNotExist General error for "File not exist"

Err_ConfigFileNotExist Config file not exist

Err_TemplateFileNotExist Correction template file not exist

32
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 33

Correction Template file format or content


Err_TemplateFileNotMatch
not match

Err_InvalidFileFormat Invalid file format while parsing

Err_CreateLoggerFailed Open log file failed

Err_InvalidParamCount Invalid param count

Err_InvalidParamType Invalid param type

Err_InvalidParamValue Invalid param value

Err_PreCondition Pre-Condition not satisfied for a command

Err_TaskTimeOut Task timeout

ProdNo/ProtocolEdition from detector not


Err_ProdInfoMismatch
match with workdir configured item
Current connected Detector SN not match the
Err_DetectorSN_Mismatch one stored in workdir, calibration data may
be mistakenly used

Err_DetectorRespTimeout Wait detector response timeout

Err_InvalidPacketNo Invalid packet Number

Err_InvalidPacketFormat Invalid packet format

Packet data check failed, e.g. CheckSum


Err_PacketDataCheckFailed
failed

Err_PacketLost_BufOverflow Packet lost because buffer overflow

Err_FrameLost_BufOverflow Frame lost because buffer overflow

Err_ImgChBreak Image channel break

Err_BadImgQuality Bad image quality

Can not setup TCP/UDP connection, or


Err_GeneralSocketErr
connection broken

Err_DetectorNotFound Detector not found for certain SN

Err_CommDeviceNotFound Communication device not found

Err_CommDeviceOccupied Communication device is occupied

33
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 34

Err_CommParamNotMatch IP or other setting not match

Err_NotEnoughDiskSpace Not enough computer disk space

Err_NotEnoughMemorySpace Not enough computer memory space

Apply new firmware version failed after


Err_ApplyFirmwareFailed download completed while firmware
upgrading
Event callback not finished outside, the
Err_CallbackNotFinished
callback may be blocked by user code
Firmware updated, need power off|on and
Err_FirmwareUpdated
re-connect
Defect points is limited by FPGA capability
Err_TooMuchDefectPoints
while hardware defect correction selected
WorkDir path or correction-subset name too
Err_TooLongFilePath
long

Err_FPD_General_Detector_Error General detector error

Err_FPD_General_ControlBox_Error General control-box error

Err_FPD_General_FirmwareUpgrade_Error General firmware upgrade error

Err_FPD_General_GSensor_Error General G-Sensor error

FPD receives the cmd correctly, but there


Err_FPD_NotImplemented
is no such cmd in the cmd list

Err_FPD_SeqNoOutOfSync SeqNo is out of sync

Err_FPD_Busy Fpd busy

Err_FPD_Occupied Detector Occupied

Err_FPD_SleepWakeupFailed Detector Sleep/Wakeup Failed

Err_FPD_SleepCaptureError Sleep Capture Error

Err_FPD_CmdExecuteTimeout Command Execute Timeout Error

Firmware Fall-back occurs, SDK use


Err_FPD_FirmwareFallback Evt_GeneralError callback inform user at
first connection
The operation is not supported in current
Err_FPD_NotSupportInCurrMode
mode

34
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 35

Err_FPD_NoEnoughStorageSpace No enough storage space in FPD

Err_FPD_FileNotExist Can't open the specified file in FPD

Err_FPD_FtpServerAccessError FTP server access error

Can not do calibration because of template


Err_FPD_HWCaliFileError
file not ready

Err_Cali_GeneralError General error from calibration module

Image not fit for template generation


Err_Cali_UnexpectImage_DoseHighHigh
because of high dose or residual dose
Image not fit for template because of not
Err_Cali_UnexpectImage_ExpLineNotSatisfy
appropriate exposure time
Image received but not in expected trigger
Err_Cali_UnexpectImage_MistakeTrigger
mode or exposure request

Err_Cali_DataNotReadyForGen Need more image data for generation

Need more idle time after previous


Err_Cali_NotEnoughIntervalTime_OffsetTmpl acquisition for offset template
generation, ghost may exist in the image

4.6 Enums
enum IRAY_VAR_TYPE
{
IVT_INT = 0,
IVT_FLT = 1,
IVT_STR = 2,
};

enum IRAY_PARAM_TYPE
{
IPT_VARIANT = 0,
IPT_BLOCK = 100
};

enum Enm_EventLevel
{
Enm_EventLevel_Info = 0,
Enm_EventLevel_Warn = 1,
Enm_EventLevel_Error = 2,
Enm_EventLevel_Notify = 3,
};
35
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 36

enum Enm_LogLevel
{
Enm_LogLevel_Debug = 0,
Enm_LogLevel_Info = 1,
Enm_LogLevel_Warn = 2,
Enm_LogLevel_Error = 3,
Enm_LogLevel_Always = 4,
};

enum Enm_Authority
{
Enm_Authority_Basic = 0x0000,
Enm_Authority_RawImage = 0x0001,
Enm_Authority_Full = 0xFFFF,
};

enum Enm_Switch
{
Enm_Off = 0,
Enm_On = 1,
};

enum Enm_DetectorState
{
Enm_State_Unknown = 0,
Enm_State_Ready = 1,
Enm_State_Busy = 2,
Enm_State_Sleeping = 3,
};

enum Enm_Transaction
{
Enm_Transaction_Null = 0,
Enm_Transaction_GainGen = 1, // Generating Gain calibration templage
Enm_Transaction_DefectGen = 2, // Generating Defect calibration templage
};

enum Enm_ScannedState
{
Enm_ScannedState_NotFound = 0,
Enm_ScannedState_Occupy = 1,
Enm_ScannedState_Standby = 2,

36
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 37

};

enum Enm_ConnectionState
{
Enm_ConnState_Unknown = 0, // not initialized
Enm_ConnState_HardwareBreak = 1, // specified communication hardware can not find, or been
plugged out
Enm_ConnState_NotConnected = 2, // hardware exist but not ready for communication
Enm_ConnState_LowRate = 3, // connected but in bad situation
Enm_ConnState_OK = 4, // normal connected
};

enum Enm_Transaction
{
Enm_Transaction_Null = 0,
Enm_Transaction_GainGen = 1, // Generating Gain calibration templage
Enm_Transaction_DefectGen = 2, // Generating Defect calibration templage
};

enum Enm_ImageTag
{
Enm_ImageTag_Width = 0x0100, // Tiff tag: image width in pixels
Enm_ImageTag_Height = 0x0101, // Tiff tag: image height in pixels
Enm_ImageTag_BitsPerSample = 0x0102, // Tiff tag: bits per channel (sample)
Enm_ImageTag_Compression = 0x0103, // Tiff tag: data compression technique
Enm_ImageTag_PhotoMetric = 0x0106, // Tiff tag: photometric interpretation
Enm_ImageTag_Description = 0x010E, // Tiff tag: info about image
Enm_ImageTag_Maker = 0x010F, // Tiff tag: scanner manufacturer name
Enm_ImageTag_Model = 0x0110, // Tiff tag: scanner model name/number
Enm_ImageTag_StripOffsets = 0x0111, // Tiff tag: offsets to data strips
Enm_ImageTag_Orientation = 0x0112, // Tiff tag: image orientation
Enm_ImageTag_SamplePerPixel = 0x0115, // Tiff tag: samples per pixel
Enm_ImageTag_RowsPerStrip = 0x0116, // Tiff tag: rows per strip of data
Enm_ImageTag_StripByteCounts = 0x0117, // Tiff tag: bytes counts for strips
Enm_ImageTag_XResolution = 0x011A, // Tiff tag: pixels/resolution in x
Enm_ImageTag_YResolution = 0x011B, // Tiff tag: pixels/resolution in y
Enm_ImageTag_ResolutionUnit = 0x0128, // Tiff tag: units of resolutions
Enm_ImageTag_Software = 0x0131, // Tiff tag: name & release
Enm_ImageTag_DateTime = 0x0132, // Tiff tag: creation date and time
Enm_ImageTag_FrameNo = 0x8001, // Extern tag:
Enm_ImageTag_Temperature = 0x8002, // Extern tag:
Enm_ImageTag_RealFrequency = 0x8003, // Extern tag:
Enm_ImageTag_ExposureDelay = 0x8004, // Extern tag:

37
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 38

Enm_ImageTag_AcquireTime = 0x8005, // Extern tag:


Enm_ImageTag_KV = 0x8006, // Extern tag:
Enm_ImageTag_MA = 0x8007, // Extern tag:
Enm_ImageTag_MS = 0x8008, // Extern tag:
Enm_ImageTag_SID = 0x8009, // Extern tag:
Enm_ImageTag_Dose = 0x800A, // Extern tag:
Enm_ImageTag_ExposureLine = 0x800B, // Extern tag:
Enm_ImageTag_CorrectFlag = 0x800C, // Extern tag:
Enm_ImageTag_BinningMode = 0x800D, // Extern tag:
Enm_ImageTag_XRayWindow = 0x800E, // Extern tag:
Enm_ImageTag_FrameRate = 0x800F, // Extern tag:
Enm_ImageTag_BodyPartSection = 0x8010, // Extern tag:
Enm_ImageTag_BodyPart = 0x8011, // Extern tag:
Enm_ImageTag_DoseRate = 0x8012, // Extern tag:
Enm_ImageTag_AvgValue = 0x8013, // Extern tag:
Enm_ImageTag_CenterValue = 0x8014, // Extern tag:
Enm_ImageTag_ImageQualityNG = 0x8015, // Extern tag: Image quality not good,
// caused by Long-delay-time, vibration, or invalid
// correction, etc.
Enm_ImageTag_LagPositionNG = 0x8016, // Extern tag: Exposure time not good for lag
// calibration template image
Enm_ImageTag_Annotation = 0xA001, // Extern tag:
Enm_ImageTag_FirmwareVer = 0xA002, // Extern tag:
Enm_ImageTag_SoftwareVer = 0xA003, // Extern tag:
Enm_ImageTag_FpdSerialNo = 0xA004, // Extern tag:
Enm_ImageTag_Filter = 0xA005, // Extern tag:
Enm_ImageTag_CheckID = 0xA006, // Extern tag:
Enm_ImageTag_PatientID = 0xA007, // Extern tag:
Enm_ImageTag_PatientName = 0xA008, // Extern tag:
Enm_ImageTag_PatientGender = 0xA009, // Extern tag:
Enm_ImageTag_PatientAge = 0xA00A, // Extern tag:
Enm_ImageTag_PatientWeight = 0xA00B, // Extern tag:
Enm_ImageTag_PatientHeight = 0xA00C, // Extern tag:
Enm_ImageTag_PatientSize = 0xA00D, // Extern tag:
};

enum Enm_TriggerMode
{
Enm_TriggerMode_Outer = 0,
Enm_TriggerMode_Inner = 1,
Enm_TriggerMode_Soft = 2,
Enm_TriggerMode_Prep = 3,
Enm_TriggerMode_Service = 4,

38
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 39

Enm_TriggerMode_FreeSync = 5,
};

enum Enm_Binning
{
Enm_Binning_Null = 0, // No binning
Enm_Binning_1 = 1, // 2x2 binning
Enm_Binning_2 = 2, // 4x4 binning
Enm_Binning_3 = 3, // 3x3 binning
Enm_Binning_1x2 = 129, //1x2 binning
};

enum Enm_Zoom
{
Enm_Zoom_Null = 0, // No zoom
Enm_Zoom_1024x640 = 1,
Enm_Zoom_1024x320 = 2,
Enm_Zoom_1024x4 = 3,
Enm_Zoom_1024x2 = 4,
Enm_Zoom_1024x1 = 5,
Enm_Zoom_512x512 = 6,
Enm_Zoom_256x256 = 7,
Enm_Zoom_3072x3072 = 8,
Enm_Zoom_2048x2048 = 9,
Enm_Zoom_1536x1536 = 10,
Enm_Zoom_1024x1024 = 11,
};

enum Enm_ReXferMode
{
Enm_ReXferMode_Null = 0,
Enm_ReXferMode_Packet = 1,
Enm_ReXferMode_Frame = 2,
};

enum Enm_CorrectOption
{
Enm_CorrectOp_HW_PreOffset = 0x0001,
Enm_CorrectOp_HW_PostOffset = 0x0002,
Enm_CorrectOp_HW_Gain = 0x0004,
Enm_CorrectOp_HW_MostGain = 0x0008,
Enm_CorrectOp_HW_Defect = 0x0010,
Enm_CorrectOp_HW_Ghost = 0x0020,

39
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 40

Enm_CorrectOp_HW_Lag = 0x0040,
Enm_CorrectOp_HW_MicroPhony = 0x0080,
Enm_CorrectOp_SW_PreOffset = 0x00010000,
Enm_CorrectOp_SW_PostOffset = 0x00020000,
Enm_CorrectOp_SW_Gain = 0x00040000,
Enm_CorrectOp_SW_MostGain = 0x00080000,
Enm_CorrectOp_SW_Defect = 0x00100000,
Enm_CorrectOp_SW_Ghost = 0x00200000,
Enm_CorrectOp_SW_Lag = 0x00400000,
Enm_CorrectOp_SW_MicroPhony = 0x00800000,
};

enum Enm_SubProductNo
{
Enm_SubProductNo_GoS = 0,
Enm_SubProductNo_CsI = 1,
Enm_SubProductNo_CsI400 = 2,
Enm_SubProductNo_CsI550 = 3,
};

enum Enm_SignalLevel
{
Enm_SignalLevel_Low = 0,
Enm_SignalLevel_High = 1,
};

enum Enm_FluroSync
{
Enm_FluroSync_FreeRun = 0,
Enm_FluroSync_SyncIn = 1,
Enm_FluroSync_SyncOut = 2,
};

enum Enm_PGA
{
Enm_PGA_0 = 0,
Enm_PGA_1 = 1,
Enm_PGA_2 = 2,
Enm_PGA_3 = 3,
Enm_PGA_4 = 4,
Enm_PGA_5 = 5,
Enm_PGA_6 = 6,
Enm_PGA_7 = 7,

40
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 41

Enm_PGA_8 = 8,
Enm_PGA_9 = 9,
};

enum Enm_HWOffsetType
{
Enm_OffsetType_Null = 0,
Enm_OffsetType_Post = 1,
Enm_OffsetType_Pre = 2,
};

enum Enm_ExpMode
{
Enm_ExpMode_Null = 0x00,
Enm_ExpMode_Manual = 0x01,
Enm_ExpMode_AEC = 0x02,
Enm_ExpMode_Flush = 0x03,
Enm_ExpMode_Manual2 = 0x04,
Enm_ExpMode_Pulse = 0x80,
Enm_ExpMode_Continous = 0x81,
Enm_ExpMode_Linewise = 0x82,
};

enum Enm_PrepCapMode
{
Enm_PrepCapMode_ClearAcq = 0,
Enm_PrepCapMode_Acq2 = 1,
};

enum Enm_OutModeCapTrig
{
Enm_OutModeCapTrig_X_ON = 0,
Enm_OutModeCapTrig_Prep = 1,
};

enum Enm_ImgChType
{
Enm_ImgCh_Ethernet = 0,
Enm_ImgCh_Cameralink = 1,
Enm_ImgCh_GigeVision = 2,
};

enum Enm_EthernetProtocol

41
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 42

{
Enm_Ethernet_UDP = 0,
Enm_Ethernet_TCP = 1,
};

enum Enm_FW_DeviceType
{
Enm_FW_DeviceType_MainFPGA = 0x01,
Enm_FW_DeviceType_ReadFPGA1 = 0x02,
Enm_FW_DeviceType_ReadFPGA2 = 0x03,
Enm_FW_DeviceType_ControlBox = 0x04,
Enm_FW_DeviceType_MCU1 = 0x10,
Enm_FW_DeviceType_AllInOne = 0xF0,
Enm_FW_DeviceType_None = 0xFF,
};

enum Enm_CaliDataState
{
Enm_CaliDataState_NoData = 0,
Enm_CaliDataState_Valid = 1,
Enm_CaliDataState_ValidWarn = 2,
Enm_CaliDataState_Invalid = 3,
};

enum Enm_NetworkInterface
{
Enm_NetworkInterface_Unknown = 0,
Enm_NetworkInterface_Cable = 1,
Enm_NetworkInterface_Wifi = 2,
};

enum Enm_FileTypes
{
Enm_File_Offset = 0x01,
Enm_File_Gain = 0x02,
Enm_File_MostGain = 0x03,
Enm_File_Defect = 0x04,
Enm_File_Lag = 0x05,
Enm_File_ArmLog = 0xA0,
Enm_File_Firmware = 0xA1,
};

enum Enm_ProdType

42
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 43

{
Enm_Prd_Venu1717F = 0x0001, //Venu1717F
Enm_Prd_Mercu0909F = 0x0006, //Mercu0909F
Enm_Prd_Mammo1012F = 0x000B, //Mammo1012F
Enm_Prd_NDT0505F = 0x000C, //NDT0505F
Enm_Prd_Venu1417W = 0x0016, //Venu1417W
Enm_Prd_Senu1417P = 0x001C, //Senu1417P
Enm_Prd_Venu1717M2 = 0x001D, //Venu1717M2
Enm_Prd_Penu1417P = 0x0019, //Penu1417P
Enm_Prd_Mars1417V = 0x0020, //Mars1417V1
Enm_Prd_Penu1417P_plus = 0x0021, //Penu1417P_plus
Enm_Prd_Mars1717V = 0x0025, //Mars1717V1
Enm_Prd_Venu1717MF = 0x0026, //Venu1717MF
Enm_Prd_Sars1417 = 0x0027, //Sars1417
Enm_Prd_Mars1417X = 0x002A, //Mars1417X
Enm_Prd_Mars1717XU = 0x002D, //Mars1717XU
Enm_Prd_Pluto0406X = 0x002E, //Pluto0406X
Enm_Prd_Jupi1717X = 0x002F, //Jupi1717X
Enm_Prd_Mars1012V = 0x0029, //Mars1012V
Enm_Prd_Mercu1717V = 0x0030, //Mercu1717V
Enm_Prd_Mercu1616TE = 0x0031, //Mercu1616TE
Enm_Prd_Mercu1616VE = 0x0032, //Mercu1616VE
Enm_Prd_Mars1717XF = 0x0033, //Mars1717XF
Enm_Prd_Mars1417XF = 0x0034, //Mars1417XF
Enm_Prd_Mars1717X = 0x0035, //Mars1717X
Enm_Prd_NDT0909M = 0x0038, //NDT0909M
Enm_Prd_Venu1717MN = 0x003A, //Venu1717MN
Enm_Prd_Mars1417V2 = 0x003B, //Mars1417V2
Enm_Prd_Venu1012V = 0x003C, //Venu1012V
Enm_Prd_NDT1012MA = 0x003D, //NDT1012MA
Enm_Prd_Mars1717V2 = 0x003E, //Mars1717V2
Enm_Prd_NDT1012M = 0x0040, //NDT1012M
Enm_Prd_NDT1616HE = 0x0041, //NDT1616HE
Enm_Prd_Jupi1012X = 0x0042, //Jupi1012X
Enm_Prd_NDT0505J = 0x0044, //NDT0505J
Enm_Prd_Venu1717X = 0x0048, //Venu1717X
Enm_Prd_Jupi0505X = 0x0049, //Jupi0505X
Enm_Prd_Jupi0606X = 0x004A, //Jupi0606X
Enm_Prd_Mercu1616TN = 0x004B, //Mercu1616TN
Enm_Prd_Venu1717MX = 0x0050, //Venu1717MX
Enm_Prd_Mars1417V3 = 0x0055, //Mars1417V3
Enm_Prd_Pluto0900X = 0x0057, //Pluto0900X
Enm_Prd_Venu1012VD = 0x0058, //Venu1012VD

43
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 44

Enm_Prd_Jupi1212X = 0x005A, //Jupi1212X


Enm_Prd_Venu1717XV = 0x005B, //Venu1717XV
Enm_Prd_Mars1717V3 = 0x005C, //Mars1717V3
Enm_Prd_Luna1417XM = 0x005D, //Luna1417XM
Enm_Prd_Mercu1717V1 = 0x0060, //Mercu1717V1
Enm_Prd_Pluto0900X1 = 0x0061, //Pluto0900X1
Enm_Prd_NDT1012LA = 0x0062, //NDT1012LA
Enm_Prd_Jupi1216X = 0x0063, //Jupi1216X
Enm_Prd_Mars1417XM = 0x0065, //Mars1417XM
Enm_Prd_Jupi0606X1 = 0x0066, //Jupi0606X1
Enm_Prd_Pluto0600X = 0x0068, //Pluto0600X
Enm_Prd_NDT1717M = 0x006C, //NDT1717M
Enm_Prd_Pluto0001X = 0x006F, //Pluto0001X
Enm_Prd_Mars1717VS = 0x0077, //Mars1717VS
Enm_Prd_Venu1717XS = 0x0079, //Venu1717XS
Enm_Prd_NDT0900P = 0x007D, //NDT0900P
Enm_Prd_Mars1417VK = 0x0080, //Mars1417VK
Enm_Prd_NDT0505J1 = 0x0082, //NDT0505J1
Enm_Prd_NDT0406P = 0x0083, //NDT0406P
Enm_Prd_Pluto0406X_CSM = 0x0085, //Pluto0406X_CSM
Enm_Prd_Jupi0506X = 0x0087, //Jupi0506X
Enm_Prd_NDT0202M = 0x0088, //NDT0202M
};

4.7 Data Struct


Note: Data structs in the SDK interface are all declared with 1 byte alignment format.
typedef struct _tagIRayVariant
{
enum IRAY_VAR_TYPE vt;
struct
{
int nVal;
float fVal;
char strVal[IRAY_MAX_STR_LEN];
}val;
}IRayVariant;

enum IRAY_PARAM_TYPE
{
IPT_VARIANT = 0,
IPT_BLOCK = 100
};

44
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 45

typedef struct _tagIRayDataBlock


{
unsigned uBytes;
void* pData;
}IRayDataBlock;

typedef struct _tagIRayCmdParam


{
enum IRAY_PARAM_TYPE pt;
IRayVariant var;
IRayDataBlock blc;
}IRayCmdParam;

typedef struct _tagIRayVariantMapItem


{
int nMapKey;
IRayVariant varMapVal;
}IRayVariantMapItem;

typedef struct _tagIRayVariantMap


{
int nItemCount;
IRayVariantMapItem* pItems;
}IRayVariantMap;

typedef struct _tagIRayImage


{
int nWidth;
int nHeight;
int nBytesPerPixel;
unsigned short* pData;
IRayVariantMap propList;
}IRayImage;

typedef struct _tagDetectorProfile


{
int nProdNo;
int nSubProdNo;
char szSN[64];
char szIP[64];
char szDetConfig[512];
Int bDetState;// 0:not busy, 1:busy

45
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 46

}DetectorProfile;

4.8 Configuration
Each detector object has its own config file, named as ‘config.ini’ and located in its
WorkDir.
Please refer to section 4.4.2 for the config items. The config item value will be loaded
from the config file and can be accessed by GetAttr/SetAttr. User application can read item
value which is marked as ‘W’ or ‘R’, and can modify the item value which is marked ‘W’,
SDK will save the modification to config file automatically.

4.9 Detector State Introduce


Detector state is provided as an attribute ‘Attr_State’, the state value is defined using
Enm_DetectorState. Here is the introduction of each state:
 Unknown – The detector object is created but not connected, so the device state is
unknown. Device independent operations are allowed such as read/write config and
open local defect files. Also, start a scan process is allowed.
 Ready – The detector is connected and is ready for device operations. Such as
read/write detector ROM, image acquisition, or calibration.
 Busy – The detector object is executing a task.
Here is the state diagram of detector object:

Figure 4.9 Detector State Diagram

4.10 Transaction
Transaction is a kind of task which needs multiple interaction steps between user
application and SDK. Two transactions are defined, they are Gain template generation
46
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 47

process and Defect template generation process (See 4.6 Enums :Enm_Transaction).
Current transaction which is in processing can be gotten via attribute
Attr_CurrentTransaction.
 Gain template generation transaction is began by invoking Cmd_GainInit and
ended by invoking Cmd_FinishGenerationProcess;
 Defect template generation transaction is began by invoking Cmd_DefectInit and is
ended by invoking Cmd_FinishGenerationProcess;
Transaction can be cancelled by user application via calling Abort() function (See 4.1
Functions : Abort), and Evt_TransactionAborted would be fired by SDK to notify that
aborting is finished, this event will also be fired when the transaction is cancelled
exceptionally, such as the communication to the detector is totally broken, in this situation
the current transaction processing logic at user application level should also be stopped.

5. Functionality Implementation

5.1 Initialization
47
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 48

5.1.1 Connect To Detector

Figure 5.1.1 Create and Destroy Detector Connection

48
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 49

5.1.2 Initialization

Figure 5.1.2 initialization

5.2 Read Write Detector ROM

49
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 50

Figure 5.2.1 Read and Write Detector ROM

5.3 Application Mode


The application mode consist of PGA,Binning Zoom(if existed), Frequency, Exposure Mode.

5.3.1 Application Mode file

The application mode can be configured in DynamicApplicationMode.ini, which is located in the


50
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 51

path workdir. User can add or modify the application mode.


DynamicApplicationMode.ini are as follows:
[ApplicationMode1]
PGA=0
Binning=0
Zoom=0
Frequency=10
ExposureMode=129
Subset=ABC

[ApplicationMode2]
PGA=0
Binning=0
Zoom=0
Frequency=5
ExposureMode=129
Subset=XYZ

[ApplicationMode3]
PGA=2
Binning=0
Zoom=0
Frequency=20
ExposureMode=129
Subset= 123

The section name must consist of “ApplicationMode” and a number which starts at 1 and continues.
The value of Subset should be uniqueness. The template files are stored in the subset directory.
Different ApplicatioMode can share the gain and defect template if the attribute PGA, Binning and
Zoom(if existed) are same.The Subset should be set to XYZ-A and XYZ-B to sharing the template,now
the template files are stored in the directory XYZ. The suffix A or B can be any characters.
Exposure Mode Description
1 Manual
(it apply to Mercu1717V)

2 AEC
(it apply to Mercu1717V)

51
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 52

3 Flush
(it apply to Mercu1717V)

128 Pulse
129 Continues
130 Linewise

5.3.2 Calibration subset

The template data will be stored in or loaded from the subset directory, which will be set by command
Cmd_SetCaliSubset(strSubset), the absolute path of template files is workdir/Correct/strSubset.And
the parameter strSubset should be one of the ApplicationModes’ Subset.

5.3.3 Application Mode switching

The application mode can be switched through the command Cmd_SetCaliSubset, and the attributes
PGA, Binning, Zoom, Frequency and Exposure Mode will be apply to device.
The SW correction data will be reloaded if the corresponding template files are existed, or the
corresponding correction value will be remove from the attribute Attr_CurrentCorrectOption.

5.4 Calibration
Calibration template file must be generated before the normal image acquisition, and
the corresponding correction option must be set.

52
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 53

5.4.1 PreOffset Template Generation

Figure 5.4.1 PreOffset Template Generation


53
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 54

 It’s recommended that PreOffset Template should be updated periodically. If


conditions permit, it should be updated before collection images.
 Sample code is located in
Help\examples\Cpp(DotNet)\Dynamic_GenerateOffsetTemplate

5.4.2 Gain+Defect Template Generation

Figure 5.4.2 Gain+Defect Template Generation

 Sample code is located in


Help\examples\Cpp(DotNet)\Dynamic_GenerateGainDefectTemplate
54
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 55

5.4.3 Upload and Download Calibrating Template

5.4.3.1 Download template


Please refer to Cmd_DownloadCaliFile.Sample code is located in
Help\examples\Cpp(DotNet)\DownloadCorrectionFile2Device.

5.4.3.2 Upload template


Please refer to Cmd_UploadCaliFile。

5.4.4 Load Correction template

5.4.4.1 Load SW Correction


Please refer to Cmd_SetCorrectOption,the parameter is a combination of
Enm_CorrectOp_SW_XXX (Enm_CorrectOption)。

5.4.4.2 Load HW Correction


1) If using HW_PreOffset,updating preoffset template by invoking
Cmd_HwGeneratePreOffsettemplate.

2) If using HW_Gain or HW_Defect,gain or defect template should be download to


device firstly,please refer to section 5.4.3.1;All of the templates that had been download to
device can be queried,please refer to 5.4.4.3。
3) Loading the corresponding HWGain or HWDefect template by invoking
Cmd_SelectCaliFile。

4) If using HWGain,then PreOffset should using HWPreoffset;if using HWDefect, then


preoffset and gain should select hardware correction, namely HWPreoffset+HWGain.
5.4.4.3 Query HW Templates information
Please refer to Cmd_QueryHwCaliTemplateList, the flow char is as follow:

55
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 56

Figure 5.4.3 Query HW Templates information


 Sample code is located in
Help\examples\Cpp(DotNet)\DownloadCorrectionFile2Device

The templates’ information will be returned through event Evt_HwCaliTemplate , the


format(xml) is as follow:
<?xml version="1.0" encoding="UTF-8" ?>
<HWCalibrationFileList>
<FileItem>
<Type>2</Type>
<Index>1</Index>
<PGA>2</PGA>
<Binning>0</Binning>
<Zoom>0</Zoom>
<Activity>enable</Activity>
<Validity>absent</Validity>
<DespInfo></DespInfo>
</FileItem>
<FileItem>
<Type>2</Type>
<Index>2</Index>
<PGA>3</PGA>
<Binning>0</Binning>
<Zoom>0</Zoom>
<Activity>disable</Activity>
<Validity>absent</Validity>
<DespInfo></DespInfo>
</FileItem>
56
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 57

</HWCalibrationFileList>
Note Name Value Data Type Description
Type 2:Enm_File_Gain Enm_FileTypes /
4:Enm_File_Defect
Index [1, 12] int The parameter nMapIndex of
Cmd_DownloadCaliFile

PGA 1:Enm_PGA1 Enm_PGA /


...
Binning 0:Enm_Binning_Nul Enm_Binning /
l
...
Zoom 0:Enm_Zoom_Null Enm_Zoom /
...
Activity disable / The value is “enable”if the tempalte
enable be selected throuth invoking command
Cmd_SelectCaliFile.Only one template
can be selected at the same time.
Validity absent / absent: no file
valid valid:
invalid invalid:out of date, but can be
unmatched selected
Unmatched:the current params are
inconsistent with those taken at the
time of generating the template.

5.5 Image Acquisition


The control process is distinct for different trigger/synchronous mode. Before the
software integration, user should make a decision which trigger/synchronous mode should be
used for a certain detector type. This chapter introduces how to call the SDK interface for
image acquisition with various sorts of mode.
Note:Before the normal acquisition, the correct option of Offset/Gain/Defect must be
set, otherwise the correction process will be failed and a black image will be returned.

5.5.1 SyncIn Synchronous Mode

SyncIn synchronous mode is appropriated for iRay dynamic detectors. It is usually used
57
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 58

for perspective monitor while interventional operation. Continuous acquisition is started and
kept by an outer controlling device pushing and stopped after the pushing is released.

Figure 5.5.1 Acquisition under SyncIn Mode

58
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 59

5.5.2 SyncOut Synchronous Mode

SyncOut synchronous mode is appropriated for iRay dynamic detectors. It is usually


used for continuous perspective monitor or single frame acquisition. Continuous acquisition
is started and kept by software call and stopped by software call also. Single frame
acquisition is also allowed when the software is at the corresponding state.

Figure 5.5.2 Acquisition under SyncOut mode

59
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 60

6. Multi-device connection

Multi-workdir should be created firstly when connecting multi-device, the config.ini should be modified.
The communication type can be identified by Cfg_ConnImp in Config.ini.
 ConnGigEVision: Pleora communication
 ConnSGDMA: Fiber communication
 ConnUDPE50: UDP communication
The DetectorID returned by Create function is used to identifying the device.

6.1 Pleora communication


1) Set the IP address of all Pleora devices to persistent, as follow:

2) Modify the value of Cfg_PleoraConnStr to the IP address of Pleora device


3) Modify the IP address of PC network card to be in the same network segment as the IP address of the
connected Pleora device.

6.2 Fiber communication


1) Modify the value of Cfg_PCIEBoardIndex to corresponding PCIE board number, number start from
0.

6.3 UDP communication


1) Modify the IP address of PC network card to be in the same network segment as the IP address of the
60
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 61

connected device
2) Modify the value of Cfg_HostIP to the IP address of PC network card. If connecting multi-devices to
the same PC network card, the following step is needed:
 Add two IP address for PC network card, or
 Modify Cfg_HostPort to 28000+20N(N is device number, start from 0), eg. For first device, the value
of Cfg_HostPort is default value 28000, the second is 28020.

7. Post Image Processing

Besides SDK which is described in this documentation, iRay also provides a


programming library for post image processing. Please refer to the library manual for more
details. Here is the algorithms included in the library for example:

7.1 EMI
Used for strip-like noise processing which is caused by electromagnetic interference.

7.2 Individual Defect Correction


Used for reproduced defect points processing which is caused by algorithms coupling,
usually after grid removing calculation.

61
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-87
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-06-18
Series EN Page 62

8. Appendix Acronym

acronym description
SDK Software Development Kit
FPD Flat Panel Detector
SN Serial Number
IP Internet Protocol
MAC Media Access Control Address
FPGA Field-programmable Gate Array
PC Personal Computer
ROI Region of Interest
RAM Random Access Memory
ROM Read Only Memory
EMI Electro Magnetic Interference

62
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay

You might also like