Home > Back-end >  My Java secondary development hikvision camera, a step in the Smart events meet problems, I know to
My Java secondary development hikvision camera, a step in the Smart events meet problems, I know to

Time:09-19

Things have changed a
product: hai kang's camera df8237i5x DS - 2 - A ball machine, support smart function, including the regional invasion of cross-border detection into the area, and other functions,,,
The objective of the development of we : is also Smart event of all functions, now it is written in Java in hai kang SDK demo we have had not to use it,,,
We want to develop more advanced features, I in the development of the regional invasion this step, I give you about the problems and solutions, and I haven't solve the problem,
1. The function provides
Hai kang official offer SDK includes all of the necessary environment, but he didn't tidy up thing, something very trivial, the individual feels all situations are better to write a document,
I'm Java development, from his Java program found to provide an interface function HCNetSDK. Class, this Class is through the Java jna technology will Java can call DLL library of function, (of course this function in the Class just to write the function of his/her needs, if you want to develop other functions, according to user's manual is a function of couldn't find it, also need to go to the header file. H find their own, and then write a Java function calls himself)
2. No function from where to find?
If you want to develop other functions, such as area, hai kang demo of Java and c # demo is not complete, only partly function, only the MFC is complete, and I was just a Java, then from where to find a c + + class library DLL function that, in the header file folder find HCNetSDK. H, all functions including, if understand jna technology, only need to search the corresponding function name, will provide HCNetSDK. Its function in the Java Class interface Class, you can invoke the,

2, I have no problem
see my problem here!!!!!!!!!!!!!!!
See below screenshot, it defines the NET_DVR_GetDeviceAbility, representative to get the structure, equipment capability set defines six parameters in the structure,
which I marked red, I already know it represents the parameters of the char type, on behalf of the String in Java, look at its passing parameters is explained as an XML file, or structure, that I'm stupid, not passing a String type parameters in Java? What is a structure??????? Structure is not defined an object? The object's toString () method in the current parameters??????? It dwInLength, (the length of the input buffer) is currently the length of the string () method???????
I'm stuck in this step, I didn't find similar code from Java demo, don't know whether my guess is that right???????
If you have done the brothers knew it, please give me a copy of the code, or explain how to pass the parameters!!!!!!!!!!!!!!

NET_DVR_GetDeviceAbility structure includes six parameters
LONG lUserID, NET_DVR_Login_V40 login interface, such as the return value of the
DWORD dwAbilityType, ability type
char * pInBuf, input buffer pointer (according to the regulations of the device's ability to the description of the parameter combinations, can be a text or XML structure form, see note "few")
DWORD dwInLength, the length of the input buffer
char * pOutBuf, output buffer pointer (according to the regulations of the device's ability to set the description of the way, can be a text or XML structure form, see note "few")
DWORD dwOutLength receiving data of the length of the buffer



by the way,
I found in the SDK c + + code NET_DVR_GetDeviceAbility function, c + +, if you know what you feel to see to understand,
The name is m_struAbility structure transformation for char,
Through the sizeof function to obtain the size of the structure,
NET_DVR_GetDeviceAbility (m_lUserID, ALARMHOST_ABILITY, NULL, 0, (char *) & amp; M_struAbility, sizeof (m_struAbility))


the problem is: how do I change Java write, who develop Smart event function of sea kang, help me!!!!!!!!!!!!!!!!! I qq1404605270, online etc.!!!!!!

CodePudding user response:

Recently, our company is purchasing haisi cameras, in the background to the use of Java program in a real-time monitoring system, also in baidu, don't know how to do

CodePudding user response:

Give you an idea, it is necessary to the preparation,
1. Haisi JAVA development kit SDK, Api resources (official website to download)
2. Haisi technical contact (meet difficult problem need to get in touch with engineer)
3. Make good use of githup, search the code

CodePudding user response:

To remind you that, if the further development of hai kang, by means of js + Java sea, an ISAPI, need to sign a confidentiality agreement, and the company it is out in the way of the interface of API calls the ball machine, if be caught can play,

CodePudding user response:

Also recently in the development of smart Java version didn't train of thought, the great god of development? To communicate ah? I qq361117441

CodePudding user response:

Bosses, we also recently in the use of Java in the function of the regional invasion, totally do not know how to start, please give a demo
  • Related