Yes I agree, and I used a makefile for this which build and link the source code.
I correctly obtain a .o in $pwrp_obj and an executable file in $pwrp_exe (in development station)
Now I don't know if I need if I have to manually copy this exec file onto the target or if it included in the proview pacakge (.tgz) ? At the moment I can't find it on my target but I don't know where to place it ?
Concerning the registration, I have the following line in my C code:
// Register application object
sts = gdh_NameToObjid( "Nodes-plc1p-myappl", &aoid);
if ( EVEN(sts)) throw co_error(sts);
And the following Object in my Target Node:
Nodes-PLC-myappl (object of type :Application)
To summarize name convention, name of Nodes Application object can be different of executable name until the correct Object name is correctly reference in the source code at parameter to the errh_Init function, correct ?
[EDIT] One step further, copying the exec file into $pwrp_exe makes it start finally. Now application is listed in the system log page but has status time out.
In the documentation it is written to use aproc_TimeStamp() to indicate application is running but according programmer manual the function aproc_TimeStamp is expecting 2 parameters (cycletime and maxdelay). I don't know exactly how to set those values. I have set aproc_TimeStamp(1,10) assuming a 1 sec time cycle (there is a Sleep(1) in the scan method) and I put the maxdelay to 10 sec. Unfortunatly I got time out and I don't understand why.
[EDIT 2] In proview log, my application is exited with status 139. Is that a consequence of he time out or can this be a failure in the source code that make the application exits and consequently time out ?
[EDIT 3] OK Application up and running. I discovered that Actualvalue for signal is a pointer int32 instead of int32 so I was referencing the value content badly in my test which probably breaks my application and makes the code exit
Thank your for your guideline
Thanks a lot for your help
snarf