diff -r 8b45ff4202c3 -r b505f7116a1c doc/manual/en/canfestival_OS.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/manual/en/canfestival_OS.svg Fri Apr 13 10:57:03 2007 +0200 @@ -0,0 +1,1303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + My_App.c + + + + + CanSend + + + + CAN driver interfacecan_xxx.c)canOpen_drivercanClose_drivercanSend_drivercanReceive_driver + + OSinterface + + + SYSTEM TIMERSINTERFACE(timers_xxx.c)CreateReceiveTaskWaitReceiveTaskEnd(Start/Stop)TimerLoop + + + + ThreadCANReceiveLoop + + Timer + + + + + + + + + + + + + + + + + + + + creates/stopthread + + + + } + + + + + SCHEDULINGtimer.cTimeDispatch + + CanFestival Library + + + + + + CANDISPATCHINGstates.ccanDispatch + + + + + + mutex + + + + + creates/stoptimer + + + + createsmutex + + #include canfestival.h //GUI generated header #include MyNode.hvoid InitNode(CO_Data* d, UNS32 id){ setNodeId(&MyNode_Data, 0x01); setState(&MyNode_Data, Initialisation);}void Operational(){ /* Your code for Operational State */}int main(int argc, char *argv[]){ LoadCanDriver("can_peak_win32.dll"); MyNode_Data.operational = Operational; s_BOARD MyBoard = {"0", "500K"}; MyCanHandle = canOpen(&MyBoard,&MyNode_Data); StartTimerLoop(&InitNode); /* Your Code Here */ StopTimerLoop(); canClose(&MyNode_Data);} + + + unix.c or win32.c + + CAN_xxx .dll/.so + + + LoadCanDriver + + + + canOpen + + + + + + + + canClose + + + + + + + + Callbacks + Predefined or OD entry accesscallbacks registered withRegisterSetODentryCallBack + + + + + + + + + + + + + + Register the predefined"On Operational State" callback. + Start the scheduler with InitNode as the firstscheduled function call. + + + + + + + + Always surround stack calls withEnterMutex()LeaveMutex() + + ! + + + Load the CAN interfacedynamic linking library (optional) + + Open Can poard and associateit with the CanOpen node. + + CanFestival integration with Unix and win32 OS + +