Add a callback to an application's callback list
void PtAppAddCallback( unsigned long cb_type, int (*func)(void*,PtCallbackInfo_t*), void *data );
ph
This function adds a callback to the application's callback list. For a list of application callbacks, see PtAppSetResources().
For more information, see the Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.
int exit_cb(void *data, PtCallbackInfo_t *cbinfo) { printf( "I\'m exiting\n" ); return( Pt_CONTINUE ); }; ... PtAppAddCallback(Pt_CB_APP_EXIT, exit_cb, NULL);
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtAppGetResources(), PtAppGetResource(), PtAppRemoveCallback(), PtAppSetResource(), PtAppSetResources(), PtSetArg().