How to call a function in DLL file, while writing test scripts in ATML standards
Hello all,
I am trying to develop test scripts in ATML standards. I need to call a function in DMM.dll file. How can i do that in ATML standards, please explain with some example ATML standard XML file. Someone please help me in doing so. Thanks a lot in advance.
With Regards,
kalyan
Hi srivinayaka,
I am attaching the XML file i have written in ATML standards and the Labwindows/CVI code that was generated when the XML file is opened in TESTSAND. actually the defenition of the function "IALdcpwr_reset()" is in IALdcpwr.lib and IALdcpwr.h files.
"How can we add this library and header files?" so that i can show the path of definition. whether it should be done manually or can we do some changes in the XML file and make the work done?. Thanks in advance. If you have any example for this type of sequences. please forward me which would be helpful for me.
With best regards,
kalyan
Attachments:
XMLfile.doc 135 KB
XMLfile.doc 135 KB
Similar Messages
-
How to call C function in .m file from another function in a .mm file
I am making an interface class between a C library and an objetive C application.
I have not problem calling function the C library from .mm funstions,
but I am having problems calling .m functions from the .mm class.
here is an example of what I mean.
here in my .m vector file
*struct dVector*
* float m_x;*
* float m_y;*
* float m_z;*
* float m_w;*
*struct dVector InitVector (float x, float y, float z, float w);*
*struct dVector AddVector (struct dVector* A, struct dVector* B);*
*struct dVector SubVector (struct dVector* A, struct dVector* B);*
here is my .mm class
*#import <Foundation/Foundation.h>*
*@interface iNewton : NSObject*
* void* m_world;*
*-(id) init;*
*-(void) dealloc;*
-(void) CreateBox: (Entity*) ent: (int) shapeId;*
@end
here is the implemrntation of function funtion CreateBox in a .mm file
[code]-(void*) CreateBox: (Entity*) ent: (int) shapeId
struct dVector minBox;
struct dVector maxBox;
// this is fine
[ent GetBBox: &minBox: &maxBox];
//calculate the box size and dimensions of the physics collision shape
// this report a link errors, and I do no knwo why
struct dVector size = SubVector(&maxBox, &minBox);
struct dVector origin = AddVector (&maxBox, &minBox);
// thsi work without problemen
return NewtonCreateBox ((NewtonWorld*) world, size.m_x, size.m_y, size.m_z, shapeId, &offset.mfront.mx);
I get these compiler errors
Building target “tutorial102AddingRigidBody” of project “newton_iPhone” with configuration “Debug_Emulation” — (3 errors)
cd /Users/juliojerez/Desktop/NewtonMac/NewtonSDK/newton_iPhone
setenv MACOSXDEPLOYMENTTARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2 .1.sdk -L/Users/juliojerez/Desktop/NewtonMac/NewtonSDK/newtoniPhone/build/DebugEmulation-iphonesimulator -L/Users/juliojerez/Desktop/NewtonMac/NewtonSDK/newton_iPhone/../sdk -F/Users/juliojerez/Desktop/NewtonMac/NewtonSDK/newtoniPhone/build/DebugEmulation-iphonesimulator -filelist /Users/juliojerez/Desktop/NewtonMac/NewtonSDK/newtoniPhone/build/Debug_Emulation-iphonesimulator/tutorial_102_AddingRigidBody.build/ Objects-normal/i386/tutorial_102AddingRigidBodies.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreGraphics -lnewton_iPhoneEmulation -o /Users/juliojerez/Desktop/NewtonMac/NewtonSDK/newtoniPhone/build/Debug_Emulation-iphonesimulator/tutorial_102_AddingRigidBodies.app/ tutorial_102AddingRigidBodies
Undefined symbols:
"AddVector(dVector*, dVector*)", referenced from:
-[iNewton CreateBox::] in iNewton.o
"SubVector(dVector*, dVector*)", referenced from:
-[iNewton CreateBox::] in iNewton.o
"Scale(dVector*, float)", referenced from:
-[iNewton CreateBox::] in iNewton.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"AddVector(dVector*, dVector*)", referenced from:
-[iNewton CreateBox::] in iNewton.o
"SubVector(dVector*, dVector*)", referenced from:
-[iNewton CreateBox::] in iNewton.o
"Scale(dVector*, float)", referenced from:
-[iNewton CreateBox::] in iNewton.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (3 errors)
Basically I can call objective C class methods from .mm files,
but I can not call functions who are not members of a class from .mm funtions.
Does any one knows how I can solve this?
I have two books on objective C and neither show how to do that.
Please I will apreciate if some one can help me with this.
Julio Jerezjulio jerez wrote:
// this is fine
[ent GetBBox: &minBox: &maxBox];
why will tha be wrong?
ent is a objective C class with a method GetBBox
wich I use in hundred of places with out problem.
Beside that is not the problem that.
Well, you've got me on this one. You are correct. Apparently you don't need to specify the parameter names. Still, I strongly encourage you to use parameter names. Even though they apparently aren't required, I've never seen them not used. I would have expected to see:
[ent GetBBoxMin: & minBox max: & maxBox]
The problem is calling C function that are declared in .m files.
if you read the errors, they are linking errors not compiler errors.
this is a C function that is declared in a .m file
struct dVector size = SubVector(&maxBox, &minBox);
beside I also use those functions in many other place as well in teh project and they work.
If it helps I can post a link to the a download place to the xcode project maybe it is eassy to see what I am trying to do.
That would probably be a good idea.
Normally, all you need is
extern "C"
but there is so much missing from what you've posted that I can't tell for sure what is going on. -
How to access Call Back Functions using *.dll in the Labview?
Hai,
I am Pavan Ram Kumar Somu.
I am new to Labview, currently I am working on MVB Interface.
I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
1. Pointer Arguments(To which memory it points in Labview)
2. function pointers Arguments
3 .pointers in structures and pointer structures in structures and many other data types.
Please Answer the below queries also:
1. How to pass pointer arguments to API functions in DLL and how to collect pointer
return types from API functions in DLL
2. How to pass structure arguments to API functions in DLL and how to collect structure
return types from API functions in DLL
3. How to use callback functions(nothing but function pointers) in Labview and how to
collect callback fuctions return types from API functions in DLL
I need your help while passing these datatypes to API functions in DLL from labview.
Suggest me if there is any other alternative for implementing this task.
I am referencing some examples here:
Examples:
I)
Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
II) #include <windows.h>
#include <process.h>
HANDLE rcvEvent0, rcvEvent1;
/* Function call*/
CanGetReceiveEvent(handle[0], &rcvEvent0);
Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
With regards
Pavan Ramu Samu"Somu" <[email protected]> wrote in message news:[email protected]...
Hai,
I am Pavan Ram Kumar Somu.
I am new to Labview, currently I am working on MVB Interface.
I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
1. Pointer Arguments(To which memory it points in Labview)
2. function pointers Arguments
3 .pointers in structures and pointer structures in structures and many other data types.
Please Answer the below queries also:
1. How to pass pointer arguments to API functions in DLL and how to collect pointer
return types from API functions in DLL
2. How to pass structure arguments to API functions in DLL and how to collect structure
return types from API functions in DLL
3. How to use callback functions(nothing but function pointers) in Labview and how to
collect callback fuctions return types from API functions in DLL
I need your help while passing these datatypes to API functions in DLL from labview.
Suggest me if there is any other alternative for implementing this task.
I am referencing some examples here:
Examples:
I)
Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
II) #include <windows.h>
#include <process.h>
HANDLE rcvEvent0, rcvEvent1;
/* Function call*/
CanGetReceiveEvent(handle[0], &rcvEvent0);
Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
With regardsPavan Ramu Samu
Search the forum (forums.ni.com) for callback, pointer or handle, and you'll find that it is all possible, but not very easy.
e.g.: http://forums.ni.com/ni/board/message?board.id=170&message.id=88974&requireLogin=False
Regards,
Wiebe. -
How to call javascript function from PL/SQL procedure
Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?
Hi,
I have a requirement to call Javascript function inside a After Submit Process.
clear requirement below:
1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
2. user clicks on "save files" button
3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
Hope this clarify U.
Krishna. -
How to call a function having OBJECT type as Return type
Hi,
I've the following function returning OBJECT type.
Pease advice me how to call this function
CREATE OR REPLACE TYPE GET_EMP_OBJ is object
( emp_name varchar2(50) ,
mgr_id number,
dept_id number
CREATE OR REPLACE FUNCTION get_emp(P_emp_no NUMBER )
RETURN GET_EMP_OBJ IS
t_emp_info GET_EMP_OBJ ;
v_ename EMP.ename%TYPE;
v_mgr EMP.mgr%TYPE ;
v_deptno EMP.deptno%TYPE;
v_ename1 EMP.ename%TYPE;
v_mgr1 EMP.mgr%TYPE ;
v_deptno1 EMP.deptno%TYPE;
BEGIN
FOR rec IN ( SELECT ename , mgr , deptno
FROM emp )
LOOP
v_ename := rec.ename ;
v_ename1 := v_ename1||'|'||v_ename ;
v_mgr := rec.mgr ;
v_mgr1 := v_mgr1||'|'||v_mgr ;
v_deptno:= rec.deptno;
v_deptno1 := v_deptno1||'|'||v_deptno ;
END LOOP ;
t_emp_info := GET_EMP_OBJ (v_ename,v_mgr,v_deptno ) ;
RETURN t_emp_info ;
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.put_line ('Error'||SQLCODE||','||SQLERRM ) ;
END;The above function got created successfully.
And i'm confused how to call this functions. I tried like below but didn't work
DECLARE
t_emp_info_1 GET_EMP_OBJ ;
BEGIN
t_emp_info_1 := get_emp(7566) ;
for i in 1..t_emp_info_1.COUNT
LOOP
DBMS_OUTPUT.put_line ('Values are'||i.emp_name ) ;
END LOOP;
END;SQL> CREATE OR REPLACE TYPE GET_EMP_OBJ is object
2 ( emp_name varchar2(50) ,
3 mgr_id number,
4 dept_id number
5 );
6 /
Type created.
SQL> ed
Wrote file afiedt.buf
1 CREATE OR REPLACE FUNCTION get_emp(empno NUMBER )
2 RETURN GET_EMP_OBJ IS
3 t_emp_info GET_EMP_OBJ ;
4 BEGIN
5 begin
6 select get_emp_obj(ename, mgr, deptno) into t_emp_info
7 from emp
8 where empno = get_emp.empno;
9 exception
10 when no_data_found then
11 t_emp_info := new get_emp_obj(null,null,null);
12 end;
13 return t_emp_info;
14* END;
SQL> /
Function created.
SQL> set serverout on
SQL>
SQL> declare
2 t_emp_info GET_EMP_OBJ ;
3 BEGIN
4 t_emp_info := get_emp(7566);
5 DBMS_OUTPUT.put_line ('Values are: '||t_emp_info.emp_name||', '||t_emp_info.mgr_id||', '||t_emp_info.dept_id);
6 END;
7 /
Values are: JONES, 7839, 20
PL/SQL procedure successfully completed.
SQL> -
How to run a remote windows dll files and the drivers of the system using j
Dear Friends,
I need some valuable info regd how to run a remote windows dll files and the drivers of the system using java
reply regd thanking youPlease don't make duplicate posts like this.
-
How to call a exe or bat file from java program
hi,
i actually want to know that how to call a exe or bat file from program so that i can run them parallely.Try this :
String strCmd = "myFile.bat";
try
Runtime rTime = Runtime.getRuntime();
Process process = rTime.exec(strCmd);
InputStream p_in = process.getInputStream();
OutputStream p_out = process.getOutputStream();
InputStream p_err = process.getErrorStream();
p_in.close();
p_out.close();
p_err.close();
catch(Exception e) {
throw new Exception("Unable to start, "+strCmd);
} -
How to call javascript function in back bean of jsf
hi,
i am trying to call java script function in back bean but not done. Is there any code for call javascript function in bean file.Java runs at server side.
JSF produces HTML output.
Server sends HTML output to client.
Java stops running.
HTML runs at client side.
JS starts to run in HTML.
Clear? Java is a server side language. JS is a client side language. To run JS using JSF, simply print it out to the HTML so that it get invoked when the HTML runs. -
How to call java function from PL/sql in oracle applications
I am trying to call a java function from plsql procedure. Can any one explain how to call java function, and in which directory I have to store my java function in oracle applications. Do I need to register that java function from Application developer.
Thanks
Kranthihttp://www.oracle.com/technology/tech/java/jsp/index.html
Good Luck,
Avi. -
How to call stored function in my jsp
how to call stored function in my jsp?
please give me a example.Hi,
think we need mor einformation, like JDeveloper release and the how you do access the database (JDBC, BC4J, EJB,ADF...)
Frank -
How to call oracle function from ejb3
i'm trying to call an oracle query-function from ejb3.
The oracle function:
create or replace FUNCTION getSecThreadCount(secId in NUMBER,avai in NUMBER)
RETURN SYS_REFCURSOR is cur SYS_REFCURSOR;
m_sql VARCHAR2(250);
BEGIN
m_sql:='select count(thrId) from thread where secId='|| secid||'
and thrAvai='|| avai;
open cur for m_sql;
return cur;
END;
I'v tried several ways to call it,but all failed:
1. the calling code:
public Object getSectionThreadCount(int secId,int avai){
Query query=manager.createNativeQuery("{call getSecThreadCount(?,?) }");
query.setParameter(1, secId);
query.setParameter(2, avai);
return query.getSingleResult();
but i got the exception:
Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: java.sql.SQLException: ORA-06550: row 1, col 7:
PLS-00221: 'GETSECTHREADCOUNT' not procedure or not defined
ORA-06550: row 1, col 7:
PL/SQL: Statement ignored
2. the calling code:
@SqlResultSetMapping(name = "getSecThreadCount_Mapping")
@NamedNativeQuery(name = "getSecThreadCount",
query = "{?=call getSecThreadCount(:secId,:avai)}",
resultSetMapping = "getSecThreadCount_Mapping",
hints = {@QueryHint(name = "org.hibernate.callable", value = "true"),
@QueryHint(name = "org.hibernate.readOnly", value = "true")})
public Object getSectionThreadCount(int secId,int avai){
Query query=manager.createNamedQuery("getSecThreadCount");
query.setParameter("secId", secId);
query.setParameter("avai", avai);
return query.getSingleResult();
but i run into the exception:
Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: java.sql.SQLException: lost in index IN or OUT parameter:: 3
By the way, i have successfully called the function from hibernate. And i use oracle 11g, JBoss5 RC1.
Could anyone tell me how to call the function from EJB3?
Thanks.Here's a working model:
package.procedure: (created in example schema scott)
CREATE OR REPLACE package body data_pkg as
type c_refcursor is ref cursor;
-- function that return all emps of a certain dept
function getEmployees ( p_deptId in number
return c_refcursor
is
l_refcursor c_refcursor;
begin
open l_refcursor
for
select e.empno as emp_id
, e.ename as emp_name
, e.job as emp_job
, e.hiredate as emp_hiredate
from emp e
where e.DEPTNO = p_deptId;
return l_refcursor;
end getEmployees;
end data_pkg;
/entity class:
package net.app.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedNativeQuery;
import javax.persistence.QueryHint;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@SuppressWarnings("serial")
@Entity
@Table (name="emp")
@SequenceGenerator(name = "EmployeeSequence", sequenceName = "emp_seq")
@NamedNativeQuery( name = "getEmpsByDeptId"
, query = "{ ? = call data_pkg.getEmployees(?)}"
, resultClass = Employee.class
, hints = { @QueryHint(name = "org.hibernate.callable", value = "true")
, @QueryHint(name = "org.hibernate.readOnly", value = "true")
public class Employee implements Serializable
@Id
@Column(name="emp_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "EmployeeSequence")
private int id;
@Column(name="emp_name")
private String name;
@Column(name="emp_job")
private String job;
@Column(name="emp_hiredate")
private Date hiredate;
// constructor
public Employee (){}
// getters and setters
public int getId()
return id;
etc...session bean:
package net.app.entity;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import net.app.entity.Employee;
import net.app.iface.ScottAdmin;
@Stateless
public class ScottAdminImpl implements ScottAdmin
@PersistenceContext
private EntityManager entityManager;
@SuppressWarnings("unchecked")
public List<Employee> getEmployeesByDeptId(int deptId)
ArrayList<Employee> empList;
try
Query query = entityManager.createNamedQuery("getEmpsByDeptId");
query.setParameter(1, deptId);
empList = (ArrayList<Employee>) query.getResultList();
return empList;
catch (Exception e)
e.printStackTrace(System.out);
return null;
}client:
package net.app.client;
import java.util.List;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import net.app.entity.Employee;
import net.app.iface.ScottAdmin;
public class ScottClient
public static void main(String[] args)
try
// create local interface
InitialContext ctx = new InitialContext();
ScottAdmin adminInterface = (ScottAdmin) ctx.lookup("ScottAdminImpl/remote");
// select employees by deptno
int deptno = 20;
List<Employee> empList = adminInterface.getEmployeesByDeptId(deptno);
// output
System.out.println("Listing employees:");
for (Employee emp : empList)
System.out.println(emp.getId() + ": " + emp.getName() + ", " + emp.getJob() + ", " + emp.getHiredate());
catch (NamingException e)
e.printStackTrace(System.out);
}Basically you just ignore the refcursor outbound parameter.
This is a stored function, have yet to try outbound refcursor parameters in stored procedures...
Edited by: _Locutus on Apr 2, 2009 2:37 PM -
How can call a function module(RFC)in one server to another sever in my rep
How can call a function module(RFC)in one server to another sever in my report program.
What i am know whenever rfc enabled immediately radio button checks then only it will come.
please justify.Syntax
CALL FUNCTION func DESTINATION dest [EXPORTING p1 = a1 p2 = a2 ...]
[IMPORTING p1 = a1 p2 = a2 ...]
[CHANGING p1 = a1 p2 = a2 ...]
[TABLES t1 = itab1 t2 = itab2 ...]
[EXCEPTIONS [exc1 = n1 exc2 = n2 ...]
[system_failure = ns [MESSAGE smess]]
[communication_failure = nc [MESSAGE cmess]]
[OTHERS = n_others]].
http://help.sap.com/saphelp_47x200/helpdata/en/22/042537488911d189490000e829fbbd/frameset.htm -
How to call java function in javascript
Hello Everyone,
Can anyone tell me solution that:
How to call java function in javascript?
Thanks,
VIDsYou can't since Java is running on the server and javascript is running in the browser long after the Java side of things has finished executing. Assuming you're not talking about an applet here.
But you can make calls back to the server through Ajax. All you need is something like a servlet on the receiving end which you can invoke through Ajax; from that point you can execute any Java code you want. -
Does anypne know how to fix the missing MSCVR80.dll file? Ive reinstalled itunes several timessysystem restores. Ive tried everything I can think of . Been sitting here all day and nightHELP!!!!!!!!!!!!!!!!!!!
Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
Remove all of these items in the following order:
iTunes
Apple Software Update
Apple Mobile Device Support (if this won't uninstall move on to the next item)
Bonjour
Apple Application Support
Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
Please note:
Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
HT1925: Removing and Reinstalling iTunes for Windows XP
HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
tt2 -
How to call a function every 45 minutes?
Hi..
How to call a function after 45 minutes evry day..
That function returns a value.
Which is best? Thread or using timestamp?
RegardsHello Joe,
I heard of this website, gurgle something, that actually let's you put in words like "java" and "scheduling" and it will spit out other websites that mention these terms. Fascinating stuff, hopefully I'll find the time to test it someday soon..
Lucky for you I have an article discussing solutions to your problem in my bookmarks:
http://www.ibm.com/developerworks/web/library/j-schedule.html
With kind regards
Ben
Maybe you are looking for
-
Flash CS6 and CC on the same computer?
Can I run Flash CS6 and CC on the same computer? I need inverse kinematics now only in CS6 but my computer in from my university and will shortly be converted over to FlashCC but I need many of the dropped old feratures. I'm seriously in trouble as I
-
Lenovo V200 does not support 1920x1080 resolution
I have a Lenovo V200 (0764-33G) with a LG W2343T external monitor attached which has a native resolution of 1920x1080. For some reason this resolution is not supported by the notebook. It is not a chipset issue as the Intel GM965 chip does support 19
-
Copy sales office from contract to sales order
HI, How can i copy sales office from contract to sales order.is there any requirement in the standard process? Regards, Ramky
-
I need help from chile and use a language translator to write and not turn my iphone4
I need help from chile and use a language translator to write and not turn my iphone4
-
Is there away to stop the port from reauthenticating when a device fails to open. I am trying to set up low-impact mode on a wired network. And I have some WYSE terminals that I don't want to authenticate to the network so I would like them to fail o