HbiFpd.h 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520
  1. /*---------------------------------------------------------------------------
  2. * Copyright (c) 2019 Shanghai Haobo Image Technology Co., Ltd
  3. * All rights reserved.
  4. *
  5. * File name: HbiFpd. h
  6. * Document ID:
  7. * Abstract: flat-panel detector export function header file
  8. *
  9. * Current version: 3.0
  10. * Author: mhyang
  11. * Date: November 20, 2020
  12. * Revision date: November 5, 2021
  13. ----------------------------------------------------------------------------*/
  14. #pragma once
  15. #ifndef __HBI_FPD_H_
  16. #define __HBI_FPD_H_
  17. #include "HbiType.h"
  18. #include "HbiError.h"
  19. #ifdef _WIN32 // for windows
  20. //#ifdef _WIN64 // (64-bit only)
  21. //#else // (32-bit only)
  22. //#endif
  23. #ifdef _DLL_EX_IM
  24. #define HBI_FPD_DLL __declspec(dllexport)
  25. #else
  26. #define HBI_FPD_DLL __declspec(dllimport)
  27. #endif
  28. #elif (__unix__ || __linux__) // for unix or linux
  29. //#ifdef __x86_64__ // (64-bit only)
  30. //#elif __i386__ // (32-bit only)
  31. //#endif
  32. #define HBI_FPD_DLL __attribute__((visibility("default"))) // very important ???
  33. #endif
  34. ////////////////////////////////////////////////////////////////////////////////////////
  35. ////////////////////////////////////////////////////////////////////////////////////////
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. /*********************************************************
  40. * No: No001
  41. * Function Name: HBI_Init
  42. * Function Description // Initialize dynamic dll, nonvolatile parameters and thread message parameters, establish SDK object pointer.
  43. * Parameter Description:
  44. int fpdid // Flat panel detector ID, default is 0.
  45. * Return Value:
  46. void * // Null: failure;
  47. // Non-null: success.
  48. * Comment:
  49. *********************************************************/
  50. HBI_FPD_DLL void* HBI_Init(int fpdid=0);
  51. /*********************************************************
  52. * No: No002
  53. * Function Name: HBI_Destroy
  54. * Function Description: // Release dynamic library resources
  55. * Parameter Description:
  56. In: void *handle // Handle, dynamic SDK object pointer
  57. Out: Null
  58. * Return Value: void
  59. * Comment:
  60. *********************************************************/
  61. HBI_FPD_DLL void HBI_Destroy(void *handle);
  62. /*********************************************************
  63. * No: No0003
  64. * Function Name: HBI_InitDual
  65. * Function Description: // Initialize double detector dynamic library
  66. * Parameter Description: // Callback parameter, that are two FPD handle instance
  67. In/Out: void **handle1 // Detector A¡¯s unsigned handle pointer instance
  68. In/Out: void **handle1 // Detector B¡¯s unsigned handle pointer instance
  69. * Return Value: int
  70. // 0: Success
  71. // Non-0: Failure,refer to<<HbiError.h>>
  72. * Comment:
  73. **********************************************************************************************************************/
  74. HBI_FPD_DLL int HBI_InitDual(void **handle1, void **handle2);
  75. /*********************************************************
  76. * No: No0004
  77. * Function Name: HBI_InitEx
  78. * Function Description: // Initialize double or multi detector dynamic library instance
  79. * Parameter Description: // Callback parameter, FPD instance and ID number
  80. In/Out: HBI_HANDLE *pHandArr // Array object, refer to <<HbiType.h>>
  81. In: int nArrSize // Array number, equal to DETECTOR_MAX_NUMBER
  82. * Return Value: int
  83. // 0: Success
  84. // Non-0: Failure,refer to<<HbiError.h>>
  85. * Comment:
  86. *********************************************************/
  87. HBI_FPD_DLL int HBI_InitEx(HBI_HANDLE *pHandArr, int nArrSize);
  88. /*********************************************************
  89. * No: No0005
  90. * Function Name: HBI_DestroyEx
  91. * Function Description: // Destroy all dll resources
  92. * Parameter Description:
  93. Null
  94. * Return Value:
  95. Null
  96. * Comment:
  97. *********************************************************/
  98. HBI_FPD_DLL void HBI_DestroyEx();
  99. /*********************************************************
  100. * No: No0006
  101. * Function Name: HBI_GetDetectorHandle
  102. * Function Description: // Get handle through FPD ID number
  103. * Parameter Description:
  104. In:int fpdid // FPD ID number,0 《 平板id 《 DETECTOR_MAX_NUMBER
  105. * Return Value:
  106. void * // unsigned object pointer
  107. * Comment:
  108. *********************************************************/
  109. HBI_FPD_DLL void *HBI_GetDetectorHandle(int fpdid = 0);
  110. /*********************************************************
  111. * No: No0007
  112. * Function Name: HBI_GetDetectorId
  113. * Function Description: // Get FPD ID number through handle
  114. * Parameter Description:
  115. In:void *handle // handle pointer
  116. * Return Value:
  117. int // FPD ID number
  118. * Comment:
  119. *********************************************************/
  120. HBI_FPD_DLL int HBI_GetDetectorId(void *handle);
  121. /*********************************************************
  122. * No: No0008
  123. * Function Name: HBI_ActivateDetector
  124. * Function Description: // Activate detector, current SDK version supports multi FPD
  125. * Parameter Description:
  126. In:void *handle // handle pointer
  127. * Return Value: int
  128. // 0: Success
  129. // Non-0: Failure,refer to<<HbiError.h>>
  130. * Comment:
  131. *********************************************************/
  132. HBI_FPD_DLL int HBI_ActivateDetector(void *handle);
  133. /*********************************************************
  134. * No: No009
  135. * Function Name: HBI_ConnectDetector
  136. * Function Description: // Establish connection
  137. * Parameter Description:
  138. In: void *handle // unsigned handle pointer
  139. COMM_CFG commCfg // refer to <<HbiType.h>> COMM_CFG
  140. UDP_COMM_TYPE = 0, Standard UDP communication method
  141. UDP_JUMBO_COMM_TYPE = 1, Standard UDP communication method,Support for jumbo
  142. PCIE_COMM_TYPE = 2, Fiber type
  143. WALN_COMM_TYPE = 3,Wireless type
  144. Int doOffsetTemp // Non-1: don’t update pre-offset template when connection is successful
  145. // 1: update pre-offset template when connection is successful
  146. Out: Null
  147. * Return Value: int
  148. // 0: Success
  149. // Non-0: Failure,refer to<<HbiError.h>>
  150. * Comment:
  151. *********************************************************/
  152. HBI_FPD_DLL int HBI_ConnectDetector(void *handle, COMM_CFG commCfg, int doOffsetTemp = 0);
  153. /*********************************************************
  154. * No: No010
  155. * Function Name: HBI_ConnectDetectorUdp - Standard UDP communication method
  156. HBI_ConnectDetectorJumbo - Standard UDP communication method,Support for jumbo
  157. HBI_ConnectDetectorWlan - Fiber type
  158. * Function Description: // Establish connection (gigabit Ethernet interface with typical UDP packet)
  159. * Parameter Description:
  160. In: void *handle // unsigned handle pointer
  161. char *szDetectorIp // FPD IP address: 192.168.10.40
  162. unsigned short usDetectorPort // FPD port: 32897(0x8081)
  163. char *szlocalIp // PC IP address: 192.168.10.20
  164. unsigned short usLocalPort // PC port: 32896(0x8080)
  165. int doOffsetTemp // Non-1: don’t update pre-offset template when connection is successful
  166. // 1: update pre-offset template when connection is successful
  167. Out: Null
  168. * Return Value: int
  169. // 0: Success
  170. // Non-0: Failure,refer to<<HbiError.h>>
  171. * Comment:
  172. *********************************************************/
  173. HBI_FPD_DLL int HBI_ConnectDetectorUdp(void *handle, char *szDetectorIp, unsigned short usDetectorPort, char *szlocalIp, unsigned short usLocalPort, int doOffsetTemp = 0);
  174. HBI_FPD_DLL int HBI_ConnectDetectorJumbo(void *handle, char *szDetectorIp, unsigned short usDetectorPort, char *szlocalIp, unsigned short usLocalPort, int doOffsetTemp = 0);
  175. HBI_FPD_DLL int HBI_ConnectDetectorWlan(void *handle, char *szDetectorIp, unsigned short usDetectorPort, char *szlocalIp, unsigned short usLocalPort, int doOffsetTemp = 0);
  176. /*********************************************************
  177. * No: No011
  178. * Function Name: HBI_ConnectDetectorPcie
  179. * Function Description: // Establish connection (optical fiber interface)
  180. * Parameter Description:
  181. In: void *handle // unsigned handle pointer
  182. int pciedeviceid // PCIexpress device id,dfault 7024
  183. int doOffsetTemp // 1: don’t update pre-offset template when connection is successful
  184. // Non-1: update pre-offset template when connection is successful
  185. Out: Null
  186. * Return Value: int
  187. // 0: Success
  188. // Non-0: Failure,refer to<<HbiError.h>>
  189. * Comment:
  190. **********************************************************************************************************************/
  191. HBI_FPD_DLL int HBI_ConnectDetectorPcie(void *handle, int pciedeviceid=7024, int doOffsetTemp = 0);
  192. /******************************************************************************
  193. * No: No012
  194. * Function Name: HBI_ConnectDetectorEx
  195. * Function Description: // Establish connection
  196. * Parameter Description:
  197. In: void *handle // unsigned handle pointer, refer to <<hbi_init.ini>>
  198. Out: Null
  199. * Return Value: int
  200. // 0: Success
  201. // Non-0: Failure,refer to<<HbiError.h>>
  202. * Comment: <<hbi_fpd_init.ini>>
  203. * FPD IP Address: FPD_IP = 192.168.10.40
  204. * FPD Port: FPD_PORT = 32897
  205. * Local IP Address: LOCAL_IP = 192.168.10.20
  206. * Local Port: LOCAL_PORT = 32896
  207. * TRIGGER_MODE: 0-Invalid Trigger;
  208. 1: Static: Software Trigger;
  209. 2: Clear;
  210. 3: Static: Hvg Trigger Mode;
  211. 4: Static: AED Trigger Mode;
  212. 5: Dynamic: Hvg Sync Mode;
  213. 6: Dynamic: Fpd Sync Mode;
  214. 7: Dynamic: Free Run Mode;
  215. 8: Static: SAEC Mode;
  216. * OFFSET_ENABEL: 0: No Offset Correction;
  217. 1: Software Preoffset Correction;
  218. 2: Firmware Postoffset Correction;
  219. 3: Firmware Preoffset Correction;
  220. * GAIN_ENABLE: 0: No Gain Correction;
  221. 1: Software Gain Correction;
  222. 2: Firmware Gain Correction;
  223. * DEFECT_ENABLE: 0: No Defect Correction;
  224. 1: Software Defect Correction;
  225. 2: Firmware Defect Correction;
  226. * DUMMY_ENABLE: 0: No Dummy Correction;
  227. 1: Software Dummy Correction;
  228. 2: Firmware Dummy Correction;
  229. * LIVE_ACQ_TIME: 1000~1000ms
  230. * SELF_DUMPING_TIME: 500~500ms
  231. * PREPARE_TIME: 1500~1500ms
  232. * DO_OFFSET: 0: No action
  233. 1: Do offset template
  234. ******************************************************************************/
  235. HBI_FPD_DLL int HBI_ConnectDetectorEx(void *handle);
  236. /*********************************************************
  237. * No: No013
  238. * Function Name: HBI_DisConnectDetector
  239. * Function Description: // Disconnect detector
  240. * Parameter Description:
  241. In: void *handle // unsigned handle pointer
  242. Out: Null
  243. * Return Value: int
  244. // 0: Success
  245. // Non-0: Failure,refer to<<HbiError.h>>
  246. * Comment:
  247. *********************************************************/
  248. HBI_FPD_DLL int HBI_DisConnectDetector(void *handle);
  249. /*********************************************************
  250. * No: No014
  251. * Function Name: HBI_RegEventCallBackFun
  252. * Function Description: // Register callback function
  253. * Parameter Description:
  254. In: void *handle // unsigned handle pointer
  255. USER_CALLBACK_HANDLE_ENVENT callbackfun // Register callback function
  256. void *pContext // Object pointer, application software transfer object pointer to SDK in order to access static and global variable
  257. Out: Null
  258. * Return Value: int
  259. // 0: Success
  260. // Non-0: Failure,refer to<<HbiError.h>>
  261. * Comment:
  262. *********************************************************/
  263. HBI_FPD_DLL int HBI_RegEventCallBackFun(void *handle, USER_CALLBACK_HANDLE_ENVENT handleEventfun, void *pContext);
  264. /*********************************************************
  265. * No: No015
  266. * Function Name: HBI_ResetDetector
  267. * Function Description: // Reset detector
  268. * Parameter Description:
  269. In: void *handle // unsigned handle pointer
  270. Out: Null
  271. * Return Value: int
  272. // 0: Success
  273. // Non-0: Failure,refer to<<HbiError.h>>
  274. * Comment:
  275. *********************************************************/
  276. HBI_FPD_DLL int HBI_ResetDetector(void *handle);
  277. /*********************************************************
  278. * No: No016
  279. * Function Name: HBI_ResetFirmware
  280. * Function Description: // Restore factory setting
  281. * Parameter Description:
  282. In: void *handle // unsigned handle pointer
  283. Out: Null
  284. * Return Value: int
  285. // 0: Success
  286. // Non-0: Failure,refer to<<HbiError.h>>
  287. * Comment:
  288. *********************************************************/
  289. HBI_FPD_DLL int HBI_ResetFirmware(void *handle);
  290. /*********************************************************
  291. * No: No017
  292. * Function Name: HBI_GetFPDSerialNumber
  293. * Function Description: // Get FPD serial number
  294. * Parameter Description:
  295. In: void *handle // unsigned handle pointer
  296. In/Out: char *szSn, // Serial number length 14bits
  297. * Return Value: int
  298. // 0: Success
  299. // Non-0: Failure,refer to<<HbiError.h>>
  300. * Comment:
  301. *********************************************************/
  302. HBI_FPD_DLL int HBI_GetFPDSerialNumber(void *handle, char *szSn);
  303. /*********************************************************
  304. * No: No018
  305. * Function Name: HBI_GetSDKVerion
  306. * Function Description: // Get Dll version
  307. * Parameter Description:
  308. In: void *handle // unsigned handle pointer
  309. char *szVer // Dll version information string
  310. Out: Null
  311. * Return Value: int
  312. // 0: Success
  313. // Non-0: Failure,refer to<<HbiError.h>>
  314. * Comment:
  315. *********************************************************/
  316. HBI_FPD_DLL int HBI_GetSDKVerion(void *handle, char *szVer);
  317. /*********************************************************
  318. * No: No019
  319. * Function Name: HBI_GetFirmareVerion
  320. * Function Description: // Get firmware version
  321. * Parameter Description:
  322. In: void *handle // unsigned handle pointer
  323. char *szVer // Firmware version information string
  324. Out: Null
  325. * Return Value: int
  326. // 0: Success
  327. // Non-0: Failure,refer to<<HbiError.h>>
  328. * Comment:
  329. *********************************************************/
  330. HBI_FPD_DLL int HBI_GetFirmareVerion(void *handle, char *szFirmwareVer);
  331. /*********************************************************
  332. * No: No020
  333. * Function Name: HBI_GetError
  334. * Function Description: // Get error information, unavailable at present
  335. * Parameter Description:
  336. In: const CodeStringTable* inTable // Errata
  337. int count // Number of table
  338. int recode // Error code
  339. Out: Null
  340. * Return Value: const char *
  341. // Null: Failure
  342. // Non-null: Success
  343. * Comment:
  344. *********************************************************/
  345. HBI_FPD_DLL const char *HBI_GetError(const CodeStringTable* inTable, int count, int recode);
  346. /*********************************************************
  347. * No: No021
  348. * Function Name: HBI_GetFpdCfgInfo
  349. * Function Description: // Get nonvolatile config parameter(ROM)
  350. * Parameter Description:
  351. In: void *handle // unsigned handle pointer
  352. Out:RegCfgInfo* pRegCfg // Refer to <<HbiType.h>>
  353. * Return Value: int
  354. // 0: Success
  355. // Non-0: Failure,refer to<<HbiError.h>>
  356. * Comment:
  357. *********************************************************/
  358. HBI_FPD_DLL int HBI_GetFpdCfgInfo(void *handle, RegCfgInfo* pRegCfg);
  359. /*********************************************************
  360. * No: No022
  361. * Function Name: HBI_GetImageProperty
  362. * Function Description: // Get image property
  363. * Parameter Description:
  364. In: void *handle // unsigned handle pointer
  365. IMAGE_PROPERTY *img_pro // Image property, refer to<<HbiType.h>> IMAGE_PROPERTY
  366. Out: Null
  367. * Return Value: int
  368. // 0: Success
  369. // Non-0: Failure,refer to<<HbiError.h>>
  370. * Comment:
  371. *********************************************************/
  372. HBI_FPD_DLL int HBI_GetImageProperty(void *handle, IMAGE_PROPERTY *img_pro);
  373. /*********************************************************
  374. * No: No023
  375. * Function Name: HBI_GetPreviewImageProperty
  376. * Function Description: // Get preview image property
  377. * Parameter Description:
  378. In: void *handle // unsigned handle pointer
  379. IMAGE_PROPERTY *img_pro // Image property, refer to<<HbiType.h>> IMAGE_PROPERTY
  380. Out: Null
  381. * Return Value: int
  382. // 0: Success
  383. // Non-0: Failure,refer to<<HbiError.h>>
  384. * Comment:
  385. *********************************************************/
  386. HBI_FPD_DLL int HBI_GetPreviewImageProperty(void *handle, IMAGE_PROPERTY *img_pro);
  387. /*********************************************************
  388. * No: No024
  389. * Function Name: HBI_SinglePrepare
  390. * Function Description: Single image acquisition(combine with “prepare delay time” parameter)
  391. * Parameter Description:
  392. In: void *handle // unsigned handle pointer
  393. Out: Null
  394. * Return Value: int
  395. // 0: Success
  396. // Non-0: Failure,refer to<<HbiError.h>>
  397. * Comment:In the application, there will be a problem that the acquisition command type cannot be synchronized, resulting in the failure of the above figure. Use HBI_Prepare replacement
  398. *Prepare delay=0 - indicates soft trigger single frame acquisition first HBI_Prepare after HBI_ SingleAcquisition completes single frame acquisition
  399. *Prepare delay > "0 - means soft trigger single frame acquisition, only HBI_ Prepare is required can complete single frame acquisition according to the delay time
  400. *********************************************************/
  401. HBI_FPD_DLL int HBI_SinglePrepare(void *handle);
  402. /*********************************************************
  403. * No: No025
  404. * Function Name: HBI_Prepare (Add interface)
  405. * Function Description: Single image acquisition(combine with “prepare delay time” parameter)
  406. * Parameter Description:
  407. In: void *handle // unsigned handle pointer
  408. EnumIMAGE_ACQ_CMD //Current acquisition command type (image above or saved template image data)
  409. eg:
  410. SINGLE_ACQ_DEFAULT_TYPE // Single acquisition.
  411. SINGLE_ACQ_GAIN_IMAGE // Generate gain template with static single acquisition.
  412. SINGLE_ACQ_DEFECT_IMAGE // Generate defect template with static single acquisition.
  413. SINGLE_GENERATE_OFFSET, // Quickly generate template collection types, collect a group of dark field images in a single frame - SDK generates offset template.
  414. SINGLE_GENERATE_GAIN, // Quickly generate template collection types, and collect N groups of single frame (at least 3 groups by default) bright field images - SDK generates gain templates SINGLE_GENERATE_DEFECT, // Quickly generate template collection types, and collect N groups of single frame (at least 3 groups by default) bright field images - SDK generates defect templates
  415. SINGLE_GENERATE_GAIN_DEFECT // Quickly generate template collection types, and collect N groups of single frame (at least 3 groups by default) bright field images - SDK generates gain and defect templates
  416. Out: Null
  417. * Return Value: int
  418. // 0: Success
  419. // Non-0: Failure,refer to<<HbiError.h>>
  420. * Comment:
  421. *Prepare delay=0 - indicates soft trigger single frame acquisition first HBI_Prepare after HBI_ SingleAcquisition completes single frame acquisition
  422. *Prepare delay > "0 - means soft trigger single frame acquisition, only HBI_ Prepare is required can complete single frame acquisition according to the delay time
  423. *********************************************************/
  424. HBI_FPD_DLL int HBI_Prepare(void* handle, EnumIMAGE_ACQ_CMD acqcmd = EnumIMAGE_ACQ_CMD::SINGLE_ACQ_DEFAULT_TYPE);
  425. /*********************************************************
  426. * No: No026
  427. * Function Name: HBI_SingleAcquisition
  428. * Function Description: // Single image acquisition
  429. * Parameter Description:
  430. In: void *handle // unsigned handle pointer
  431. FPD_AQC_MODE _mode // Acquisition mode and related parameters
  432. EnumIMAGE_ACQ_MODE // Image acquisition mode
  433. SINGLE_ACQ_DEFAULT_TYPE, // Single frame acquisition
  434. SINGLE_ACQ_GAIN_IMAGE, // Distributed generation correction template for template validation, creating Gain template - single frame acquisition of bright field images
  435. SINGLE_ACQ_DEFECT_IMAGE, // Distributed generation of correction templates for template validation and creation of Defect templates - single frame acquisition of bright field images
  436. EnumLIVE_ACQUISITION eLivetype; // Only for ONLY_ IMAGE
  437. int ngroupno // Group number
  438. int nframesum // Acsuisition image number
  439. int ndiscard // Discard image number
  440. int nframeid // Frame ID number
  441. Out: Null
  442. * Return Value: int
  443. // 0: Success
  444. // Non-0: Failure,refer to<<HbiError.h>>
  445. * Comment:
  446. *********************************************************/
  447. HBI_FPD_DLL int HBI_SingleAcquisition(void *handle, FPD_AQC_MODE _mode);
  448. /*********************************************************
  449. * No: No027
  450. * Function Name: HBI_LiveAcquisition
  451. * Function Description: // Live acquisition
  452. * Parameter Description:
  453. In: void *handle // unsigned handle pointer
  454. FPD_AQC_MODE _mode // Work mode and related parameter
  455. The structure contains fields:
  456. EnumIMAGE_ACQ_CMD eAqccmd; // Acquisition command,Refer to the document "HbiType. h", the default drawing method is LIVE_ ACQ_ DEFAULT_ TYPE, pay attention to distinguish between single-frame acquisition and continuous acquisition commands
  457. LIVE_ACQ_DEFAULT_TYPE, // Acquisition command
  458. // Distribute and generate correction templates for template validation
  459. LIVE_ACQ_OFFSET_IMAGE, // Create Offset template - continuously acquire dark field image
  460. LIVE_ACQ_GAIN_IMAGE, // Create Gain template - continuous acquisition of bright field image
  461. LIVE_ACQ_DEFECT_IMAGE, // Create Defect template - continuous acquisition of bright field image
  462. // Quickly generate correction templates for system integration
  463. OFFSET_TEMPLATE_TYPE, // Quickly generate template collection types, continuously collect a group of dark field images and generate offset templates, and firmware generates templates
  464. GAIN_TEMPLATE_TYPE, // Quickly generate template collection types, continuously collect a group of bright field images and generate gain templates
  465. DEFECT_TEMPLATE_GROUP1, // Quickly generate template collection types and continuously collect a group of bright field images - defect group1
  466. DEFECT_TEMPLATE_GROUP2, // Quickly generate template collection types and continuously collect a group of bright field images - defect group2
  467. DEFECT_TEMPLATE_GROUP3, // Quickly generate template collection types and continuously collect a group of bright field images - defect group3 and generate template
  468. SOFTWARE_OFFSET_TEMPLATE // Quickly generate template acquisition types and continuously collect a group of dark field images - SDK generates offset template
  469. Enum LIVE_ACQUISITION eLivetype; // Live acquisition only, detail refer to LIVE_ACQ_DEFAULT_TYPE.
  470. // 1 - generate the firmware Preoffset template and then continue to // acquire image.
  471. // 2 - image acquisition only.
  472. // 3 - generate firmware Preoffset template only.
  473. int ngroupno; // Group number.
  474. int nAcqnumber; // Reserved image number.
  475. int ndiscard; // Discard image number.
  476. int nframeid; // Counter.
  477. * Return Value: int
  478. // 0: Success
  479. // Non-0: Failure,refer to<<HbiError.h>>
  480. * Comment:
  481. *********************************************************/
  482. HBI_FPD_DLL int HBI_LiveAcquisition(void *handle, FPD_AQC_MODE _mode);
  483. /*********************************************************
  484. * No: No028
  485. * Function Name: StopAcquisition
  486. * Function Description: // Stop live acquisition
  487. * Parameter Description:
  488. In: void *handle // unsigned handle pointer
  489. Out: Null
  490. * Return Value: int
  491. // 0: Success
  492. // Non-0: Failure,refer to<<HbiError.h>>
  493. * Comment:
  494. *********************************************************/
  495. HBI_FPD_DLL int HBI_StopAcquisition(void *handle);
  496. /*********************************************************
  497. * No: No029
  498. * Function Description: // Prepare delay time setting, which is also called exposure window
  499. * Parameter Description:
  500. In: void *handle // unsigned handle pointer
  501. Out: int *out_itime // Time(0~10000), unit: ms
  502. // 0: “HBI_Prepare” and “HBI_SingleAcquisition” command are combined to realize single image acquisition
  503. // Non-0: FPD will delay “Prepare Delay Time” and automatically acquire one single image when the detector receives “HBI_Prepare” command.
  504. * Return Value: int
  505. // 0: Success
  506. // Non-0: Failure,refer to<<HbiError.h>>
  507. * Comment:
  508. *********************************************************/
  509. HBI_FPD_DLL int HBI_SetSinglePrepareTime(void *handle, int in_itime);
  510. /*********************************************************
  511. * No: No030
  512. * Function Name: HBI_GetSinglePrepareTime
  513. * Function Description: // Get prepare delay time value, which is also called exposure window
  514. * Parameter Description:
  515. In: void *handle // unsigned handle pointer
  516. Out: int *out_itime // Time(0~10000), unit: ms
  517. // 0: “HBI_Prepare” and “HBI_SingleAcquisition” command is combined to realize single image acquisition
  518. // Non-0: FPD will delay “Prepare Delay Time” and automatically acquire one single image when the detector receives “HBI_Prepare” command.
  519. * Return Value: int
  520. // 0: Success
  521. // Non-0: Failure,refer to<<HbiError.h>>
  522. * Comment:
  523. *********************************************************/
  524. HBI_FPD_DLL int HBI_GetSinglePrepareTime(void *handle, int *out_itime);
  525. /*********************************************************
  526. * No: No031
  527. * Function Name: HBI_SetLiveAcquisitionTime. (Static flat panel detector)
  528. * Function Description: // Live acquisition span time setting (apply to static and wireless type FPD)
  529. * Parameter Description:
  530. In: void *handle // unsigned handle pointer
  531. int time // Live acquisition span time, unit: ms
  532. Out: Null
  533. * Return Value: int
  534. // 0: Success
  535. // Non-0: Failure,refer to<<HbiError.h>>
  536. * Comment:
  537. *********************************************************/
  538. HBI_FPD_DLL int HBI_SetLiveAcquisitionTime(void *handle, int time);
  539. /*********************************************************
  540. * No: No032
  541. * Function Name: HBI_GetLiveAcquisitionTime. (Static flat panel detector)
  542. * Function Description: // Get live acquisition span time (apply to static and wireless type FPD)
  543. * Parameter Description:
  544. In: void *handle // unsigned handle pointer
  545. Out: int *out_time // Live acquisition span time, unit: ms
  546. * Return Value: int
  547. // 0: Success
  548. // Non-0: Failure,refer to<<HbiError.h>>
  549. * Comment:
  550. *********************************************************/
  551. HBI_FPD_DLL int HBI_GetLiveAcquisitionTime(void *handle, int *out_time);
  552. /*********************************************************
  553. * No: No033
  554. * Function Name: HBI_SetSelfDumpingTime(Dynamic flat panel detector)
  555. * Function Description: // Self dumping span time setting
  556. * Parameter Description:
  557. In: void *handle // unsigned handle pointer
  558. int time // Self dumping span time, unit: ms
  559. Out: Null
  560. * Return Value: int
  561. // 0: Success
  562. // Non-0: Failure,refer to<<HbiError.h>>
  563. * Comment:
  564. *********************************************************/
  565. HBI_FPD_DLL int HBI_SetSelfDumpingTime(void *handle, int time);
  566. /*********************************************************
  567. * No: No034
  568. * Function Name: HBI_GetSelfDumpingTime(Dynamic flat panel detector)
  569. * Function Description: // Get self dumping span time
  570. * Parameter Description:
  571. In: void *handle // unsigned handle pointer
  572. Out: int *out_time // Self dumping span time, unit: ms
  573. * Return Value: int
  574. // 0: Success
  575. // Non-0: Failure,refer to<<HbiError.h>>
  576. * Comment:
  577. *********************************************************/
  578. HBI_FPD_DLL int HBI_GetSelfDumpingTime(void *handle, int *out_time);
  579. /*********************************************************
  580. * No: No035
  581. * Function Name: HBI_TriggerAndCorrectApplay
  582. * Function Description: // Work mode and image calibration setting
  583. * Parameter Description:
  584. In: void *handle // unsigned handle pointer
  585. int _triggerMode
  586. // 1: Software trigger mode
  587. // 3: High voltage generator trigger mode
  588. // 4: AED trigger mode
  589. // 5-Dynamic:Hvg Sync Mode
  590. // 6-Dynamic:Fpd Sync Mode
  591. // 7-Dynamic:Fpd Continue
  592. // 8-SAEC。
  593. IMAGE_CORRECT_ENABLE* pCorrect // refer to<< HbiType.h>>
  594. Out: Null
  595. * Return Value: int
  596. // 0: Success
  597. // Non-0: Failure,refer to<<HbiError.h>>
  598. * Comment: Replace “HBI_WorkStationInitDllCfg” and “HBI_QuckInitDllCfg” API function
  599. *********************************************************/
  600. HBI_FPD_DLL int HBI_TriggerAndCorrectApplay(void *handle, int _triggerMode, IMAGE_CORRECT_ENABLE* pCorrect);
  601. /*********************************************************
  602. * No: No036
  603. * Function Name: HBI_UpdateTriggerMode
  604. * Function Description: trigger mode setting
  605. * Parameter Description:
  606. In: void *handle // unsigned handle pointer
  607. int _triggerMode,
  608. // 1: Software trigger mode
  609. // 3: High voltage generator trigger mode
  610. // 4: AED trigger mode
  611. // 5-Dynamic:Hvg Sync Mode
  612. // 6-Dynamic:Fpd Sync Mode
  613. // 7-Dynamic:Fpd Continue
  614. // 8-SAEC。
  615. Out: Null
  616. * Return Value: int
  617. // 0: Success
  618. // Non-0: Failure,refer to<<HbiError.h>>
  619. * Comment:
  620. *********************************************************/
  621. HBI_FPD_DLL int HBI_UpdateTriggerMode(void *handle, int _triggerMode);
  622. /*********************************************************
  623. * No: No037
  624. * Function Name: HBI_UpdateCorrectEnable
  625. * Function Description: // Firmware calibration enable setting
  626. * Parameter Description:
  627. In: void *handle // unsigned handle pointer
  628. IMAGE_CORRECT_ENABLE* pCorrect // refer to<< HbiType.h>>
  629. Out: Null
  630. * Return Value: int
  631. // 0: Success
  632. // Non-0: Failure,refer to<<HbiError.h>>
  633. * Comment:
  634. *********************************************************/
  635. HBI_FPD_DLL int HBI_UpdateCorrectEnable(void *handle, IMAGE_CORRECT_ENABLE* pCorrect);
  636. /*********************************************************
  637. * No: No038
  638. * Function Name: HBI_GetCorrectEnable
  639. * Function Description: // Get image calibration enable status
  640. * Parameter Description:
  641. In: void *handle // unsigned handle pointer
  642. IMAGE_CORRECT_ENABLE* pCorrect // refer to<< HbiType.h>>
  643. Out: Null
  644. * Return Value: int
  645. // 0: Success
  646. // Non-0: Failure,refer to<<HbiError.h>>
  647. * Comment:
  648. *********************************************************/
  649. HBI_FPD_DLL int HBI_GetCorrectEnable(void *handle, IMAGE_CORRECT_ENABLE *pCorrect);
  650. /*********************************************************
  651. * No: No039
  652. * Function Name: HBI_SetSoftwareCorrect
  653. * Function Description: // Software calibration enable setting
  654. * Parameter Description:
  655. In: void *handle // unsigned handle pointer
  656. SOFTWARE_CALIBRATE_ENABLE inEnable // refer to<< HbiType.h>> SOFTWARE_CALIBRATE_ENABLE struct
  657. Out: Null
  658. * Return Value: int
  659. // 0: Success
  660. // Non-0: Failure,refer to<<HbiError.h>>
  661. * Comment:
  662. *********************************************************/
  663. HBI_FPD_DLL int HBI_SetSoftwareCorrect(void *handle, SOFTWARE_CALIBRATE_ENABLE inEnable);
  664. /*********************************************************
  665. * No: No040
  666. * Function Name: HBI_GetSoftwareCorrect
  667. * Function Description: // Get software calibration enable status
  668. * Parameter Description:
  669. In: void *handle // unsigned handle pointer
  670. SOFTWARE_CALIBRATE_ENABLE inEnable // refer to<<HbiType.h>>
  671. SOFTWARE_CALIBRATE_ENABLE struct
  672. Out: Null
  673. * Return Value: int
  674. // 0: Success
  675. // Non-0: Failure,refer to<<HbiError.h>>
  676. * Comment:
  677. *********************************************************/
  678. HBI_FPD_DLL int HBI_GetSoftwareCorrect(void *handle, SOFTWARE_CALIBRATE_ENABLE *inEnable);
  679. /*********************************************************
  680. * No: No041
  681. * Function Name: HBI_SetAedIntegrateTm
  682. * Function Description: // AED integration time setting
  683. * Parameter Description:
  684. In: void *handle // unsigned handle pointer
  685. int time // AED integration time, unit: ms, default = 500ms
  686. Out: Null
  687. * Return Value: int
  688. // 0: Success
  689. // Non-0: Failure
  690. * Comment:
  691. *********************************************************/
  692. HBI_FPD_DLL int HBI_SetAedIntegrateTm(void *handle, int time);
  693. /*********************************************************
  694. * No: No042
  695. * Function Name: HBI_GetAedIntegrateTm
  696. * Function Description: // Get AED integration time
  697. * Parameter Description:
  698. In: void *handle // unsigned handle pointer
  699. Out: int *out_time // AED integration time, unit: ms
  700. * Return Value: int
  701. // 0: Success
  702. // Non-0: Failure
  703. * Comment:
  704. *********************************************************/
  705. HBI_FPD_DLL int HBI_GetAedIntegrateTm(void *handle, int *out_time);
  706. /*********************************************************
  707. * No: No043
  708. * Function Name: HBI_SetAedThreshold
  709. * Function Description: // AED threshold value setting
  710. * Parameter Description:
  711. In: void *handle // unsigned handle pointer
  712. int out_ivalue // AED threshold (10,000~1,000,000)
  713. Out: Null
  714. * Return Value: int
  715. // 0: Success
  716. // Non-0: Failure
  717. * Comment:
  718. *********************************************************/
  719. HBI_FPD_DLL int HBI_SetAedThreshold(void *handle, int in_ivalue);
  720. /*********************************************************
  721. * No: No044
  722. * Function name: HBI_ GetAedThreshold
  723. * Function description: Obtain AED threshold
  724. * Parameter Description:
  725. In: void * handle - Handle (unsigned pointer)
  726. Out: int * out_ Ivalue - threshold [10000~1000000]
  727. * Return value: int
  728. 0- Success
  729. Non 0- Failed
  730. * Remarks:
  731. *********************************************************/
  732. HBI_FPD_DLL int HBI_GetAedThreshold(void *handle, int *out_ivalue);
  733. /*********************************************************
  734. * No: No045
  735. * Function Name: HBI_SetSaturationValue
  736. * Function Description: // Saturation value setting
  737. * Parameter Description:
  738. In: void *handle // unsigned handle pointer
  739. Out:int *out_ivalue // Saturation value (0 ~ 65,535)
  740. * Return Value: int
  741. // 0: Success
  742. // Non-0: Failure
  743. * Comment:
  744. *********************************************************/
  745. HBI_FPD_DLL int HBI_SetSaturationValue(void *handle, int in_ivalue);
  746. /*********************************************************
  747. * No: No046
  748. * Function Name: HBI_GetSaturationValue
  749. * Function Description: // Get saturation setting value
  750. * Parameter Description:
  751. In: void *handle // unsigned handle pointer
  752. Out:int *out_ivalue // Saturation value (0 ~ 65,535)
  753. * Return Value: int
  754. // 0: Success
  755. // Non-0: Failure
  756. * Comment:
  757. *********************************************************/
  758. HBI_FPD_DLL int HBI_GetSaturationValue(void *handle, int *out_ivalue);
  759. /*********************************************************
  760. * No: No047
  761. * Function Name: HBI_SetClippingValue
  762. * Function Description: // Clipping value setting
  763. * Parameter Description:
  764. In: void *handle // unsigned handle pointer
  765. Out:int *out_ivalue // Clipping value (0 ~ 65,535)
  766. * Return Value: int
  767. // 0: Success
  768. // Non-0: Failure
  769. * Comment:
  770. *********************************************************/
  771. HBI_FPD_DLL int HBI_SetClippingValue(void *handle, int in_ivalue);
  772. /*********************************************************
  773. * No: No048
  774. * Function Name: HBI_GetClippingValue
  775. * Function Description: // Get clipping value
  776. * Parameter Description:
  777. In: void *handle // unsigned handle pointer
  778. Out:int *out_ivalue // Clipping value (0 ~ 65,535)
  779. * Return Value: int
  780. // 0: Success
  781. // Non-0: Failure
  782. * Comment:
  783. *********************************************************/
  784. HBI_FPD_DLL int HBI_GetClippingValue(void *handle, int *out_ivalue);
  785. /*********************************************************
  786. * No: No049
  787. * Function Name: HBI_SetPGALevel
  788. * Function Description: // PGA gain stage setting
  789. * Parameter Description:
  790. In: void *handle // unsigned handle pointer
  791. int mode // PGA gain stage
  792. // 1: 0.6 pC;
  793. // 2: 1.2 pC;
  794. // 3: 2.4 pC;
  795. // 4: 3.6 pC;
  796. // 5: 4.8 pC;
  797. // 6: 7.2 pC;
  798. // 7: 9.6 pC;
  799. // 8: LFW with CMOS detector
  800. // 9: HFW with CMOS detector
  801. // 10: 0.3 pC;
  802. // 11: 0.15 pC;
  803. // Default: 7.2pC.
  804. Out: Null
  805. * Return Value: int
  806. // 0: Success
  807. // Non-0: Failure
  808. * Comment:
  809. *********************************************************/
  810. HBI_FPD_DLL int HBI_SetPGALevel(void *handle, int nGainLevel);
  811. /*********************************************************
  812. * No: No050
  813. * Function Name: HBI_GetPGALevel
  814. * Function Description: // Get PGA gain stage setting value
  815. * Parameter Description:
  816. In: void *handle // unsigned handle pointer
  817. Out: Null
  818. * Return Value:
  819. int // PGA gain stage
  820. // 1: 0.6 pC;
  821. // 2: 1.2 pC;
  822. // 3: 2.4 pC;
  823. // 4: 3.6 pC;
  824. // 5: 4.8 pC;
  825. // 6: 7.2 pC;
  826. // 7: 9.6 pC;
  827. // 8: LFW with CMOS detector
  828. // 9: HFW with CMOS detector
  829. // 10: 0.3 pC;
  830. // 11: 0.15 pC;
  831. // Default: 7.2pC.
  832. * Comment:
  833. *********************************************************/
  834. HBI_FPD_DLL int HBI_GetPGALevel(void *handle);
  835. /*********************************************************
  836. * No: No051
  837. * Function Name: HBI_SetLPFLevel
  838. * Function Description: // Low pass filter setting
  839. * Parameter Description:
  840. In: void *handle // unsigned handle pointer
  841. int nLPFLevel // Low pass filter
  842. // 0: 210 kHz, default value is 210 kHz
  843. // 1: 105 kHz
  844. // 2: 52 kHz
  845. // 3: 26 kHz
  846. // 4: 13 kHz
  847. Out: Null
  848. * Return Value: int
  849. // 0: Success
  850. // Non-0: Failure
  851. * Comment:
  852. *********************************************************/
  853. HBI_FPD_DLL int HBI_SetLPFLevel(void *handle, int nLPFLevel);
  854. /*********************************************************
  855. * No: No052
  856. * Function Name: HBI_GetLPFLevel
  857. * Function Description: // Get pass filter
  858. * Parameter Description:
  859. In: void *handle // unsigned handle pointer
  860. Out: Null
  861. * Return Value:
  862. int // Low pass filter
  863. // 0: 210 kHz, default value is 210 kHz
  864. // 1: 105 kHz
  865. // 2: 52 kHz
  866. // 3: 26 kHz
  867. // 4: 13 kHz
  868. * Comment:
  869. *********************************************************/
  870. HBI_FPD_DLL int HBI_GetLPFLevel(void *handle);
  871. /*********************************************************
  872. * No: No053
  873. * Function Name: HBI_SetBinning
  874. * Function Description: Binning mode setting
  875. * Parameter Description:
  876. In: void *handle // unsigned handle pointer
  877. unsigned int nbin // Binning mode
  878. // 1: 1x1
  879. // 2: 2x2
  880. // 3: 3x3
  881. // 4: 4x4
  882. Out: Null
  883. * Return Value: int
  884. // 0: Success
  885. // Non-0: Failure
  886. * Comment:
  887. *********************************************************/
  888. HBI_FPD_DLL int HBI_SetBinning(void *handle, unsigned int bin);
  889. /*********************************************************
  890. * No: No054
  891. * Function Name: HBI_GetBinning
  892. * Function Description: // Get binning mode setting value
  893. * Parameter Description:
  894. In: void *handle // unsigned handle pointer
  895. unsigned int *nbin // Binning mode
  896. // 1: 1x1
  897. // 2: 2x2
  898. // 3: 3x3
  899. // 4: 4x4
  900. Out: Null
  901. * Return Value: int
  902. // 0: Success
  903. // Non-0: Failure
  904. * Comment:
  905. *********************************************************/
  906. HBI_FPD_DLL int HBI_GetBinning(void *handle, unsigned int *bin);
  907. /*********************************************************
  908. * No: No055
  909. * Function Name: HBI_SetPreviewMode
  910. * Function Description: Preview mode setting
  911. * Parameter Description:
  912. In: void *handle - // unsigned handle pointer
  913. int inTriggMode
  914. 1-Soft trigger
  915. 3-High voltage trigger
  916. 4-FreeAED
  917. 5-Dynamic:Hvg Sync Mode
  918. 6-Dynamic:Fpd Sync Mode
  919. 7-Dynamic:Fpd Continue
  920. 8-SAEC
  921. Other not supported。
  922. int inPreviewMode // Image acquire and display mode
  923. // 0: normal image,
  924. // 1: preview image
  925. // 2: preview + normal image
  926. Out: Null
  927. * Return Value: int
  928. // 0: Success
  929. // Non-0: Failure
  930. * Comment:
  931. *********************************************************/
  932. HBI_FPD_DLL int HBI_SetPreviewMode(void *handle, int inTriggMode, int inPreviewMode);
  933. /*********************************************************
  934. * No: No056
  935. * Function Name: HBI_GetPreviewMode
  936. * Function Description: // Get preview mode setting value
  937. * Parameter Description:
  938. In: void *handle // unsigned handle pointer
  939. Out: int *outmode // Image acquire and display mode [0~2]
  940. // 0: normal image,
  941. // 1: preview image
  942. // 2: preview + normal image
  943. * Return Value: int
  944. // 0: Success
  945. // Non-0: Failure
  946. * Comment:
  947. *********************************************************/
  948. HBI_FPD_DLL int HBI_GetPreviewMode(void *handle, int *outMode);
  949. /*********************************************************
  950. * No: No057
  951. * Function Name: HBI_SAecModeApply
  952. * Function Description: // SAEC mode setting
  953. * Parameter Description:
  954. In: void *handle // unsigned handle pointer
  955. int inPreviewMode // 0: Normal image
  956. // 1: Preview image
  957. int inPerTime // FPD pre ready delay time
  958. int inPostTime // FPD post ready delay time
  959. Out: Null
  960. * Return Value:
  961. int // 0: Success
  962. // Non-0: Failure
  963. * Comment:
  964. 1. inPreviewMode=0(normal image)
  965. 2. inPreviewMode=1(preview image), user define inPerTime and inPostTime
  966. *********************************************************/
  967. HBI_FPD_DLL int HBI_SAecModeApply(void *handle, int inPreviewMode, int inPerTime = 0, int inPostTime = 0);
  968. /*********************************************************
  969. * No: No058
  970. * Function Name: HBI_SAecAcq
  971. * Function Description: // SAEC image acquisition
  972. * Parameter Description:
  973. In: void *handle // unsigned handle pointer
  974. Out: Null
  975. * Return Value: int
  976. // 0: Success
  977. // Non-0: Failure
  978. * Comment:
  979. *********************************************************/
  980. HBI_FPD_DLL int HBI_SAecAcq(void *handle);
  981. /*********************************************************
  982. * No: No059
  983. * Function Name: HBI_RegProgressCallBack
  984. * Function Description: // Register callback function, feedback template or firmware downloading progress status
  985. * Parameter Description:
  986. In: void *handle // unsigned handle pointer
  987. USER_CALLBACK_HANDLE_PROCESS handleStatusfun // Register callback function
  988. void *pObject // Object pointer,
  989. Out: Null
  990. * Return Value: int
  991. // 0: Success
  992. // Non-0: Failure
  993. * Comment:
  994. *********************************************************/
  995. HBI_FPD_DLL int HBI_RegProgressCallBack(void *handle, USER_CALLBACK_HANDLE_PROCESS handleStatusfun, void* pObject);
  996. /*********************************************************
  997. * No: No060
  998. * Function Name: HBI_GenerateTemplate
  999. * Function Description: // Quick generate offset, gain, defect template
  1000. * Parameter Description:
  1001. In: void *handle // unsigned handle pointer
  1002. EnumIMAGE_ACQ_MODE _mode // Type of template
  1003. OFFSET_TEMPLATE_MODE // Offset template
  1004. GAIN_TEMPLATE_MODE // Gain template
  1005. DEFECT_ACQ_GROUP1, // Defect template with group1 image
  1006. DEFECT_ACQ_GROUP2, // Defect template with group2 image
  1007. DEFECT_ACQ_AND_TEMPLATE // Defect template with group3 image and generate template
  1008. Out: Null
  1009. * Return Value:
  1010. int // 0: Success
  1011. // Non-0: Failure
  1012. * Comment:
  1013. * 1、OFFSET_TEMPLATE: Generate a dark field template, note that the ball tube is closed, and the firmware collects a set of dark field images and generates an Offset template
  1014. * 2、GAIN_TEMPLATE: To generate a gain correction template, it is necessary to open the ball tube, adjust the dose switch, and start the plate to collect bright field images and generate a gain template
  1015. * 3、DEFECT_TEMPLATE_ GROUP1: To generate a bad spot correction template, it is necessary to open the ball tube, adjust the dose, and start collecting the first group of bright field images on the flat panel
  1016. * 4、DEFECT_TEMPLATE_ GROUP2: To generate a bad spot correction template, it is necessary to open the ball tube, adjust the dose, and start collecting the second group of bright field images on the flat panel
  1017. * 5、DEFECT_TEMPLATE_ GROUP3: To generate a bad spot correction template, it is necessary to open the ball tube, adjust the dose, and start the plate to collect the third group of bright field images and generate a bad template
  1018. * 6、SOFTWARE_OFFSET_TEMPLATE: Generate a dark field template. Note that the ball tube is closed. The SDK collects a set of dark field images and generates an Offset template
  1019. *********************************************************/
  1020. HBI_FPD_DLL int HBI_GenerateTemplate(void *handle, EnumIMAGE_ACQ_CMD _mode);
  1021. /*********************************************************
  1022. * No: No061
  1023. * Function Name: HBI_DownloadTemplate
  1024. * Function Description: // Download calibration template
  1025. * Parameter Description:
  1026. In: void *handle // unsigned handle pointer
  1027. DOWNLOAD_FILE *downloadfile // Template file object pointer
  1028. emUPLOAD_FILE_TYPE emfiletype-Template type(OFFSET_TMP-offset template.GAIN_TMP-gain template,DEFECT_TMP-defect template)
  1029. int nBinningtype-template binning type(1-binning1*1,2-binning2*2,3-binning3*3,4-binning4*4)
  1030. char filepath-Template absolute path
  1031. Out: Null
  1032. * Return Value:
  1033. int // 0: Success
  1034. // Non-0: Failure
  1035. * Comment:
  1036. *********************************************************/
  1037. HBI_FPD_DLL int HBI_DownloadTemplate(void *handle, DOWNLOAD_FILE *downloadfile);
  1038. /*********************************************************
  1039. * No: No062
  1040. * Function Name: HBI_DownloadTemplateEx
  1041. * Function Description: // Download calibration template
  1042. * Parameter Description:
  1043. In: void *handle // unsigned handle pointer
  1044. DOWNLOAD_MODE *downloadmode - Download template file link list pointer
  1045. DOWNLOAD_FILE *downloadfile - Template file object pointer
  1046. emUPLOAD_FILE_TYPE emfiletype-Template type(OFFSET_TMP-offset template.GAIN_TMP-gain template,DEFECT_TMP-defect template)
  1047. int nBinningtype-template binning type(1-binning1*1,2-binning2*2,3-binning3*3,4-binning4*4)
  1048. char filepath-Template absolute path
  1049. Out: Null
  1050. * Return Value:
  1051. int // 0: Success
  1052. // Non-0: Failure
  1053. * Comment:
  1054. *********************************************************/
  1055. HBI_FPD_DLL int HBI_DownloadTemplateEx(void *handle, DOWNLOAD_MODE *downloadmode);
  1056. /*********************************************************
  1057. * No: No063
  1058. * Function Name: HBI_DownloadTemplateByType
  1059. * Function Description: // Download calibration template by template type
  1060. * Parameter Description:
  1061. In: void *handle // unsigned handle pointer
  1062. int infiletype //Download file types 0-gain template, 1-defect template, 2-offset template, others - not supported.
  1063. Out: Null
  1064. * Return Value:
  1065. int // 0: Success
  1066. // Non-0: Failure
  1067. * Comment:
  1068. *********************************************************/
  1069. HBI_FPD_DLL int HBI_DownloadTemplateByType(void *handle, int infiletype);
  1070. /*********************************************************
  1071. * No: No064
  1072. * Function Name: HBI_StopDownloadTemplate
  1073. * Function Description: // Stop download calibration template
  1074. * Parameter Description:
  1075. In: void *handle // unsigned handle pointer
  1076. Out: Null
  1077. * Return Value: int
  1078. // 0: Success
  1079. // Non-0: Failure
  1080. * Comment:
  1081. *********************************************************/
  1082. HBI_FPD_DLL int HBI_StopDownloadTemplate(void *handle);
  1083. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1084. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1085. /*********************************************************
  1086. * No: No065
  1087. * Function Name: HBI_UpgradeFirmware
  1088. * Function Description: Update firmware information or wireless embedded software
  1089. * Parameter Description:
  1090. In: void *handle // unsigned handle pointer
  1091. char *binfile - Bin file path
  1092. int filetype - 0: FPGA software, 1: Embedded software, 2:pcie driver
  1093. Out: Null
  1094. * Return Value: int
  1095. // 0: Success
  1096. // Non-0: Failure
  1097. * Comment:
  1098. *********************************************************/
  1099. HBI_FPD_DLL int HBI_UpgradeFirmware(void *handle, char *binfile, int filetype=0);
  1100. /*********************************************************
  1101. * No: No066
  1102. * Function Name: HBI_StopUpdateFirmware
  1103. * Function Description: Stop updating firmware
  1104. * Parameter Description:
  1105. In: void *handle // unsigned handle pointer
  1106. Out: Null
  1107. * Return Value: int
  1108. // 0: Success
  1109. // Non-0: Failure
  1110. * Comment:
  1111. *********************************************************/
  1112. HBI_FPD_DLL int HBI_StopUpdateFirmware(void *handle);
  1113. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1114. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1115. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1116. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1117. /*********************************************************
  1118. * No: No067
  1119. * Function Name: HBI_Dumping
  1120. * Function Name: Clear command
  1121. * Parameter Description:
  1122. In: void *handle // unsigned handle pointer
  1123. Out: Null
  1124. * Return Value: int
  1125. // 0: Success
  1126. // Non-0: Failure
  1127. * Comment:
  1128. *********************************************************/
  1129. HBI_FPD_DLL int HBI_Dumping(void *handle);
  1130. /*********************************************************
  1131. * No: No068
  1132. * Function Name: HBI_GetSysParamCfg
  1133. * Function Description: Read back the system RAM/ROM parameters, asynchronous events, and feed back the parameters in the callback function
  1134. * Parameter Description:
  1135. In: void *handle - unsigned handle pointer
  1136. int cmd - rom or ram
  1137. int type - user or admin
  1138. Out: Null
  1139. * Return Value:int
  1140. 0: Success
  1141. Non-0: Failure
  1142. * Comment:
  1143. *********************************************************/
  1144. HBI_FPD_DLL int HBI_GetSysParamCfg(void *handle, int cmd, int type);
  1145. /*********************************************************
  1146. * No: No069
  1147. * Function Name: HBI_SetSysParamCfg
  1148. * Function Description: Set system RAM/ROM parameters
  1149. * Parameter Description:
  1150. In: void *handle - unsigned handle pointer
  1151. int cmd -
  1152. int type -
  1153. RegCfgInfo* pRegCfg -
  1154. Out: Null
  1155. * Return Value:int
  1156. 0: Success
  1157. Non-0: Failure
  1158. * Comment:
  1159. *********************************************************/
  1160. HBI_FPD_DLL int HBI_SetSysParamCfg(void *handle, int cmd, int type, RegCfgInfo* pRegCfg);
  1161. /*********************************************************
  1162. * No: No070
  1163. * Function Name: HBI_SetGigabitEther
  1164. * Function Description: Set network information parameters
  1165. * Parameter Description:
  1166. In: void *handle - unsigned handle pointer
  1167. EtherInfo* pEther,refer to <<HbiType.h>>。
  1168. Out:None
  1169. * Return Value:int
  1170. 0: Success
  1171. Non-0: Failure
  1172. * Comment:
  1173. *********************************************************/
  1174. HBI_FPD_DLL int HBI_SetGigabitEther(void *handle, EtherInfo* pEther);
  1175. /*********************************************************
  1176. * No: No071
  1177. * Function Name: HBI_RetransMissPacket
  1178. * Function Description: Single packet loss retransmission
  1179. * Parameter Description:
  1180. In: void *handle - unsigned handle pointer
  1181. Out: Null
  1182. * Return Value:int
  1183. 0: Success
  1184. Non-0: Failure
  1185. * Comment:
  1186. *********************************************************/
  1187. HBI_FPD_DLL int HBI_RetransMissPacket(void *handle);
  1188. /*********************************************************
  1189. * No: No072
  1190. * Function Name: HBI_RetransMissFrame
  1191. * Function Description: Entire frame retransmission
  1192. * Parameter Description:
  1193. In: void *handle - unsigned handle pointer
  1194. Out: Null
  1195. * Return Value:int
  1196. 0: Success
  1197. Non-0: Failure
  1198. * Comment:
  1199. *********************************************************/
  1200. HBI_FPD_DLL int HBI_RetransMissFrame(void *handle);
  1201. /*********************************************************
  1202. * No: No073
  1203. * Function Name: HBI_IsConnect
  1204. * Function Description: Determine whether the detector is connected
  1205. * Parameter Description:
  1206. In: void *handle - unsigned handle pointer
  1207. * Return Value:int
  1208. 1 - connect
  1209. 0 - disconnect
  1210. * Comment:
  1211. *********************************************************/
  1212. HBI_FPD_DLL int HBI_IsConnect(void *handle);
  1213. /*********************************************************
  1214. * No: No074
  1215. * Function Name: HBI_GetCurFPDStatus
  1216. * Function Description: Get the current status of the detector
  1217. * Parameter Description:
  1218. In: void *handle - unsigned handle pointer
  1219. Out: Null
  1220. * Return Value:int
  1221. 0 - idle status,Idle state
  1222. 1 - busy status,Busy state,Reject the operation
  1223. * Comment:
  1224. *********************************************************/
  1225. HBI_FPD_DLL int HBI_GetCurFPDStatus(void *handle);
  1226. /*********************************************************
  1227. * No: No075
  1228. * Function Name: HBI_SetCapacity
  1229. * Function Description: Set buffer capacity (size)
  1230. * Parameter Description:
  1231. In: void *handle - unsigned handle pointer
  1232. unsigned int nframesize - The number of frames that can be stored,
  1233. The buffer size is equal to the frame size multiplied by the number of frames。
  1234. Out: Null
  1235. * Return Value:int
  1236. 0: Success
  1237. Non-0: Failure,Reference error code ‘HbiError.h'
  1238. * Comment:
  1239. *********************************************************/
  1240. HBI_FPD_DLL int HBI_SetCapacity(void *handle, unsigned int nframesize);
  1241. /*********************************************************
  1242. * No: No076
  1243. * Function Name: HBI_SetRawStyle
  1244. * Function Description: Set whether to save the image and the image file format
  1245. * Parameter Description:
  1246. In: void *handle - unsigned handle pointer
  1247. bool bsave - Save or display,false:Display without saving,true:Save Don't Display
  1248. bool bsingleraw - Save in a single file or multiple files, false: 1 frame data can be saved in one file, true: multiple frame data can be saved in one file
  1249. Out: Null
  1250. * Return Value:int
  1251. 0: Success
  1252. Non-0: Failure
  1253. * Comment:
  1254. *********************************************************/
  1255. HBI_FPD_DLL int HBI_SetRawStyle(void *handle, bool bsave, bool bsingleraw = false);
  1256. /*********************************************************
  1257. * No: No077
  1258. * Function Name: HBI_SetAqcProperty
  1259. * Function Description: Set collection properties
  1260. * Parameter Description:
  1261. In: void *handle - unsigned handle pointer
  1262. FPD_AQC_MODE _mode - Acquisition mode and parameters
  1263. Out: Null
  1264. * Return Value:int
  1265. 0: Success
  1266. Non-0: Failure
  1267. * Comment:
  1268. *********************************************************/
  1269. HBI_FPD_DLL int HBI_SetAqcProperty(void *handle, FPD_AQC_MODE _mode);
  1270. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1271. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1272. /*********************************************************
  1273. * No: No078
  1274. * Function Name: HBI_SetDebugMode
  1275. * Function Description: Switch debugging mode and production mode - used to debug PCIE interface
  1276. * Parameter Description:
  1277. In: void *handle - unsigned handle pointer
  1278. int mode - 0: production mode, 1-PCIE debugging mode
  1279. Out: Null
  1280. * Return Value:int
  1281. 0: Success
  1282. Non-0: Failure
  1283. * Comment:Debug PCIE interface
  1284. *********************************************************/
  1285. HBI_FPD_DLL int HBI_SetDebugMode(void *handle, int mode);
  1286. /*********************************************************
  1287. * No: No079
  1288. * Function Name: HBI_PcieSendBuff
  1289. * Function Description: Send data to PCIE address, valid only in PCIE debugging mode
  1290. * Parameter Description:
  1291. In: void *handle - unsigned handle pointer
  1292. ePCIE_WR_TYPE etype - 'Bar' address or 'ddr' address type
  1293. long addr - 'Bar' address or 'ddr' address
  1294. unsigned char *szSndBuff - Write Buffer
  1295. int nlen - Buffer data length
  1296. Out: Null
  1297. * Return Value:int
  1298. 0: Success
  1299. Non-0: Failure
  1300. * Comment:
  1301. *********************************************************/
  1302. HBI_FPD_DLL int HBI_PcieSendBuff(void *handle, ePCIE_WR_TYPE etype, long addr, unsigned char *szSndBuff, int nlen);
  1303. /*********************************************************
  1304. * No: No080
  1305. * Function Name: HBI_PcieRecvBuff
  1306. * Function Description: Read PCIE address data, valid only in PCIE debug mode
  1307. * Parameter Description:
  1308. In: void *handle - unsigned handle pointer
  1309. ePCIE_WR_TYPE etype - 'Bar' address or 'ddr' address type
  1310. long addr - 'Bar' address or 'ddr' address
  1311. unsigned char *szRcvbuff - Receive Buffer
  1312. int nlen - Buffer data length
  1313. Out: Null
  1314. * Return Value:int
  1315. 0: Success
  1316. Non-0: Failure
  1317. * Comment:
  1318. *********************************************************/
  1319. HBI_FPD_DLL int HBI_PcieRecvBuff(void *handle, ePCIE_WR_TYPE _type, long addr, unsigned char *szRcvbuff, int nlen);
  1320. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1321. // Distributed generation template is used for template testing. For integration, please refer to the interface of rapid generation template
  1322. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1323. /*********************************************************
  1324. * No: No081
  1325. * Function Name: HBI_InitOffsetMode
  1326. * Function Description: Initialize dark field template
  1327. * Parameter Description:
  1328. In: void *handle - unsigned handle pointer
  1329. CALIBRATE_INPUT_PARAM calibrate_param,refer to <<HbiType.h>>。
  1330. Out: Null
  1331. * Return Value:int
  1332. 0: Success
  1333. Non-0: Failure
  1334. * Comment:
  1335. *********************************************************/
  1336. HBI_FPD_DLL int HBI_InitOffsetMode(void *handle, CALIBRATE_INPUT_PARAM calibrate_param);
  1337. /*********************************************************
  1338. * No: No082
  1339. * Function Name: HBI_InsertOffsetMode
  1340. * Function Description: Insert data into offset correction model
  1341. * Parameter Description:
  1342. In: void *handle - unsigned handle pointer
  1343. int group_id - group ID
  1344. char *filepath - File path
  1345. Out: Null
  1346. * Return Value:int
  1347. 0: Success
  1348. Non-0: Failure
  1349. * Comment:
  1350. *********************************************************/
  1351. HBI_FPD_DLL int HBI_InsertOffsetMode(void *handle, int group_id, char *filepath);
  1352. /*********************************************************
  1353. * No: No083
  1354. * Function Name: HBI_ClearOffsetMode
  1355. * Function Description: Clear offset correction model
  1356. * Parameter Description:
  1357. In: void *handle - unsigned handle pointer
  1358. Out: Null
  1359. * Return Value:int
  1360. 0: Success
  1361. Non-0: Failure
  1362. * Comment:
  1363. *********************************************************/
  1364. HBI_FPD_DLL int HBI_ClearOffsetMode(void *handle);
  1365. /*********************************************************
  1366. * No: No084
  1367. * Function Name: HBI_GenerateOffsetTemp
  1368. * Function Description: Generate offset template
  1369. * Parameter Description:
  1370. In: void *handle - unsigned handle pointer
  1371. int raw_num - Number of dark field pictures
  1372. int bprevew - Whether to generate preview template, 1-generate, 0-do not generate
  1373. Out: Null
  1374. * Return Value:int
  1375. 0: Success
  1376. Non-0: Failure
  1377. * Comment:
  1378. *********************************************************/
  1379. HBI_FPD_DLL int HBI_GenerateOffsetTemp(void *handle, int raw_num, int bprevew = 0);
  1380. /*********************************************************
  1381. * No: No085
  1382. * Function Name: HBI_InitGainMode
  1383. * Function Description: Initialize gain correction model
  1384. * Parameter Description:
  1385. In: void *handle - unsigned handle pointer
  1386. CALIBRATE_INPUT_PARAM calibrate_param -Correction parameters
  1387. Out: Null
  1388. * Return Value:int
  1389. 0: Success
  1390. Non-0: Failure
  1391. * Comment:
  1392. *********************************************************/
  1393. HBI_FPD_DLL int HBI_InitGainMode(void *handle, CALIBRATE_INPUT_PARAM calibrate_param);
  1394. /*********************************************************
  1395. * No: No086
  1396. * Function Name: HBI_InsertGainMode
  1397. * Function Description: Insert data into the gain correction model
  1398. * Parameter Description:
  1399. In: void *handle - unsigned handle pointer
  1400. int group_id - group ID
  1401. char *filepath - File path
  1402. Out: Null
  1403. * Return Value:int
  1404. 0: Success
  1405. Non-0: Failure
  1406. * Comment:
  1407. *********************************************************/
  1408. HBI_FPD_DLL int HBI_InsertGainMode(void *handle, int group_id, char *filepath);
  1409. /*********************************************************
  1410. * No: No087
  1411. * Function Name: HBI_ClearGainMode
  1412. * Function Description: Empty gain correction model
  1413. * Parameter Description:
  1414. In: void *handle - unsigned handle pointer
  1415. Out: Null
  1416. * Return Value:int
  1417. 0: Success
  1418. Non-0: Failure
  1419. * Comment:
  1420. *********************************************************/
  1421. HBI_FPD_DLL int HBI_ClearGainMode(void *handle);
  1422. /*********************************************************
  1423. * No: No088
  1424. * Function Name: HBI_GenerateGainTemp
  1425. * Function Description: Generate gain template
  1426. * Parameter Description:
  1427. In: void *handle - unsigned handle pointer
  1428. int group_sum - groups
  1429. int per_group_num - Generate the number of pictures in each group of gain template
  1430. int bprevew - Whether to generate preview template, 1-generate, 0-do not generate
  1431. Out: Null
  1432. * Return Value:int
  1433. 0: Success
  1434. Non-0: Failure
  1435. * Comment:
  1436. *********************************************************/
  1437. HBI_FPD_DLL int HBI_GenerateGainTemp(void *handle, int group_sum, int per_group_num, int bprevew = 0);
  1438. /*********************************************************
  1439. * No: No089
  1440. * Function Name: HBI_InitDefectMode
  1441. * Function Description: Initialize the defect correction model
  1442. * Parameter Description:
  1443. In: void *handle - unsigned handle pointer
  1444. CALIBRATE_INPUT_PARAM calibrate_param - Correction parameters
  1445. Out: Null
  1446. * Return Value:int
  1447. 0: Success
  1448. Non-0: Failure
  1449. * Comment:
  1450. *********************************************************/
  1451. HBI_FPD_DLL int HBI_InitDefectMode(void *handle, CALIBRATE_INPUT_PARAM calibrate_param);
  1452. /*********************************************************
  1453. * No: No090
  1454. * Function Name: HBI_InsertDefectMode
  1455. * Function Description: Insert data into the defect correction model
  1456. * Parameter Description:
  1457. In: void *handle - unsigned handle pointer
  1458. int group_id - group ID
  1459. char *filepath - File path
  1460. Out: Null
  1461. * Return Value:int
  1462. 0: Success
  1463. Non-0: Failure
  1464. * Comment:
  1465. *********************************************************/
  1466. HBI_FPD_DLL int HBI_InsertDefectMode(void *handle, int group_id, char *filepath);
  1467. /*********************************************************
  1468. * No: No091
  1469. * Function Name: HBI_ClearDefectMode
  1470. * Function Description: Empty the defect correction model
  1471. * Parameter Description:
  1472. In: void *handle - unsigned handle pointer
  1473. Out: Null
  1474. * Return Value:int
  1475. 0: Success
  1476. Non-0: Failure
  1477. * Comment:
  1478. *********************************************************/
  1479. HBI_FPD_DLL int HBI_ClearDefectMode(void *handle);
  1480. /*********************************************************
  1481. * No: No092
  1482. * Function Name: HBI_GenerateDefectTemp
  1483. * Function Description: Generate defect template
  1484. * Parameter Description:
  1485. In: void *handle - unsigned handle pointer
  1486. int group_sum - groups
  1487. int per_group_num - Number of pictures in each group
  1488. int bprevew - Whether to generate preview template, 1-generate, 0-do not generate
  1489. Out: Null
  1490. * Return Value:int
  1491. 0: Success
  1492. Non-0: Failure
  1493. * Comment:
  1494. *********************************************************/
  1495. HBI_FPD_DLL int HBI_GenerateDefectTemp(void *handle, int group_sum, int per_group_num, int bprevew = 0);
  1496. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1497. // File working directory address management, not yet support
  1498. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1499. /////*********************************************************
  1500. ////* No: No093
  1501. ////* Function Name: HBI_SetFileDirectory
  1502. ////* Function Description: Set file storage path
  1503. ////* Parameter Description:
  1504. //// In: void *handle - unsigned handle pointer
  1505. //// HBI_FILE_TYPE filetype - File type, enumeration class
  1506. //// 0 IMAGE_FILE
  1507. //// 1 TEMPLATE_FILE
  1508. //// char *dirpath - File path
  1509. //// Out: Null
  1510. ////* Return Value:int
  1511. //// 0: Success
  1512. //// Non-0: Failure
  1513. ////* Comment:
  1514. ////*********************************************************/
  1515. ////HBI_FPD_DLL int HBI_SetFileDirectory(void *handle, HBI_FILE_TYPE filetype, char *dirpath);
  1516. /*********************************************************
  1517. * No: No094
  1518. * Function Name: HBI_GetFileDirectory
  1519. * Function Description: Get the current file storage path
  1520. * Parameter Description:
  1521. In: void *handle - unsigned handle pointer
  1522. HBI_FILE_TYPE filetype - File type, enumeration class
  1523. 0 IMAGE_ FILE - image file directory
  1524. 1 TEMPLATE_ FILE - Calibration template file directory (refers to gain and defect template file path)
  1525. 2 TEMPLATE_ IMG-calibration template middle image data file directory
  1526. Out: Null
  1527. * Return Value:int
  1528. NULL - Failure
  1529. char* - return path
  1530. * Comment:
  1531. *********************************************************/
  1532. HBI_FPD_DLL char* HBI_GetFileDirectory(void *handle, HBI_FILE_TYPE filetype);
  1533. /*********************************************************
  1534. * No: No095
  1535. * Function Name: HBI_GetCurTempFileFullDirectory
  1536. * Function Description: Get the full directory of the current template file according to the template type
  1537. * Parameter Description:
  1538. In: void *handle - unsigned handle pointer
  1539. In: int tempType -Template type (default is 0),0-offset template;1-gain template;2-defect template;
  1540. Out: Null
  1541. * Return Value:char*
  1542. NULL - Failure
  1543. char* - Return directory path
  1544. * Comment:
  1545. *********************************************************/
  1546. HBI_FPD_DLL char* HBI_GetCurTempFileFullDirectory(void *handle, int temptype=0);
  1547. /*********************************************************
  1548. * No: No096
  1549. * Function Name: HBI_IsBusyNow
  1550. * Function Description: Judge whether the current SDK is being processed. The current operation is not allowed
  1551. * Parameter Description:
  1552. In: void *handle - unsigned handle pointer
  1553. eventtype - Generate template type
  1554. 1 Distribution generation template processing
  1555. 2. Rapid template generation is in progress
  1556. 3. During collection
  1557. 4. During parameter setting
  1558. Out: Null
  1559. * Return Value:int
  1560. 0 - idle status,Indicates that the operation can be performed
  1561. 1 - busy status,Indicates that the operation is refused because the status is busy
  1562. * Comment:
  1563. *********************************************************/
  1564. HBI_FPD_DLL int HBI_IsBusyNow(void *handle, int eventtype);
  1565. /*********************************************************
  1566. * No: No097
  1567. * Function Name: HBI_SetCuttingImageRect
  1568. * Function Description: set rect of cutting image
  1569. * Parameter Description:
  1570. In: void *handle - unsigned handle pointer
  1571. In: CuttingImageRect *roi - The param of 'rect of cutting image'
  1572. * Return Value:int
  1573. 0: Success
  1574. Non-0: Failure
  1575. * Comment:
  1576. *********************************************************/
  1577. HBI_FPD_DLL int HBI_SetCuttingImageRect(void *handle, CuttingImageRect*roi);
  1578. /*********************************************************
  1579. * No: No098
  1580. * Function Name: HBI_GetCuttingImageRect
  1581. * Function Description: get rect of cutting image
  1582. * Parameter Description:
  1583. In: void *handle - unsigned handle pointer
  1584. * Return Value:CuttingImageRect*
  1585. NULL - Failure
  1586. Non-NULL - Success,The param of 'rect of cutting image'
  1587. * Comment:
  1588. *********************************************************/
  1589. HBI_FPD_DLL CuttingImageRect* HBI_GetCuttingImageRect(void *handle);
  1590. //////////////////////////////////////////////////////////////////////////
  1591. // User Mode Development add by mhyang 20230327
  1592. //////////////////////////////////////////////////////////////////////////
  1593. /*********************************************************
  1594. * No: No099
  1595. * Function Name: HBI_GetCurModeList
  1596. * Function Description: Get Mode List
  1597. * Parameter Description:
  1598. In: void *handle - unsigned handle pointer
  1599. * Return Value:FPD_MODE_LIST*
  1600. NULL - Failure
  1601. Non-NULL - Success,The param of User Acquisition Mode Parameter Configuration
  1602. * Comment:
  1603. *********************************************************/
  1604. HBI_FPD_DLL FPD_MODE_LIST* HBI_GetCurModeList(void* handle);
  1605. /*********************************************************
  1606. * No: No100
  1607. * Function Name: HBI_UpdateModeList
  1608. * Function Description: Update Mode List
  1609. * Parameter Description:
  1610. In: void *handle - unsigned handle pointer
  1611. FPD_MODE_LIST* modelist -User Acquisition Mode Parameter Configuration
  1612. * Return Value:int
  1613. 0: Success
  1614. Non-0: Failure
  1615. * Comment:
  1616. *********************************************************/
  1617. HBI_FPD_DLL int HBI_UpdateModeList(void* handle, FPD_MODE_LIST* modelist);
  1618. /*********************************************************
  1619. * No: No101
  1620. * Function Name: HBI_GetCurModeData
  1621. * Function Description: Obtain the current Mode Data
  1622. * Parameter Description:
  1623. In: void *handle - unsigned handle pointer
  1624. * Return Value:FPD_MODE_DATA*
  1625. NULL - Failure
  1626. Non-NULL - Success,The param of fpd mode data information
  1627. * Comment:
  1628. *********************************************************/
  1629. HBI_FPD_DLL FPD_MODE_DATA* HBI_GetCurModeData(void* handle);
  1630. /*********************************************************
  1631. * No: No102
  1632. * Function Name: HBI_UpdateCurModeData
  1633. * Function Description: Update current Mode Data
  1634. * Parameter Description:
  1635. In: void *handle - unsigned handle pointer
  1636. FPD_MODE_DATA* mode -fpd mode data information
  1637. * Return Value:int
  1638. 0: Success
  1639. Non-0: Failure
  1640. * Comment:
  1641. *********************************************************/
  1642. HBI_FPD_DLL int HBI_UpdateCurModeData(void* handle, FPD_MODE_DATA* mode);
  1643. /*********************************************************
  1644. * No: No103
  1645. * Function Name: HBI_UpdateModeData
  1646. * Function Description: Update Mode Item Data through Mode ID
  1647. * Parameter Description:
  1648. In: void *handle - unsigned handle pointer
  1649. FPD_MODE_DATA* mode -fpd mode data information
  1650. unsigned int id - mode id
  1651. * Return Value:int
  1652. 0: Success
  1653. Non-0: Failure
  1654. * Comment:
  1655. *********************************************************/
  1656. HBI_FPD_DLL int HBI_UpdateModeData(void* handle, FPD_MODE_DATA* mode, unsigned int id = 0);
  1657. /*********************************************************
  1658. * No: No104
  1659. * Function Name: HBI_GetModeData
  1660. * Function Description: Obtain Mode Data through Mode ID
  1661. * Parameter Description:
  1662. In: void *handle - unsigned handle pointer
  1663. unsigned int id - mode id
  1664. * Return Value:int
  1665. 0: Success
  1666. Non-0: Failure
  1667. * Comment:
  1668. *********************************************************/
  1669. HBI_FPD_DLL FPD_MODE_DATA* HBI_GetModeData(void* handle, unsigned int id = 0);
  1670. /*********************************************************
  1671. * No: No105
  1672. * Function Name: HBI_GetModeListSize
  1673. * Function Description: Obtain the number of items for Mode
  1674. * Parameter Description:
  1675. In: void *handle - unsigned handle pointer
  1676. * Return Value:int
  1677. 0: Success
  1678. Non-0: Failure
  1679. * Comment:
  1680. *********************************************************/
  1681. HBI_FPD_DLL unsigned int HBI_GetModeListSize(void* handle);
  1682. /*********************************************************
  1683. * No: No106
  1684. * Function Name: HBI_GetCurModeID
  1685. * Function Description: Obtain the current Mode ID
  1686. * Parameter Description:
  1687. In: void *handle - unsigned handle pointer
  1688. * Return Value:int
  1689. 0: Success
  1690. Non-0: Failure
  1691. * Comment:
  1692. *********************************************************/
  1693. HBI_FPD_DLL int HBI_GetCurModeID(void* handle);
  1694. /*********************************************************
  1695. * No: No107
  1696. * Function Name: HBI_SwitchUserMode
  1697. * Function Description: Switch Mode
  1698. * Parameter Description:
  1699. In: void *handle - unsigned handle pointer
  1700. unsigned int modeid - mode id
  1701. FPD_MODE_DATA *PMODEDATA - fpd mode data information
  1702. * Return Value:int
  1703. 0: Success
  1704. Non-0: Failure
  1705. * Comment:
  1706. *********************************************************/
  1707. HBI_FPD_DLL int HBI_SwitchUserMode(void* handle, unsigned int modeid = 0, FPD_MODE_DATA *PMODEDATA=NULL);
  1708. /*********************************************************
  1709. * No: No108
  1710. * Function Name: HBI_ModeExists
  1711. * Function Description: Determine whether the mode exists
  1712. * Parameter Description:
  1713. In: void *handle - unsigned handle pointer
  1714. FPD_MODE_DATA mode - fpd mode data information
  1715. * Return Value:int
  1716. 0: Success
  1717. Non-0: Failure
  1718. * Comment:
  1719. *********************************************************/
  1720. HBI_FPD_DLL int HBI_ModeExists(void* handle, FPD_MODE_DATA mode);
  1721. /*********************************************************
  1722. * No: No109
  1723. * Function Name: HBI_CheckCurtMode
  1724. * Function Description: Judge whether the mode is normal
  1725. * Parameter Description:
  1726. In: void *handle - unsigned handle pointer
  1727. * Return Value:int
  1728. 0: Success
  1729. Non-0: Failure
  1730. * Comment:
  1731. *********************************************************/
  1732. HBI_FPD_DLL bool HBI_CheckCurtMode(void* handle);
  1733. /*********************************************************
  1734. * No: No110
  1735. * Function Name: HBI_ModeCorrectTempalteEnable
  1736. * Function Description: The calibration template of Mode is effective or not effective
  1737. * Parameter Description:
  1738. In: void *handle - unsigned handle pointer
  1739. unsigned int id - mode id
  1740. bool bEnable - 1 - vailid, 0-invaild
  1741. * Return Value:int
  1742. 0: Success
  1743. Non-0: Failure
  1744. * Comment:
  1745. *********************************************************/
  1746. HBI_FPD_DLL int HBI_ModeCorrectTempalteEnable(void* handle, unsigned int id, bool bEnable = true);
  1747. /*********************************************************
  1748. * No: No111
  1749. * Function Name: HBI_AllModeCorrectTempalteEnable
  1750. * Function Description: All calibration templates for Mode items are valid or not valid
  1751. * Parameter Description:
  1752. In: void *handle - unsigned handle pointer
  1753. bool bEnable - 1 - vailid, 0-invaild
  1754. * Return Value:int
  1755. 0: Success
  1756. Non-0: Failure
  1757. * Comment:
  1758. *********************************************************/
  1759. HBI_FPD_DLL int HBI_AllModeCorrectTempalteEnable(void* handle, bool bEnable = true);
  1760. /*********************************************************
  1761. * No: No112
  1762. * Function Name: HBI_SaveModeList2File
  1763. * Function Description: Save the current user mode list
  1764. * Parameter Description:
  1765. In: void *handle - unsigned handle pointer
  1766. char* szPath - file path
  1767. * Return Value:int
  1768. 0: Success
  1769. Non-0: Failure
  1770. * Comment:
  1771. *********************************************************/
  1772. HBI_FPD_DLL int HBI_SaveModeList2File(void* handle, char* szPath = NULL);
  1773. /*********************************************************
  1774. * No:No113
  1775. * Function name: HBI_DownloadModeTemplate (new)
  1776. * Function description: Download template based on Mode parameter
  1777. * Parameter Description:
  1778. In: void * handle - Handle (unsigned pointer)
  1779. Int intemptype - Download file types 0-gain template, 1-defect template, 2-offset template, others - Not supported
  1780. Out: None
  1781. * Return value: int
  1782. 0- Success
  1783. Non 0- Failed
  1784. * Note: Download template add by mhyang 20230606
  1785. *********************************************************/
  1786. HBI_FPD_DLL int HBI_DownloadModeTemplate(void* handle, DOWNLOAD_MODE_FILE downloadfile);
  1787. /*********************************************************
  1788. * No:No114
  1789. * Function name: HBI_ DownloadModeTemplateByType (new)
  1790. * Function description: Download correction template files by template type (default to current Mode Id)
  1791. * Parameter Description:
  1792. In: void * handle - Handle (unsigned pointer)
  1793. Int intemptype - Download file types 0-gain template, 1-defect template, 2-offset template, others - Not supported
  1794. Out: None
  1795. * Return value: int
  1796. 0- Success
  1797. Non 0- Failed
  1798. * Note: Download template add by mhyang 20230606
  1799. *********************************************************/
  1800. HBI_FPD_DLL int HBI_DownloadModeTemplateByType(void* handle, int intemptype);
  1801. /*********************************************************
  1802. * No:No115
  1803. * Function name: HBI_DownloadModeTemplateByIdAndType (new)
  1804. * Function description: Download correction template files according to Mode Id and template type
  1805. * Parameter Description:
  1806. In: void * handle - Handle (unsigned pointer)
  1807. Unsigned int modeid - Mode Id [0,9]
  1808. Int intemptype - Download file types 0-gain template, 1-defect template, 2-offset template, others - Not supported
  1809. Out: None
  1810. * Return value: int
  1811. 0- Success
  1812. Non 0- Failed
  1813. * Note: Download template add by mhyang 20230605
  1814. *********************************************************/
  1815. HBI_FPD_DLL int HBI_DownloadModeTemplateByIdAndType(void* handle, unsigned int modeid, int intemptype);
  1816. /*********************************************************
  1817. * No:No116
  1818. * Function Name: HBI_GetCurModeTemplateStatus(new)
  1819. * Function Description: 获取当前Mode项的固件校正模板状态
  1820. * Parameter Description:
  1821. In: void *handle - unsigned handle pointer
  1822. unsigned int modeid - Mode Id [0,9]
  1823. int intemptype - Download file types 0-gain template, 1-defect template, 2-offset template, others - not supported
  1824. Out: None
  1825. * Return Value:int
  1826. 0: Success
  1827. Non-0: Failure
  1828. * Comment:
  1829. *********************************************************/
  1830. HBI_FPD_DLL int HBI_GetCurModeTemplateStatus(void* handle, int* nTempStatus);
  1831. //////////////////////////////////////////////////////////////////////////
  1832. // User Mode Development add by mhyang 20230328
  1833. //////////////////////////////////////////////////////////////////////////
  1834. /*********************************************************
  1835. * No:No117
  1836. * Function Name: HBI_GetCurrentCorrectFilePath
  1837. * Function Description: Obtain the absolute path of the current template file according to the template type
  1838. * Parameter Description:
  1839. In: void *handle - unsigned handle pointer
  1840. In: int tempType -Template type (default is 0),0-offset template;1-gain template;2-defect template;3-defect map template;4-gainb template;
  1841. Out: Null
  1842. * Return Value:char*
  1843. NULL - Failure
  1844. char* - Return absolute path
  1845. * Comment:
  1846. *********************************************************/
  1847. HBI_FPD_DLL char* HBI_GetCurrentCorrectFilePath(void *handle, int tempType=0);
  1848. /*********************************************************
  1849. * No:No118
  1850. * Function name: HBI_DetectorPrimaryAuthor
  1851. * Function description: 略
  1852. * Parameter Description:
  1853. In: void * handle - Handle (unsigned pointer)
  1854. Int pcode -
  1855. Out: None
  1856. * Return value: int
  1857. 0- Success
  1858. Non 0- Failed
  1859. * Note: add by mhyang 20211228
  1860. *********************************************************/
  1861. HBI_FPD_DLL int HBI_DetectorPrimaryAuthor(void *handle, char *pcode);
  1862. /*********************************************************
  1863. * No:No119
  1864. * Function name: HBI_DetectorSecondaryAuthor
  1865. * Function description: 略
  1866. * Parameter Description:
  1867. In: void * handle - Handle (unsigned pointer)
  1868. Int pcode -
  1869. Out: None
  1870. * Return value: int
  1871. 0- Success
  1872. Non 0- Failed
  1873. * Note: add by mhyang 20220211
  1874. *********************************************************/
  1875. HBI_FPD_DLL int HBI_DetectorSecondaryAuthor(void *handle, char *pcode);
  1876. /*********************************************************
  1877. * No: No120
  1878. * Function Name: HBI_DownloadImage
  1879. * Function Description: Download image (wireless detector)
  1880. * Parameter Description:
  1881. In: void *handle - unsigned handle pointer
  1882. int beginnumber - Download start image sequence number
  1883. * Return Value:int
  1884. 0: Success
  1885. Non-0: Failure
  1886. * Comment:
  1887. *********************************************************/
  1888. HBI_FPD_DLL int HBI_DownloadImage(void *handle, int beginnumber = 1);
  1889. /*********************************************************
  1890. * No: No121
  1891. * Function Name: HBI_SetSleepState
  1892. * Function Description: Set the detector to sleep (wireless detector)
  1893. * Parameter Description:
  1894. In: void *handle - unsigned handle pointer
  1895. * Return Value:int
  1896. 0: Success
  1897. Non-0: Failure
  1898. * Comment:
  1899. *********************************************************/
  1900. HBI_FPD_DLL int HBI_SetSleepState(void *handle);
  1901. /*********************************************************
  1902. * No: No122
  1903. * Function Name: HBI_WakeUpFpd
  1904. * Function Description: Wake up tablet from sleep (wireless detector)
  1905. * Parameter Description:
  1906. In: void *handle - unsigned handle pointer
  1907. * Return Value:int
  1908. 0: Success
  1909. Non-0: Failure
  1910. * Comment:
  1911. *********************************************************/
  1912. HBI_FPD_DLL int HBI_WakeUpFpd(void *handle);
  1913. /*********************************************************
  1914. * No: No123
  1915. * Function Name: HBI_EnableEmmcStorage
  1916. * Function Description: Emmc storage image enable (wireless detector)
  1917. * Parameter Description:
  1918. In: void *handle - unsigned handle pointer
  1919. int nenable - 1: Save, others: not save
  1920. * Return Value:int
  1921. 0: Success
  1922. Non-0: Failure
  1923. * Comment:
  1924. *********************************************************/
  1925. HBI_FPD_DLL int HBI_EnableEmmcStorage(void *handle, int nenable = 0);
  1926. /*********************************************************
  1927. * No: No124
  1928. * Function Name: HBI_ReflashBatteryStatusInfo
  1929. * Function Description: Refresh battery information (wireless detector)
  1930. * Parameter Description:
  1931. In: void *handle - unsigned handle pointer
  1932. * Return Value:int
  1933. 0: Success
  1934. Non-0: Failure
  1935. * Comment: Asynchronous function, feedback through callback function
  1936. *********************************************************/
  1937. HBI_FPD_DLL int HBI_ReflashBatteryStatusInfo(void *handle);
  1938. /*********************************************************
  1939. * No: No125
  1940. * Function Name: HBI_GetBatteryStatusInfo
  1941. * Function Description: Get battery information (wireless detector)
  1942. * Parameter Description:
  1943. In: void *handle - unsigned handle pointer
  1944. BATTERY_STATUS_INFO *pBatteryStatus - Battery status information, refer to <<HbiType.h>>
  1945. Out:BATTERY_STATUS_INFO *pBatteryStatus
  1946. * Return Value:int
  1947. 0: Success
  1948. Non-0: Failure
  1949. * Comment:Synchronization function, parameters are synchronized and fed back to the upper computer through input parameters
  1950. *********************************************************/
  1951. HBI_FPD_DLL int HBI_GetBatteryStatusInfo(void *handle, BATTERY_STATUS_INFO *pBatteryStatus);
  1952. /////////////////////////////////////////////////////////////////////////////////////////////
  1953. /////////////////////////////////////////////////////////////////////////////////////////////
  1954. /*********************************************************
  1955. * No: No126
  1956. * Function Name: HBI_TriggerBinningAcqTime
  1957. * Function Description: // Work mode, binning, frame speed setting
  1958. * Parameter Description:
  1959. In: void *handle // unsigned handle pointer
  1960. int triggerMode // Work mode
  1961. // Static:
  1962. // 01: Software trigger mode;
  1963. // 02: Clear;
  1964. // 03: High voltage generator(hvg) trigger mode;
  1965. // 04: Auto exposure detection mode.
  1966. // Dynamic:
  1967. // 05: Hvg pulse sync in trigger mode;
  1968. // 06: Fpd pulse sync out trigger Mode;
  1969. // 07: Free run mode.
  1970. unsigned char binning
  1971. // 1: 1x1,
  1972. // 2: 2x2,
  1973. // 3: 3x3,
  1974. // 4: 4x4,
  1975. int time // Live acquisition span time, unit: ms
  1976. // For example: 1000ms (1fps), 500ms (2fps), 250ms (4fps),125ms (8fps)
  1977. Out: Null
  1978. * Return Value:
  1979. int // 0: Success
  1980. // Non-0: Failure
  1981. * Comment:
  1982. *********************************************************/
  1983. HBI_FPD_DLL int HBI_TriggerBinningAcqTime(void *handle, int triggerMode, unsigned char binning, int acqtime, int nfeedback = 0);
  1984. /*********************************************************
  1985. * No: No127
  1986. * Function Name: HBI_PgaBinningAcqTime
  1987. * Function Description: // PGA gain stage, binning, frame speed setting
  1988. * Parameter Description:
  1989. In: void *handle // unsigned handle pointer
  1990. int nPgaLevel // PGA gain stage
  1991. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  1992. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  1993. unsigned char binning
  1994. // 1: 1x1,
  1995. // 2: 2x2,
  1996. // 3: 3x3,
  1997. // 4: 4x4,
  1998. int acqtime // Live acquisition span time, unit: ms
  1999. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2000. // Non-1: Feedback setting success status
  2001. * Return Value:
  2002. int // 0: Success
  2003. // Non-0: Failure
  2004. * Comment:
  2005. *********************************************************/
  2006. HBI_FPD_DLL int HBI_PgaBinningAcqTime(void *handle, int nPgaLevel, unsigned char binning, int acqtime, int nfeedback = 0);
  2007. /*********************************************************
  2008. * No: No128
  2009. * Function Name: HBI_TriggerPgaBinningAcqTime
  2010. * Function Description: // trigger mode, PGA gain stage, binning type, frame speed setting
  2011. * Parameter Description:
  2012. In: void *handle // unsigned handle pointer
  2013. int triggerMode // Work mode
  2014. // Static:
  2015. // 01: Software trigger mode;
  2016. // 02: Clear;
  2017. // 03: High voltage generator(hvg) trigger mode;
  2018. // 04: Auto exposure detection mode.
  2019. // Dynamic:
  2020. // 05: Hvg pulse sync in trigger mode;
  2021. // 06: Fpd pulse sync out trigger Mode;
  2022. // 07: Free run mode.
  2023. int nPgaLevel // PGA gain stage
  2024. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  2025. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  2026. unsigned char binning
  2027. // 1: 1x1,
  2028. // 2: 2x2,
  2029. // 3: 3x3,
  2030. // 4: 4x4,
  2031. int acqtime // Live acquisition span time, unit: ms
  2032. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2033. // Non-1: Feedback setting success status
  2034. * Return Value:
  2035. int // 0: Success
  2036. // Non-0: Failure
  2037. * Comment:
  2038. *********************************************************/
  2039. HBI_FPD_DLL int HBI_TriggerPgaBinningAcqTime(void *handle, int triggerMode, int nPgaLevel, unsigned char binning, int acqtime, int nfeedback = 0);
  2040. /*********************************************************
  2041. * No: No129
  2042. * Function Name: HBI_PgaAcqTime
  2043. * Function Description: // PGA gain stage, frame speed setting
  2044. * Parameter Description:
  2045. In: void *handle // unsigned handle pointer
  2046. int nPgaLevel // PGA gain stage
  2047. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  2048. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  2049. int acqtime // Live acquisition span time, unit: ms
  2050. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2051. // Non-1: Feedback setting success status
  2052. * Return Value: int
  2053. // 0: Success
  2054. // Non-0: Failure
  2055. * Comment:
  2056. *********************************************************/
  2057. HBI_FPD_DLL int HBI_PgaAcqTime(void *handle, int nPgaLevel, int acqtime, int nfeedback = 0);
  2058. /*********************************************************
  2059. * No: No130
  2060. * Function Name: HBI_SwitchNetTypeWlanMode
  2061. * Function Description: Switch wireless 2.4G/5G network and WLAN AP/Client Mode (wireless flat panel detector)
  2062. * Parameter Description:
  2063. In: void *handle - unsigned handle pointer
  2064. int nNetType - Wireless network type,1-2.4G,2-5G,Other - invalid
  2065. int nWlanMode- Wireless mode,1-AP Mode,2-Client Mode,3-Wired Mode,Other - invalid
  2066. * Return Value:int
  2067. // 0: Success
  2068. // Non-0: Failure
  2069. * Comment:
  2070. *********************************************************/
  2071. HBI_FPD_DLL int HBI_SwitchNetTypeWlanMode(void *handle, int nNetType, int nWlanMode);
  2072. /*********************************************************
  2073. * No: No131
  2074. * Function Name: HBI_ReadPcieVersion
  2075. * Function Description: Get PCIe card version number
  2076. * Parameter Description:
  2077. In: void *handle - unsigned handle pointer
  2078. In/Out: char *szVersion,At least 16 bytes
  2079. * Return Value:int
  2080. 0: Success
  2081. Non-0: Failure
  2082. * Comment:
  2083. *********************************************************/
  2084. HBI_FPD_DLL int HBI_ReadPcieVersion(void *handle, char *szVersion);
  2085. /*********************************************************
  2086. * No: No132
  2087. * Function Name: HBI_GeneratePreviewTemplate
  2088. * Function Description: Quickly generate Preview image template
  2089. * Parameter Description:
  2090. In: void *handle - unsigned handle pointer
  2091. EnumIMAGE_ACQ_CMD _mode - Template Type
  2092. OFFSET_TEMPLATE_TYPE preview-offset Template
  2093. GAIN_TEMPLATE_TYPE preview-gain Template
  2094. DEFECT_TEMPLATE_GROUP1, preview-defect Template
  2095. Out: Null
  2096. * Return Value:int
  2097. 0: Success
  2098. Non-0: Failure
  2099. * Comment:
  2100. *********************************************************/
  2101. HBI_FPD_DLL int HBI_GeneratePreviewTemplate(void *handle, EnumIMAGE_ACQ_CMD _mode);
  2102. /*********************************************************
  2103. * No: No133
  2104. * Function Name: HBI_SetImageRotateAndFlip
  2105. * Function Description: Rotate 90 ° or enable mirroring (SDK processing, applicable to low frame rate or small resolution tablets)
  2106. * Parameter Description:
  2107. In: void *handle - unsigned handle pointer
  2108. In: int nRotate - 0-Do nothing;1-Left Rotate 90°;02-"Right Rotate 90°;
  2109. In: int nFlip - 0-Do nothing;1-Horizontal mirror;2-Mirror vertically;
  2110. Out: Null
  2111. * Return Value:int
  2112. 0: Success
  2113. Non-0: Failure
  2114. * Comment:image processing,By default, rotate before mirro
  2115. *********************************************************/
  2116. HBI_FPD_DLL int HBI_SetImageRotateAndFlip(void *handle, int nRotate, int nFlip);
  2117. /*********************************************************
  2118. * No: No134
  2119. * Function Name: HBI_Switch2Bit8Image
  2120. * Function Description: Switch or cancel Bit8 image, cancel automatic switch to Bit16 image (normal image)
  2121. * Parameter Description:
  2122. In: void *handle - unsigned handle pointer
  2123. int nbit8 - Bit8 Image switch control parameters, 0-Bit16 image, 1-Bit8 image, other - Bit16 image
  2124. int nwindowwidth - window width,0~65535(Bit8 Image validation)
  2125. int nwindowleveling - window level~65535(Bit8 Image validation)
  2126. * Return Value:int
  2127. 0: Success
  2128. Non-0: Failure
  2129. * Comment:
  2130. *********************************************************/
  2131. HBI_FPD_DLL int HBI_Switch2Bit8Image(void *handle, int nbit8, int nwindowwidth, int nwindowleveling);
  2132. // /*********************************************************
  2133. // * No: No135
  2134. // * Function Name: HBI_OpenTemplateWizard
  2135. // * Function Description: Open the correction template generation tool
  2136. // * Parameter Description:
  2137. // In: void *handle - unsigned handle pointer
  2138. // * Return Value:int
  2139. // 0: Success
  2140. // Non-0: Failure
  2141. // * Comment:
  2142. // *********************************************************/
  2143. // HBI_FPD_DLL int HBI_OpenTemplateWizard(void *handle);
  2144. /*********************************************************
  2145. * No: No136
  2146. * Function Name: HBI_ReadFromUserDdr
  2147. * Function Description: Read user ddr information (customized)
  2148. * Parameter Description:
  2149. In: void *handle - unsigned handle pointer
  2150. unsigned char *szRcvbuff - Receive Buffer,size=1024
  2151. int/out *nlen - Buffer data length pointer(<=1024),The initial value is szRcvbuff size
  2152. Out: Null
  2153. * Return Value:int
  2154. 0: Success
  2155. Non-0: Failure
  2156. * Comment:
  2157. *********************************************************/
  2158. HBI_FPD_DLL int HBI_ReadFromUserDdr(void* handle, unsigned char* szRcvBuff, int *nlen);
  2159. /*********************************************************
  2160. * No: No137
  2161. * Function Name: HBI_WriteToUserDdr
  2162. * Function Description: Write content to user ddr (user-defined)
  2163. * Parameter Description:
  2164. In: void *handle - unsigned handle pointer
  2165. unsigned char *szSndBuff - Write Buffer
  2166. int nlen - Buffer data length(<=1024)
  2167. Out: Null
  2168. * Return Value:int
  2169. 0: Success
  2170. Non-0: Failure
  2171. * Comment:
  2172. *********************************************************/
  2173. HBI_FPD_DLL int HBI_WriteToUserDdr(void* handle, unsigned char* szSndBuff, int nlen);
  2174. /*********************************************************
  2175. * No: No138
  2176. * Function Name: HBI_SetRoiMode
  2177. * Function Description: -silicon ROI region setting function.
  2178. * Currentlyonly 1613-125um、3030-140um、4343-100um、2530-100um are supported.
  2179. * Parameter Description:
  2180. In: void *handle - unsigned handle pointer
  2181. int nMode - ROI mode
  2182. for example,1613-125um:0-Normal Image,w*h(1248*1024), Rect(0,0,1247,1023);
  2183. 1-w*h(32*1024), Rect(608,0,639,1023);
  2184. 2-w*h(1248*32), Rect(0,496,1247,527);
  2185. 3-w*h(1248*64), Rect(0,480,1247,543);
  2186. 4-w*h(1248*128),Rect(0,448,1247,575);
  2187. Others-Normal Image。
  2188. 3030-140um:0-Normal Image,w*h(2048*2048), Rect(0,0,2047,2047);
  2189. 1-w*h(1024*2048),Rect(512,0,1535,2047);
  2190. Others-Normal Image。
  2191. 4343-100um:0-Normal Image,w*h(4288*4288), Rect(0,0,4287,4287);
  2192. 1-w*h(4288*800),Rect(0,1743,4287,2544);
  2193. Others-Normal Image。
  2194. 2530-100um:0-Normal Image,w*h(2432*3072), Rect(0,0,2431,3071);
  2195. 1-w*h(1808*1800),Rect(316,636,2115,2435);
  2196. 2-w*h(1312*1300),Rect(566,886,1865,2185);
  2197. Others-Normal Image。
  2198. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2199. // Non-1: Feedback setting success status
  2200. Out: Null
  2201. * Return Value:int
  2202. 0: Success
  2203. Non-0: Failure
  2204. * Comment:only 1613-125um、3030-140um、4343-100um、2530-100um are supported。
  2205. *********************************************************/
  2206. HBI_FPD_DLL int HBI_SetRoiMode(void* handle, int nMode, int nfeedback=1);
  2207. /*********************************************************
  2208. * No: No139
  2209. * Function Name: HBI_SetZoomModeRect
  2210. * Function Description: The ZOOM Mode region setting function for CMOS tablets
  2211. * currently supports only CMOS - 1412-50um and CMOS - 0606-50um ,1917-120umtablet types.
  2212. * Parameter Description:
  2213. In: void *handle - unsigned handle pointer
  2214. CMOS_ZOOM_RECT stZoomRect - Zoom region
  2215. The region is represented by left, top, right, and bottom.
  2216. for example, when left, top, right and bottom are illegal values, the image will display the full image by default,
  2217. 1>When left=top=right=bottom=0, the whole picture is displayed;
  2218. 2>When eft<0 or left>width, the whole picture will be displayed, and others are the same.
  2219. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2220. // Non-1: Feedback setting success status
  2221. Out: Null
  2222. * Return Value:int
  2223. 0: Success
  2224. Non-0: Failure
  2225. * Comment: currently supports only CMOS - 1412-50um and CMOS - 0606-50um 1917-120um tablet types.
  2226. *********************************************************/
  2227. HBI_FPD_DLL int HBI_SetZoomModeRect(void* handle, CMOS_ZOOM_RECT stZoomRect, int nfeedback = 1);
  2228. /*********************************************************
  2229. * No: No140
  2230. * Function Name: HBI_SetCorrectFileDirectory
  2231. * Function Description: User set correction file home directory
  2232. * If this interface is not called, the calibration file defaults to the DLL directory
  2233. * Setting failed. The default is the current path
  2234. * Parameter Description:
  2235. In: void *handle - unsigned handle pointer
  2236. char *pUserDir - User defined correction file directory,for example,
  2237. ”E:\\***\\***\\
  2238. ” Out: Null
  2239. * Return Value:int
  2240. 0: Success
  2241. Non-0: Failure
  2242. * Comment:
  2243. *********************************************************/
  2244. HBI_FPD_DLL int HBI_SetCorrectFileDirectory(void* handle, char *pUserDir);
  2245. /*********************************************************
  2246. * No: No141
  2247. * Function Name: HBI_GetCorrectFileDirectory
  2248. * Function Description: Obtain the home directory of user correction files
  2249. * Parameter Description:
  2250. In: void *handle - unsigned handle pointer
  2251. Out: Null
  2252. * Return Value:int
  2253. 0: Success
  2254. Non-0: Failure
  2255. * Comment:
  2256. *********************************************************/
  2257. HBI_FPD_DLL char* HBI_GetCorrectFileDirectory(void* handle);
  2258. /*********************************************************
  2259. * No: No142
  2260. * Function Name: HBI_RestoreCorrectDefaultDirectory
  2261. * Function Description: Restore correction file default path
  2262. * Parameter Description:
  2263. In: void *handle - unsigned handle pointer
  2264. Out: Null
  2265. * Return Value:int
  2266. 0: Success
  2267. Non-0: Failure
  2268. * Comment:
  2269. *********************************************************/
  2270. HBI_FPD_DLL int HBI_RestoreCorrectDefaultDirectory(void* handle);
  2271. /*********************************************************
  2272. * No: No143
  2273. * Function Name: HBI_SSGCTRegCallbackFunc(newly increased)
  2274. * Function Description: Register single-step template callback handler
  2275. * Parameter Description:
  2276. In: void *handle - unsigned handle pointer
  2277. SSGCT_CALLBACK_FUNC callbackfun - Registering Callbacks
  2278. void *pContext- Object pointer. Generally, the upper computer software transfers the object pointer of a module to the SDK, and the callback function feeds back to the upper computer so that static or global functions can access other objects. It can also be null pointer.
  2279. Out: Null
  2280. * Return Value:int
  2281. 0: Success
  2282. Non-0: Failure
  2283. * Comment:Single Step Generate Template-SSGT
  2284. *********************************************************/
  2285. HBI_FPD_DLL int HBI_SSGCTRegCallbackFunc(void* handle, SSGCT_CALLBACK_FUNC callbackfun, void* pObject);
  2286. /*********************************************************
  2287. * No: No144
  2288. * Function Name: HBI_SSCGTEnableMode(newly increased)
  2289. * Function Description: The single-frame acquisition preparation command activates the single-step image acquisition generation template mode or restores the normal image acquisition mode
  2290. * Parameter Description:
  2291. In: void *handle - unsigned handle pointer
  2292. Int nMode - (1): generate offset template;
  2293. (2) : Generate gain template;
  2294. (3) : generate a defect template;
  2295. (4) : generate gain and defect templates;
  2296. (0 or other): Exit the single-step template generation mode and return to the normal drawing mode;
  2297. Int nGroups - Number of groups
  2298. Int nPreGroup - Number of images captured per group
  2299. Out: Null
  2300. * Return Value:int
  2301. 0: Success
  2302. Non-0: Failure
  2303. * Comment:Single Step Generate Correction Template-SSGT
  2304. *********************************************************/
  2305. HBI_FPD_DLL int HBI_SSGCTEnableMode(void* handle, int nMode, int nGroups=3, int nPreGroup=3);
  2306. /*********************************************************
  2307. * No: No145
  2308. * Function Name: HBI_SSGCTPrepare(newly increased)
  2309. * Function Description: Single frame acquisition preparation instruction
  2310. * Parameter Description:
  2311. In : void* handle - unsigned handle pointer
  2312. Out : None
  2313. * Return Value: int
  2314. 0: Success
  2315. Non-0: Failure
  2316. * Comment: Single Step Generate Correction Template-SSGT
  2317. *********************************************************/
  2318. HBI_FPD_DLL int HBI_SSGCTPrepare(void* handle);
  2319. /*********************************************************
  2320. * No: No146
  2321. * Function Name: HBI_SSGCTSingleShot(newly increased)
  2322. * Function Description: Single frame acquisition
  2323. * Parameter Description:
  2324. In: void *handle - unsigned handle pointer
  2325. Out: Null
  2326. * Return Value:int
  2327. 0: Success
  2328. Non-0: Failure
  2329. * Comment: Single Step Generate Correction Template-SSGT
  2330. *********************************************************/
  2331. HBI_FPD_DLL int HBI_SSGCTSingleShot(void* handle);
  2332. /*********************************************************
  2333. * No: No147
  2334. * Function Name: HBI_SSGCTGenerateTemplate(newly increased)
  2335. * Function Description: Generate Template
  2336. * Parameter Description:
  2337. In: void *handle - unsigned handle pointer
  2338. Out: Null
  2339. * Return Value:int
  2340. 0: Success
  2341. Non-0: Failure
  2342. * Comment: Single Step Generate Correction Template-SSGT
  2343. *********************************************************/
  2344. HBI_FPD_DLL int HBI_SSGCTGenerateTemplate(void* handle);
  2345. /*********************************************************
  2346. * No: No148
  2347. * Function Name: HBI_SSGCTDownloadTemplate(newly increased)
  2348. * Function Description: Download calibration template
  2349. * Parameter Description:
  2350. In: void *handle - unsigned handle pointer
  2351. int infiletype -Download file types: 1-offset template, 2-gain template, 3-defect template, others - not supported
  2352. Out: Null
  2353. * Return Value:int
  2354. 0: Success
  2355. Non-0: Failure
  2356. * Comment: Single Step Generate Correction Template-SSGT
  2357. *********************************************************/
  2358. HBI_FPD_DLL int HBI_SSGCTDownloadTemplate(void* handle, int infiletype);
  2359. /*********************************************************
  2360. * No: No149
  2361. * Function Name: HBI_UpdateWirelessNetwork(newly increased)
  2362. * Function Description: Update wireless network configuration
  2363. * Parameter Description:
  2364. In: void *handle - unsigned handle pointer
  2365. EtherInfo ether - Network configuration parameter structure, refer to <<HbiType.h>>
  2366. Out: Null
  2367. * Return Value:int
  2368. 0: Success
  2369. Non-0: Failure
  2370. * Comment: wireless FPD network config
  2371. *********************************************************/
  2372. HBI_FPD_DLL int HBI_UpdateWirelessNetwork(void* handle, EtherInfo ether);
  2373. /*********************************************************
  2374. * No: No150
  2375. * Function Name: HBI_GetWirelessNetWork(newly increased)
  2376. * Function Description: Get wireless network configuration (asynchronous message, callback function feedback)
  2377. * Parameter Description:
  2378. In: void *handle - unsigned handle pointer
  2379. Out: Null
  2380. * Return Value:int
  2381. 0: Success
  2382. Non-0: Failure
  2383. * Comment: wireless FPD network config
  2384. *********************************************************/
  2385. HBI_FPD_DLL int HBI_GetWirelessNetwork(void* handle);
  2386. /*********************************************************
  2387. * No: No151
  2388. * Function Name: HBI_UpdateWirelessSecurityKey(newly increased)
  2389. * Function Description: Modify wireless network security key
  2390. * Parameter Description:
  2391. In: void *handle - unsigned handle pointer
  2392. int wirelessmode - Wireless network mode,1-AP mode,2-Client mode
  2393. char *pkey - Security key
  2394. int nkeylen - Security key length (10 significant characters)
  2395. Out: Null
  2396. * Return Value:int
  2397. 0: Success
  2398. Non-0: Failure
  2399. * Comment: wireless FPD network config
  2400. *********************************************************/
  2401. HBI_FPD_DLL int HBI_UpdateWirelessSecurityKey(void* handle, int wirelessmode, char *pkey, int nkeylen);
  2402. /*********************************************************
  2403. * No: No152
  2404. * Function Name: HBI_UpdateSaveOption
  2405. * Function Description: Update Save Image Options
  2406. * Parameter Description:
  2407. In: void *handle - unsigned handle pointer
  2408. SAVE_IMAGE saveimge - Structure parameters
  2409. unsigned char m_bySaveType; // 0-show image only,1-save image only,2-show and save image;
  2410. unsigned char m_bySaveFileType; // 0-image,1-video;
  2411. unsigned short m_bySaveNumber; // Number of images included in the video
  2412. Out: Null
  2413. * Return Value:int
  2414. 0: Success
  2415. Non-0: Failure
  2416. * Comment:
  2417. *********************************************************/
  2418. HBI_FPD_DLL int HBI_UpdateSaveOption(void* handle, SAVE_IMAGE saveimge);
  2419. /*********************************************************
  2420. * No: No153
  2421. * Function Name: HBI_SetPacketIntervalTime
  2422. * Function Description: Set Package Interval
  2423. * Parameter Description:
  2424. In: void *handle - unsigned handle pointer
  2425. int *in_itime - TIME,UNIT:um
  2426. Out: Null
  2427. * Return Value:int
  2428. 0: Success
  2429. Non-0: Failure
  2430. * Comment:
  2431. *********************************************************/
  2432. HBI_FPD_DLL int HBI_SetPacketIntervalTime(void* handle, int in_itime);
  2433. /*********************************************************
  2434. * No: No154
  2435. * Function Name: HBI_GetPacketIntervalTime(newly increased)
  2436. * Function Description: Get Package Interval
  2437. * Parameter Description:
  2438. In: void *handle - unsigned handle pointer
  2439. out:int *out_time - Time in microseconds
  2440. * Return Value:int
  2441. 0: Success
  2442. Non-0: Failure
  2443. * Comment:
  2444. *********************************************************/
  2445. HBI_FPD_DLL int HBI_GetPacketIntervalTime(void* handle, int* out_time);
  2446. /*********************************************************
  2447. * No: No155
  2448. * Function Name: HBI_SetDummyParameter(newly increased)
  2449. * Function Description: Update Dummy parameters (parameters required for Dummy correction)
  2450. * Parameter Description:
  2451. In: void *handle - unsigned handle pointer
  2452. int nDummyStartCol - The region start column of Dummy
  2453. int nDummyEndCol - The Region End Column of Dummy
  2454. int nDummyConstant - The constant of Dummy
  2455. * Return Value:int
  2456. 0: Success
  2457. Non-0: Failure
  2458. * Comment:
  2459. *********************************************************/
  2460. HBI_FPD_DLL int HBI_SetDummyParameter(void* handle, int nDummyStartCol, int nDummyEndCol, int nDummyConstant);
  2461. /*********************************************************
  2462. * No: No156
  2463. * Function Name: HBI_AutoWindowWidthWindowLevel
  2464. * Function Description: The automatic window width and window level algorithm converts 16bits data into 8-bit unsigned data through window width and window level processing, and users can directly display 8-bit data.
  2465. * Parameter Description:
  2466. In: void *handle - unsigned handle pointer
  2467. In/Out: unsigned char *imgbuff,Source data (16 bit unsigned small end data), destination data (8-bit unsigned data)
  2468. In/Out: int *nbufflen, Buffer data length (halve the data size after conversion)
  2469. In: int nwidth - Image data width
  2470. In: int nheight - Image data high
  2471. Out: Null
  2472. * Return Value:int
  2473. 0: Success
  2474. Non-0: Failure
  2475. * Comment:**************************************/
  2476. HBI_FPD_DLL int HBI_AutoWindowWidthWindowLevel(void* handle, unsigned char* imgbuff, int* nbufflen, int nwidth, int nheight);
  2477. /*********************************************************
  2478. * No: No157
  2479. * Function Name: HBI_UnRegProgressCallBack
  2480. * Function Description: Unregister progress registration callback function
  2481. * Parameter Description: Process firmware upgrade feedback
  2482. In: void *handle - unsigned handle pointer
  2483. Out: Null
  2484. * Return Value:int
  2485. 0: Success
  2486. Non-0: Failure
  2487. * Comment:
  2488. *********************************************************/
  2489. HBI_FPD_DLL int HBI_UnRegProgressCallBack(void* handle);
  2490. /*********************************************************
  2491. * No: No158
  2492. * Function Name: HBI_SetUdpMtuPacketType(newly increased)
  2493. * Function Description: Set the packet type of UDP maximum transmission unit
  2494. * Parameter Description:
  2495. In: void *handle - unsigned handle pointer
  2496. In: int npacketType - 0-udp packet;1-udp packet jumbo;others-"udp packet°;
  2497. * Return Value:int
  2498. 0: Success
  2499. Non-0: Failure
  2500. * Comment:
  2501. *********************************************************/
  2502. HBI_FPD_DLL int HBI_SetUdpMtuPacketType(void* handle, int npacketType);
  2503. /*********************************************************
  2504. * No: No159
  2505. * Function Name: HBI_Rotate90AndFlip(newly increased)
  2506. * Function Description: Image rotation and image processing (only applicable to 16-bit unsigned image data, which is rotated first and then mirrored by default)
  2507. * Parameter Description:
  2508. In: void *handle - unsigned handle pointer
  2509. In/Out: unsigned char *imgbuff - Pointer type input and output parameters, source data (16-bit unsigned small-end data), destination data (16-bit unsigned small-end data)
  2510. In: int nbufflen - Buffer data length
  2511. In/Out: int *nwidth - Pointer type input and output parameters, pointer address storage image data width
  2512. In/Out: int *nheight - Pointer type input and output parameters, pointer address storage image data high
  2513. In: int nClockwise - Rotate 90 °, 1 - right rotation, 2 - left rotation, other - no processing In: int nVertical - Mirror processing, 1-vertical mirror, 2-horizontal mirror, other - no processing
  2514. * Return Value:int
  2515. 0: Success
  2516. Non-0: Failure
  2517. * Comment:By default, rotate before mirror
  2518. *********************************************************/
  2519. HBI_FPD_DLL int HBI_Rotate90AndFlip(void *handle, unsigned char* imgbuff, int nbufflen, int* pnwidth, int* pnheight, int nClockwise, int nVertical);
  2520. /*********************************************************
  2521. * No: No160
  2522. * Function Name: HBI_ResetCorrectTemplate(newly increased)
  2523. * Function Description: Reset the calibration template file - rotate, mirror, reverse process and save, generally complete the process before downloading to the firmware
  2524. * 1、Find the generated calibration template file according to the current rotation and mirroring parameters (the template file has been rotated and mirrored);
  2525. * 2、Reverse process the calibration template file (mirror first and then reverse rotation);
  2526. * 3、Automatically store the rotated calibration template file according to multi-template management rules;
  2527. * Parameter Description:
  2528. In: void *handle - unsigned handle pointer
  2529. In: int nTemplateType - 0-offset template(16-bits);1-gain template(32-bits);2-defect template(16-bits);
  2530. * Return Value:int
  2531. 0: Success
  2532. Non-0: Failure
  2533. * Comment:The purpose is to solve the problem that the firmware calibration calibration file is not synchronized. The firmware uses the generated calibration template file that has not been rotated and mirrored by the dynamic library
  2534. *********************************************************/
  2535. HBI_FPD_DLL int HBI_ResetCorrectTemplate(void* handle, int nTemplateType);
  2536. /*********************************************************
  2537. * No: No161
  2538. * Function Name: HBI_IsExistsOfCurCorrectTemplate(newly increased)
  2539. * Function Description:Judge whether the current template file exists according to the template type
  2540. * Parameter Description:
  2541. In: void *handle - unsigned handle pointer
  2542. In: int tempType -Template type (default is 0),0-offset template;1-gain template;2-defect template;3-defect map template;4-gainb template;
  2543. * Return Value:int
  2544. 0: Success
  2545. Non-0: Failure
  2546. * Comment:
  2547. *********************************************************/
  2548. HBI_FPD_DLL int HBI_IsExistsOfCurCorrectTemplate(void* handle, int tempType=0);
  2549. /*********************************************************
  2550. * No: No162
  2551. * Function Name: HBI_GetCurZoomData (newly increased)
  2552. * Function Description: Get the current ZOOM area size data
  2553. * Parameter Description:
  2554. In: void *handle - unsigned handle pointer
  2555. Out: unsigned int *pZoomLeft - Zoom Rect Left
  2556. unsigned int *pZoomTop - Zoom Rect Top
  2557. unsigned int *pZoomWidth - Zoom Rect Width
  2558. unsigned int *pZoomHeight - Zoom Rect Height
  2559. * Return Value:int
  2560. 0: Success
  2561. Non-0: Failure
  2562. * Comment:Rect data, where all are 0, indicating the full picture.
  2563. *********************************************************/
  2564. HBI_FPD_DLL int HBI_GetCurZoomRect(void* handle, unsigned int *pZoomLeft, unsigned int *pZoomTop, unsigned int * pZoomWidth, unsigned int *pZoomHeight);
  2565. /*********************************************************
  2566. * No: No163
  2567. * Function Name: HBI_GetCurrentCorrectFileName (newly increased)
  2568. * Function Description: Get the current template file name
  2569. * Parameter Description:
  2570. In: void *handle - unsigned handle pointer
  2571. In: int tempType -Template type (default is 0),0-offset template;1-gain template;2-defect template;3-defect map template;4-gainb template;
  2572. * Return Value:char*
  2573. NULL - Failure
  2574. char* - Return file name
  2575. * Comment:
  2576. *********************************************************/
  2577. HBI_FPD_DLL char* HBI_GetCurrentCorrectFileName(void* handle, int tempType=0);
  2578. /*********************************************************
  2579. * No: No164
  2580. * Function Name: HBI_GetHbiUserCode
  2581. * Function Description: Get customer name information
  2582. * Parameter Description:
  2583. In: void *handle - unsigned handle pointer
  2584. In/Out: char *szUserCode - A buff greater than 8 bytes is passed in, and the customer name information is backfilled after success
  2585. * Return Value:int
  2586. 0: Success
  2587. Non-0: Failure
  2588. * Comment:
  2589. *********************************************************/
  2590. HBI_FPD_DLL int HBI_GetHbiUserCode(void* handle, char* szUserCode);
  2591. /*********************************************************
  2592. * No: No165
  2593. * Function Name: HBI_GetHbiProductCode
  2594. * Function Description: Get client product number
  2595. * Parameter Description:
  2596. In: void *handle - unsigned handle pointer
  2597. In/Out: char *szProductCode -Get the customer name information, pass in a buff greater than 16 bytes, and backfill the client product number after success
  2598. * Return Value:int
  2599. 0: Success
  2600. Non-0: Failure
  2601. * Comment:
  2602. *********************************************************/
  2603. HBI_FPD_DLL int HBI_GetHbiProductCode(void* handle, char* szProductCode);
  2604. /*********************************************************
  2605. * No: No166
  2606. * Function name: HBI_ SetWorkModeOfComs (new)
  2607. * Function description: Set the working mode of COMS chip
  2608. * Parameter Description:
  2609. In: void * handle - Handle (unsigned point)
  2610. int nMode - The operating mode of the COMS chip
  2611. [0] - Indicators DRS mode
  2612. [1] - Indicators DDS mode
  2613. Out: None
  2614. * Return value: int
  2615. 0- Success
  2616. Non 0- Failed
  2617. * Remarks:
  2618. ***************************************************/
  2619. HBI_FPD_DLL int HBI_SetWorkModeOfComs(void* handle, int nMode);
  2620. /*********************************************************
  2621. * No: No167
  2622. * Function name: HBI_GetWorkModeOfComs
  2623. * Function description: Obtain the working mode of COMS chip (newly added)
  2624. * Parameter Description:
  2625. In: void * handle - Handle (unsigned pointer)
  2626. Out: None
  2627. * Return value: int
  2628. [0] - Indicates DRS mode
  2629. [1] - Indicates DDS mode
  2630. *Remarks:
  2631. *********************************************************/
  2632. HBI_FPD_DLL int HBI_GetWorkModeOfComs(void* handle);
  2633. /*********************************************************
  2634. * No: No168
  2635. * Function name: HBI_GetMtuAndReceiveBuffers
  2636. * Function description: Obtain network MTU size and receive buffer size (newly added)
  2637. * Parameter Description:
  2638. In: void * handle - Handle (unsigned pointer)
  2639. Out: None
  2640. * Return value: int
  2641. 0- Success
  2642. Non 0- Failed
  2643. *Remarks:
  2644. *********************************************************/
  2645. HBI_FPD_DLL int HBI_GetMtuAndReceiveBuffers(void* handle, unsigned long* mtusize, int* rcvsize);
  2646. /*********************************************************
  2647. * No: No169
  2648. * Function name: HBI_RetransmitPacketEnable
  2649. * Function description: Continuous acquisition retransmission enable (newly added)
  2650. * Parameter Description:
  2651. In: void * handle - Handle (unsigned pointer)
  2652. unsigned int nRetransmitted - data retransmission type,0:Re-Transmit Data,other:Prohibit data retransmission.
  2653. Out: None
  2654. * Return value: int
  2655. 0- Success
  2656. Non 0- Failed
  2657. * Remarks:
  2658. *********************************************************/
  2659. HBI_FPD_DLL int HBI_RetransmitPacketEnable(void* handle, unsigned int nRetransmitted);
  2660. /*********************************************************
  2661. * No: No170
  2662. * Function name: HBI_SetFpsOfTime(new)
  2663. * Function description: Set frame rate control time, support subtle
  2664. * Parameter Description:
  2665. In: void *handle - Handle (unsigned pointer)
  2666. unsigned int untimems - time interval,Unit is milliseconds,> 0ms
  2667. unsigned short ustimeus - time interval,The unit is microseconds,>= 0ms.[0,999]
  2668. Out: None
  2669. * Return value:int
  2670. 0 - Success
  2671. Non 0 - Failed
  2672. * Remarks:比如16帧,ntimems=62ms, ntimeus=8um
  2673. *********************************************************/
  2674. HBI_FPD_DLL int HBI_SetFpsOfTime(void* handle, unsigned int untimems, unsigned short ustimeus =0);
  2675. /*********************************************************
  2676. * No: No171
  2677. * Function name: HBI_SetFirmwareOvrelay(new)
  2678. * Function description: Set firmware overlay frame rate
  2679. * Parameter Description:
  2680. In: void *handle - Handle (unsigned pointer)
  2681. unsigned int noverlaynum -[0,255],0-Firmware not stacked,>0-Overlay frame rate
  2682. Out: None
  2683. * Return value:int
  2684. 0 - Success
  2685. Non 0 - Failed
  2686. * Remarks:
  2687. *********************************************************/
  2688. HBI_FPD_DLL int HBI_SetFirmwareOverlay(void* handle, unsigned int noverlaynum=0);
  2689. /*********************************************************
  2690. * No: No172
  2691. * Function name: HBI_RetransMissFrameEx(new)
  2692. * Function description: Full frame retransmission
  2693. * Parameter Description:
  2694. In: void *handle - Handle (unsigned pointer)
  2695. unsigned int frameid -Frame number to be retransmitted
  2696. Out: None
  2697. * Return value:int
  2698. 0 - Success
  2699. Non 0 - Failed
  2700. * Remarks:
  2701. *********************************************************/
  2702. HBI_FPD_DLL int HBI_RetransMissFrameEx(void* handle, unsigned int frameid);
  2703. /*********************************************************
  2704. * No: No173
  2705. * Function name: HBI_TriggerPgaBinningAcqTimeCorrect
  2706. * Function description: trigger mode, PGA gain stage, binning type, frame speed, correction enabling setting
  2707. * Parameter Description:
  2708. In: void *handle - Handle (unsigned pointer)
  2709. int triggerMode // Work mode
  2710. // Static:
  2711. // 01: Software trigger mode;
  2712. // 02: Clear;
  2713. // 03: High voltage generator(hvg) trigger mode;
  2714. // 04: Auto exposure detection mode.
  2715. // Dynamic:
  2716. // 05: Hvg pulse sync in trigger mode;
  2717. // 06: Fpd pulse sync out trigger Mode;
  2718. // 07: Free run mode.
  2719. int nPgaLevel // PGA gain stage
  2720. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  2721. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  2722. unsigned char binning
  2723. // 1: 1x1,
  2724. // 2: 2x2,
  2725. // 3: 3x3,
  2726. // 4: 4x4,
  2727. int acqtime // Live acquisition span time, unit: ms
  2728. IMAGE_CORRECT_ENABLE* pCorrect,refer to <<HbiType.h>>
  2729. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2730. // Non-1: Feedback setting success status
  2731. * Return value:int
  2732. 0 - Success
  2733. Non 0 - Failed
  2734. * Remarks:
  2735. *********************************************************/
  2736. HBI_FPD_DLL int HBI_TriggerPgaBinningAcqTimeCorrect(void* handle, int triggerMode, int nPgaLevel, unsigned char binning, int acqtime, IMAGE_CORRECT_ENABLE* pCorrect);
  2737. /*********************************************************
  2738. * No: No174
  2739. * Function name: HBI_SetLogSwitch
  2740. * Function description: Log Switch
  2741. * Parameter Description:
  2742. In: bool bwrite - true:write a log,false:do not write logs
  2743. * Return value:None
  2744. * Remarks:
  2745. *********************************************************/
  2746. HBI_FPD_DLL void HBI_SetLogSwitch(bool bwrite = true);
  2747. /*********************************************************
  2748. * No: No175
  2749. * Function name: HBI_RetransMissPacketEx(new)
  2750. * Function description: Single/multiple packet retransmission
  2751. * Parameter Description:
  2752. In: void *handle - Handle (unsigned pointer)
  2753. unsigned int frameid -Frame number to be retransmitted
  2754. unsigned int startpackagenum -Starting package number
  2755. unsigned int endpackagenum -结End package number
  2756. Out: None
  2757. * Return value:int
  2758. 0 - Success
  2759. Non 0 - Failed
  2760. * Remarks:
  2761. *********************************************************/
  2762. HBI_FPD_DLL int HBI_RetransMissPacketEx(void* handle, unsigned int frameid, unsigned int startpackagenum, unsigned int endpackagenum);
  2763. /*********************************************************
  2764. * No: No176
  2765. * Function name: HBI_FirmwareReset(new)
  2766. * Function description: Firmware reset
  2767. * Parameter Description:
  2768. In: void *handle - Handle (unsigned pointer)
  2769. Out: None
  2770. * Return value:int
  2771. 0 - Success
  2772. Non 0 - Failed
  2773. * Remarks:Phenomenon - Frame Number Zeroing
  2774. *********************************************************/
  2775. HBI_FPD_DLL int HBI_FirmwareReset(void* handle);
  2776. /*********************************************************
  2777. * No: No177
  2778. * Function name: HBI_FirmwareManagementTempalteType(new)
  2779. * Function description: Firmware template management template method
  2780. * Parameter Description:
  2781. In: void * handle - Handle (unsigned pointer)
  2782. unsigned int uType - Firmware template management template method
  2783. 0-by binning type,
  2784. 1-by Muti-Mode type
  2785. others-by binning type
  2786. Out: None
  2787. * Return value:int
  2788. 0 - Success
  2789. Non 0 - Failed
  2790. * Remarks:
  2791. *********************************************************/
  2792. HBI_FPD_DLL int HBI_FirmwareManagementTempalteType(void* handle, unsigned int uType);
  2793. /*********************************************************
  2794. * No: No178
  2795. * Function name: HBI_SetValidModeItemNumber(new)
  2796. * Function description: Set the number of valid Mode items
  2797. * Parameter Description:
  2798. In: void * handle - Handle (unsigned pointer)
  2799. unsigned int uNumber - Mode item number,[0,10]
  2800. Out: None
  2801. * Return value:int
  2802. 0 - Success
  2803. Non 0 - Failed
  2804. * Remarks:
  2805. *********************************************************/
  2806. HBI_FPD_DLL int HBI_SetValidModeItemNumber(void* handle, unsigned int uNumber);
  2807. ////////////////////////////////////////////////////////////////////////
  2808. // 以下HBI_M***new接口函数,除更新当前固件控制参数,另外同步当前Mode项中的参数
  2809. // The following HBI_ M* interface function not only updates the current firmware control parameters, but also synchronizes the parameters in the current Mode item
  2810. ////////////////////////////////////////////////////////////////////////
  2811. /*********************************************************
  2812. * No: No179
  2813. * Function name: HBI_MUpdateTriggerMode(new)
  2814. * Function description: trigger mode setting
  2815. * Parameter Description:
  2816. In: void *handle - Handle (unsigned pointer)
  2817. int _triggerMode- trigger mode
  2818. // 1: Software trigger mode
  2819. // 3: High voltage generator trigger mode
  2820. // 4: AED trigger mode
  2821. // 5-Dynamic:Hvg Sync Mode
  2822. // 6-Dynamic:Fpd Sync Mode
  2823. // 7-Dynamic:Fpd Continue
  2824. // 8-SAEC。
  2825. // others-invaild
  2826. Out:None
  2827. * Return value:int
  2828. 0 - Success
  2829. Non 0 - Failed
  2830. * Remarks:
  2831. *********************************************************/
  2832. HBI_FPD_DLL int HBI_MUpdateTriggerMode(void* handle, int _triggerMode);
  2833. /*********************************************************
  2834. * No: No180
  2835. * Function name: HBI_MSetBinning(new)
  2836. * Function description: Binning mode setting
  2837. * Parameter Description:
  2838. In:
  2839. void *handle - Handle (unsigned pointer)
  2840. unsigned int ubinning - 1:1x1,2:2x2,3:3x3,4:4x4
  2841. Out:None
  2842. * Return value:int
  2843. 0 - Success
  2844. Non 0 - Failed
  2845. * Remarks:
  2846. *********************************************************/
  2847. HBI_FPD_DLL int HBI_MSetBinning(void* handle, unsigned int ubinning);
  2848. /*********************************************************
  2849. * No: No181
  2850. * Function name: HBI_MSetPGALevel(new)
  2851. * Function description: PGA gain stage setting
  2852. * Parameter Description:
  2853. In: void *handle - Handle (unsigned pointer)
  2854. int mode // PGA gain stage
  2855. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  2856. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  2857. Out: None
  2858. * Return value:int
  2859. 0 - Success
  2860. Non 0 - Failed
  2861. * Remarks:
  2862. *********************************************************/
  2863. HBI_FPD_DLL int HBI_MSetPGALevel(void* handle, int nGainLevel);
  2864. /*********************************************************
  2865. * No: No182
  2866. * Function name: HBI_MSetRoiMode(new)
  2867. * Function Description: -silicon ROI region setting function.
  2868. * Currentlyonly 1613-125um、3030-140um、4343-100um、2530-100um are supported.
  2869. * Parameter Description:
  2870. In: void *handle - unsigned handle pointer
  2871. int nMode - ROI mode
  2872. for example,1613-125um:0-Normal Image,w*h(1248*1024), Rect(0,0,1247,1023);
  2873. 1-w*h(32*1024), Rect(608,0,639,1023);
  2874. 2-w*h(1248*32), Rect(0,496,1247,527);
  2875. 3-w*h(1248*64), Rect(0,480,1247,543);
  2876. 4-w*h(1248*128),Rect(0,448,1247,575);
  2877. Others-Normal Image。
  2878. 3030-140um:0-Normal Image,w*h(2048*2048), Rect(0,0,2047,2047);
  2879. 1-w*h(1024*2048),Rect(512,0,1535,2047);
  2880. Others-Normal Image。
  2881. 4343-100um:0-Normal Image,w*h(4288*4288), Rect(0,0,4287,4287);
  2882. 1-w*h(4288*800),Rect(0,1743,4287,2544);
  2883. Others-Normal Image。
  2884. 2530-100um:0-Normal Image,w*h(2432*3072), Rect(0,0,2431,3071);
  2885. 1-w*h(1808*1800),Rect(316,636,2115,2435);
  2886. 2-w*h(1312*1300),Rect(566,886,1865,2185);
  2887. Others-Normal Image。
  2888. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2889. // Non-1: Feedback setting success status
  2890. Out: Null
  2891. * Return Value:int
  2892. 0: Success
  2893. Non-0: Failure
  2894. * Comment:only 1613-125um、3030-140um、4343-100um、2530-100um are supported。
  2895. *********************************************************/
  2896. HBI_FPD_DLL int HBI_MSetRoiMode(void* handle, int nMode, int nfeedback = 1);
  2897. /*********************************************************
  2898. * No: No183
  2899. * Function name: HBI_MSetZoomModeRect(new)
  2900. * Function Description: The ZOOM Mode region setting function for CMOS tablets
  2901. * currently supports only CMOS - 1412-50um and CMOS - 0606-50um ,1917-120umtablet types.
  2902. * Parameter Description:
  2903. In: void *handle - unsigned handle pointer
  2904. CMOS_ZOOM_RECT stZoomRect - Zoom region
  2905. The region is represented by left, top, right, and bottom.
  2906. for example, when left, top, right and bottom are illegal values, the image will display the full image by default,
  2907. 1>When left=top=right=bottom=0, the whole picture is displayed;
  2908. 2>When eft<0 or left>width, the whole picture will be displayed, and others are the same.
  2909. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2910. // Non-1: Feedback setting success status
  2911. Out: Null
  2912. * Return Value:int
  2913. 0: Success
  2914. Non-0: Failure
  2915. * Comment: currently supports only CMOS - 1412-50um and CMOS - 0606-50um 1917-120um tablet types.
  2916. *********************************************************/
  2917. HBI_FPD_DLL int HBI_MSetZoomModeRect(void* handle, CMOS_ZOOM_RECT stZoomRect, int nfeedback = 1);
  2918. /*********************************************************
  2919. * No: No184
  2920. * Function name: HBI_MSetSelfDumpingTime(new)
  2921. * Function Description: // Self dumping span time setting
  2922. * Parameter Description:
  2923. In: void *handle // unsigned handle pointer
  2924. int time // Self dumping span time, unit: ms
  2925. Out: Null
  2926. * Return Value: int
  2927. // 0: Success
  2928. // Non-0: Failure,refer to<<HbiError.h>>
  2929. * Comment:
  2930. *********************************************************/
  2931. HBI_FPD_DLL int HBI_MSetSelfDumpingTime(void* handle, int time);
  2932. /*********************************************************
  2933. * No: No185
  2934. * Function name: HBI_MSetLiveAcquisitionTime(new)
  2935. * Function Description: // Live acquisition span time setting (apply to static and wireless type FPD)
  2936. * Parameter Description:
  2937. In: void *handle // unsigned handle pointer
  2938. int time // Live acquisition span time, unit: ms
  2939. Out: Null
  2940. * Return Value: int
  2941. // 0: Success
  2942. // Non-0: Failure,refer to<<HbiError.h>>
  2943. * Comment:
  2944. *********************************************************/
  2945. HBI_FPD_DLL int HBI_MSetLiveAcquisitionTime(void* handle, int time);
  2946. /*********************************************************
  2947. * No: No186
  2948. * Function name: HBI_MSetSinglePrepareTime(new)
  2949. * Function Description: // Prepare delay time setting, which is also called exposure window
  2950. * Parameter Description:
  2951. In: void *handle // unsigned handle pointer
  2952. Out: int *out_itime // Time(0~10000), unit: ms
  2953. // 0: “HBI_Prepare” and “HBI_SingleAcquisition” command are combined to realize single image acquisition
  2954. // Non-0: FPD will delay “Prepare Delay Time” and automatically acquire one single image when the detector receives “HBI_Prepare” command.
  2955. * Return Value: int
  2956. // 0: Success
  2957. // Non-0: Failure,refer to<<HbiError.h>>
  2958. * Comment:
  2959. *********************************************************/
  2960. HBI_FPD_DLL int HBI_MSetSinglePrepareTime(void* handle, int in_itime);
  2961. /*********************************************************
  2962. * No: No187
  2963. * Function name: HBI_MSetFpsOfTime(new)
  2964. * Function description: Set frame rate control time, support subtle
  2965. * Parameter Description:
  2966. In: void *handle - Handle (unsigned pointer)
  2967. unsigned int untimems - time interval,Unit is milliseconds,> 0ms
  2968. unsigned short ustimeus - time interval,The unit is microseconds,>= 0ms.[0,999]
  2969. Out: None
  2970. * Return value:int
  2971. 0 - Success
  2972. Non 0 - Failed
  2973. * Remarks:比如16帧,ntimems=62ms, ntimeus=8um
  2974. *********************************************************/
  2975. HBI_FPD_DLL int HBI_MSetFpsOfTime(void* handle, unsigned int untimems, unsigned short ustimeus = 0);
  2976. /*********************************************************
  2977. * No: No188
  2978. * Function name: HBI_MPgaAcqTime(new)
  2979. * Function Description: // PGA gain stage, frame speed setting
  2980. * Parameter Description:
  2981. In: void *handle // unsigned handle pointer
  2982. int nPgaLevel // PGA gain stage
  2983. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  2984. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  2985. int acqtime // Live acquisition span time, unit: ms
  2986. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  2987. // Non-1: Feedback setting success status
  2988. * Return Value: int
  2989. // 0: Success
  2990. // Non-0: Failure
  2991. * Comment:
  2992. *********************************************************/
  2993. HBI_FPD_DLL int HBI_MPgaAcqTime(void* handle, int nPgaLevel, int acqtime, int nfeedback = 0);
  2994. /*********************************************************
  2995. * No: No189
  2996. * Function name: HBI_MPgaBinningAcqTime(new)
  2997. * Function Description: // PGA gain stage, binning, frame speed setting
  2998. * Parameter Description:
  2999. In: void *handle // unsigned handle pointer
  3000. int nPgaLevel // PGA gain stage
  3001. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  3002. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  3003. unsigned char binning
  3004. // 1: 1x1,
  3005. // 2: 2x2,
  3006. // 3: 3x3,
  3007. // 4: 4x4,
  3008. int acqtime // Live acquisition span time, unit: ms
  3009. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  3010. // Non-1: Feedback setting success status
  3011. * Return Value:
  3012. int // 0: Success
  3013. // Non-0: Failure
  3014. * Comment:
  3015. *********************************************************/
  3016. HBI_FPD_DLL int HBI_MPgaBinningAcqTime(void* handle, int nPgaLevel, unsigned char binning, int acqtime, int nfeedback = 0);
  3017. /*********************************************************
  3018. * No: No190
  3019. * Function name: HBI_MTriggerAndCorrectApplay(new)
  3020. * Function Description: // Work mode and image calibration setting
  3021. * Parameter Description:
  3022. In: void *handle // unsigned handle pointer
  3023. int _triggerMode
  3024. // 1: Software trigger mode
  3025. // 3: High voltage generator trigger mode
  3026. // 4: AED trigger mode
  3027. // 5-Dynamic:Hvg Sync Mode
  3028. // 6-Dynamic:Fpd Sync Mode
  3029. // 7-Dynamic:Fpd Continue
  3030. // 8-SAEC。
  3031. IMAGE_CORRECT_ENABLE* pCorrect // refer to<< HbiType.h>>
  3032. Out: Null
  3033. * Return Value: int
  3034. // 0: Success
  3035. // Non-0: Failure,refer to<<HbiError.h>>
  3036. * Comment:
  3037. *********************************************************/
  3038. HBI_FPD_DLL int HBI_MTriggerAndCorrectApplay(void* handle, int _triggerMode, IMAGE_CORRECT_ENABLE* pCorrect);
  3039. /*********************************************************
  3040. * No: No191
  3041. * Function name: HBI_MTriggerBinningAcqTime(new)
  3042. * Function Description: // Work mode, binning, frame speed setting
  3043. * Parameter Description:
  3044. In: void *handle // unsigned handle pointer
  3045. int triggerMode // Work mode
  3046. // Static:
  3047. // 01: Software trigger mode;
  3048. // 02: Clear;
  3049. // 03: High voltage generator(hvg) trigger mode;
  3050. // 04: Auto exposure detection mode.
  3051. // Dynamic:
  3052. // 05: Hvg pulse sync in trigger mode;
  3053. // 06: Fpd pulse sync out trigger Mode;
  3054. // 07: Free run mode.
  3055. unsigned char binning
  3056. // 1: 1x1,
  3057. // 2: 2x2,
  3058. // 3: 3x3,
  3059. // 4: 4x4,
  3060. int time // Live acquisition span time, unit: ms
  3061. // For example: 1000ms (1fps), 500ms (2fps), 250ms (4fps),125ms (8fps)
  3062. Out: Null
  3063. * Return Value:
  3064. int // 0: Success
  3065. // Non-0: Failure
  3066. * Comment:
  3067. *********************************************************/
  3068. HBI_FPD_DLL int HBI_MTriggerBinningAcqTime(void* handle, int triggerMode, unsigned char binning, int acqtime, int nfeedback = 0);
  3069. /*********************************************************
  3070. * No: No192
  3071. * Function name: HBI_MTriggerPgaBinningAcqTime(new)
  3072. * Function description: trigger mode, PGA gain stage, binning type, frame speed setting
  3073. * Parameter Description:
  3074. In: void *handle - Handle (unsigned pointer)
  3075. int triggerMode // Work mode
  3076. // Static:
  3077. // 01: Software trigger mode;
  3078. // 02: Clear;
  3079. // 03: High voltage generator(hvg) trigger mode;
  3080. // 04: Auto exposure detection mode.
  3081. // Dynamic:
  3082. // 05: Hvg pulse sync in trigger mode;
  3083. // 06: Fpd pulse sync out trigger Mode;
  3084. // 07: Free run mode.
  3085. int nPgaLevel // PGA gain stage
  3086. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  3087. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  3088. unsigned char binning
  3089. // 1: 1x1,
  3090. // 2: 2x2,
  3091. // 3: 3x3,
  3092. // 4: 4x4,
  3093. int acqtime // Live acquisition span time, unit: ms
  3094. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  3095. // Non-1: Feedback setting success status
  3096. * Return value:int
  3097. 0 - Success
  3098. Non 0 - Failed
  3099. * Remarks:
  3100. *********************************************************/
  3101. HBI_FPD_DLL int HBI_MTriggerPgaBinningAcqTime(void* handle, int triggerMode, int nPgaLevel, unsigned char binning, int acqtime, int nfeedback = 0);
  3102. /*********************************************************
  3103. * No: No193
  3104. * Function name: HBI_MTriggerPgaBinningAcqTimeCorrect(new)
  3105. * Function description: trigger mode, PGA gain stage, binning type, frame speed, correction enabling setting
  3106. * Parameter Description:
  3107. In: void *handle - Handle (unsigned pointer)
  3108. int triggerMode // Work mode
  3109. // Static:
  3110. // 01: Software trigger mode;
  3111. // 02: Clear;
  3112. // 03: High voltage generator(hvg) trigger mode;
  3113. // 04: Auto exposure detection mode.
  3114. // Dynamic:
  3115. // 05: Hvg pulse sync in trigger mode;
  3116. // 06: Fpd pulse sync out trigger Mode;
  3117. // 07: Free run mode.
  3118. int nPgaLevel // PGA gain stage
  3119. //[n]-Invalid,[1]-0.6pC,[2]-1.2pC,[3]-2.4pC,[4]-3.6pC,[5]-4.8pC,[6]-7.2pC,[7]-9.6pC
  3120. //[8]-LFW (COMS),[9]-HFW (COMS),[10]-0.3pC,[11]-0.15pC,Default: 7.2 pC.
  3121. unsigned char binning
  3122. // 1: 1x1,
  3123. // 2: 2x2,
  3124. // 3: 3x3,
  3125. // 4: 4x4,
  3126. int acqtime // Live acquisition span time, unit: ms
  3127. IMAGE_CORRECT_ENABLE* pCorrect,refer to <<HbiType.h>>
  3128. int nfeedback // 1: Automatic feedback config parameters if setting is successful
  3129. // Non-1: Feedback setting success status
  3130. * Return value:int
  3131. 0 - Success
  3132. Non 0 - Failed
  3133. * Remarks:
  3134. *********************************************************/
  3135. HBI_FPD_DLL int HBI_MTriggerPgaBinningAcqTimeCorrect(void* handle, int triggerMode, int nPgaLevel, unsigned char binning, int acqtime, IMAGE_CORRECT_ENABLE* pCorrect);
  3136. /*********************************************************
  3137. * No: No194
  3138. * Function name: HBI_IsMutilMode(new)
  3139. * Function description: Check if the current firmware supports multiple modes
  3140. * Parameter Description:
  3141. In: void *handle - Handle (unsigned pointer)
  3142. * Return value:bool
  3143. true - support
  3144. false - Not Supported
  3145. * Remarks:The essence of Mode mode is that the firmware manages templates differently
  3146. *********************************************************/
  3147. HBI_FPD_DLL bool HBI_IsMutilMode(void* handle);
  3148. /*********************************************************
  3149. * No: No195
  3150. * Function name: HBI_SetTICOFImageType(new)
  3151. * Function description: Switching between normal and grayscale images
  3152. * Parameter Description:
  3153. In: void *handle - Handle (unsigned pointer)
  3154. unsigned int nImageType -Image type,2-gray image,1-normal image,others-normal image
  3155. Out: None
  3156. * Return value:int
  3157. 0 - Success
  3158. Non 0 - Failed
  3159. * Remarks:
  3160. *********************************************************/
  3161. HBI_FPD_DLL int HBI_SetTICOFImageType(void* handle, unsigned int nImageType);
  3162. /*********************************************************
  3163. * No: No196
  3164. * Function name: HBI_ImportCfgFile2Detector(new)
  3165. * Function description: Importing configuration files into firmware
  3166. * Parameter Description:
  3167. In: void *handle - Handle (unsigned pointer)
  3168. int cmd -command code,
  3169. EDL_COMMON_TYPE_SET_RAM_PARAM_CFG -Set RAM parameters
  3170. EDL_COMMON_TYPE_SET_ROM_PARAM_CFG -Set ROM parameters
  3171. EDL_COMMON_TYPE_SET_FACTORY_PARAM_CFG -Set FACTORY parameters
  3172. char* cfgfile -firmware configuration file absolute path,file extension *.csv or *.txt
  3173. Out: None
  3174. * Return value:int
  3175. 0 - Success
  3176. Non 0 - Failed
  3177. * Remarks:configuration file format:Register_xxxx,Reserved,0x--
  3178. *********************************************************/
  3179. HBI_FPD_DLL int HBI_ImportCfgFile2Detector(void* handle, int cmd, char* cfgfile);
  3180. /*********************************************************
  3181. * No: No197
  3182. * Function name: HBI_ExportDetectorCfg2File(new)
  3183. * Function description: Export firmware parameters to a file
  3184. * Parameter Description:
  3185. In: void *handle - Handle (unsigned pointer)
  3186. int cmd -command code,
  3187. EDL_COMMON_TYPE_GET_RAM_PARAM_CFG -Get RAM parameters
  3188. EDL_COMMON_TYPE_GET_ROM_PARAM_CFG -Get ROM parameters
  3189. EDL_COMMON_TYPE_GET_FACTORY_PARAM_CFG -Get FACTORY parameters
  3190. char* cfgfile -firmware configuration file absolute path,file extension *.csv or *.txt
  3191. Out: None
  3192. * Return value:int
  3193. 0 - Success
  3194. Non 0 - Failed
  3195. * Remarks:configuration file format:Register_xxxx,Reserved,0x--
  3196. *********************************************************/
  3197. HBI_FPD_DLL int HBI_ExportDetectorCfg2File(void* handle, int cmd, char* cfgfile);
  3198. /*********************************************************
  3199. * No: No198
  3200. * Function name: HBI_InitDetectorParams(new)
  3201. * Function description: initialize the basic parameters of the flat panel detector
  3202. * Parameter Description:
  3203. In: void *handle - Handle (unsigned pointer)
  3204. DETECTOR_INIT_PARAMS param -refer to《HbiType.h》
  3205. param._ucmodeid; //mode id [0,9];
  3206. param._uctriggerType; //1-soft trigger,3-hvg trigger,4-FreeAED,5-Dynamic:Hvg Sync Mode,6-Dynamic:Fpd Sync Mode,7-Dynamic:Fpd Continue,8-SAEC;
  3207. //Only vaild in Binning mode,invaild in multi-mode mode,purpose compatible with diffrent version.
  3208. param._ucOffsetCorrection;//0-No Offset Correction;1-Software PreOffset Correction;2-Firmware PostOffset Correction;3-Firmware PreOffset Correction;
  3209. param._ucGainCorrection; //0-No Gain Correction;1-Software Gain Correction;2-Firmware Gain Correction;
  3210. param._ucDefectCorrection;//0-No Defect Correction;1-Software Defect Correction;2-Firmware Defect Correction;
  3211. param._ucDummyCorrection; //0-No Dummy Correction;1-Software Dummy Correction;2-Firmware Dummy Correction;
  3212. Out: None
  3213. * Return value:int
  3214. 0 - Success
  3215. Non 0 - Failed
  3216. * Remarks:
  3217. *********************************************************/
  3218. HBI_FPD_DLL int HBI_InitDetectorParams(void* handle, DETECTOR_INIT_PARAMS param);
  3219. /*********************************************************
  3220. * No: No199
  3221. * Function name: HBI_UpdateFPDSerialNumber
  3222. * Function Descriptio: Update product serial number
  3223. * Parameter Description:
  3224. In: void *handle - unsigned handle pointer
  3225. In/Out: char *szSn,length=14
  3226. * Return value:int
  3227. 0 - Success
  3228. Non 0 - Failed
  3229. * Remarks:
  3230. * 编 号: No199
  3231. * 函 数 名: HBI_UpdateFPDSerialNumber
  3232. * 功能描述: 更新产品序列号
  3233. * 参数说明:
  3234. In: void *handle - 句柄(无符号指针)
  3235. In/Out: char *szSn,长度14位
  3236. * 返 回 值:int
  3237. 0 - 成功
  3238. 非0 - 失败
  3239. * 备 注:
  3240. *********************************************************/
  3241. HBI_FPD_DLL int HBI_UpdateFPDSerialNumber(void* handle, char* szSn);
  3242. /*********************************************************
  3243. * No: No200
  3244. * Function name: HBI_WindowWidthWindowLevel(new)
  3245. * Function Description: The automatic window width and window level algorithm converts 16bits data into 8-bit unsigned data through window width and window level processing, and users can directly display 8-bit data.
  3246. * Parameter Description:
  3247. In: void *handle - unsigned handle pointer
  3248. In/Out: unsigned char *imgbuff,Source data (16 bit unsigned small end data), destination data (8-bit unsigned data)
  3249. In/Out: int *nbufflen, Buffer data length (halve the data size after conversion)
  3250. In: int nwidth - Image data width
  3251. In: int nheight - Image data high
  3252. In: int nWindow - window width
  3253. In: int nLeveling - window leveling
  3254. * Return value:int
  3255. 0 - Success
  3256. Non 0 - Failed
  3257. * Remarks:
  3258. *********************************************************/
  3259. HBI_FPD_DLL int HBI_WindowWidthWindowLevel(void* handle, unsigned char* imgbuff, int* nbufflen, int nwidth, int nheight, int nWindow, int nLeveling);
  3260. /*********************************************************
  3261. * No: No201
  3262. * Function name: HBI_WaitForReadyStatus(new)
  3263. * Function Description: Waiting for panel ready status.
  3264. * Parameter Description:
  3265. In: void *handle - unsigned handle pointer
  3266. In: unsigned int tm - Wait timeout,default 1200ms
  3267. * Return value:int
  3268. 0 - Success
  3269. Non 0 - Failed
  3270. * Remarks:
  3271. *********************************************************/
  3272. HBI_FPD_DLL int HBI_WaitForReadyStatus(void* handle, unsigned int tm=1200);
  3273. HBI_FPD_DLL int HBI_SetSelfDumpingTimeEx(void* handle, unsigned int untimems, unsigned short ustimeus);
  3274. HBI_FPD_DLL int HBI_UpdatePcieDeviceId(void* handle, unsigned short udeviceid);
  3275. HBI_FPD_DLL int HBI_GetCurFirmwareTemplate(void* handle, unsigned char command);
  3276. HBI_FPD_DLL int HBI_GetCurTemperatureBatteryInfo(void* handle);
  3277. HBI_FPD_DLL int HBI_IsInSleepMode(void* handle);
  3278. HBI_FPD_DLL int HBI_Set2SleepMode(void* handle, int nmode = 1);
  3279. HBI_FPD_DLL int HBI_GetUdpMtuPacketType(void* handle, int* npacketType);
  3280. HBI_FPD_DLL int HBI_SetWindowMode(void* handle, bool isWindowMode);
  3281. HBI_FPD_DLL int HBI_GetWindowMode(void* handle, bool* isWindowMode);
  3282. HBI_FPD_DLL int HBI_SetBinningDivisor(void* handle, unsigned char binDiv);
  3283. HBI_FPD_DLL int HBI_GetBinningDivisor(void* handle, unsigned char* binDiv);
  3284. HBI_FPD_DLL int HBI_SetTiCofDAC(void* handle, unsigned short dacV);
  3285. HBI_FPD_DLL int HBI_GetTiCofDAC(void* handle, unsigned short* dacV);
  3286. HBI_FPD_DLL int HBI_IsEnableReturnImage(void* handle);
  3287. HBI_FPD_DLL int HBI_EnableReturnImage(void* handle, int nEnable = 1);
  3288. HBI_FPD_DLL int HBI_FrameLossDetectEnable(void* handle, unsigned int nDetectEnable);
  3289. HBI_FPD_DLL int HBI_RestartPcieDevice(void* handle);
  3290. HBI_FPD_DLL int HBI_SetRetransMissPacket(void* handle, unsigned int startpackagenum, unsigned int endpackagenum);
  3291. HBI_FPD_DLL bool HBI_GetEnableStatusOfFrameLoss(void* handle);
  3292. HBI_FPD_DLL int HBI_EnableFrameLossCheck(void* handle, bool bcheck);
  3293. HBI_FPD_DLL int HBI_FeedbackFrameLoss(void* handle);
  3294. HBI_FPD_DLL int HBI_SaveFrameLossInfo(void* handle);
  3295. HBI_FPD_DLL int HBI_UpdateFPDSerialNumberEx(void* handle, char* szSn, int cmd);
  3296. HBI_FPD_DLL int HBI_RomCfg2FactoryCfg(void* handle);
  3297. ////////////////////////////////////////////////////////////////////////////////////////
  3298. // The export class is currently undeveloped and will not be provided
  3299. ////////////////////////////////////////////////////////////////////////////////////////
  3300. ////////////////////////////////////////////////////////////////////////////////////////
  3301. class hbi_fpd
  3302. {
  3303. public:
  3304. HBI_FPD_DLL hbi_fpd(unsigned int ufpdid, COMM_CFG commcfg);
  3305. HBI_FPD_DLL virtual ~hbi_fpd();
  3306. public:
  3307. HBI_FPD_DLL int hbi_init_fpd();
  3308. HBI_FPD_DLL void hbi_destroy_fpd();
  3309. void *m_inst;
  3310. unsigned int m_ufpdid;
  3311. bool m_bOpen;
  3312. COMM_CFG m_commcfgSt;
  3313. };
  3314. ////////////////////////////////////////////////////////////////////////////////////////
  3315. ////////////////////////////////////////////////////////////////////////////////////////
  3316. #ifdef __cplusplus
  3317. }
  3318. #endif
  3319. #endif // __HBI_FPD_H_