Examples/ArenaC/C_Callback_OnEvent/C_Callback_OnEvent.c
void PrintNodeValue(acNode hNode, void* pUserData)
{

	// Do something on callback
	printf("%sMessage from callback\n", TAB3);

	// print test event timestamp
	char pValueBuf[MAX_BUF];
	size_t valueBufLen = MAX_BUF;

	acValueToString(hNode, pValueBuf, &valueBufLen);

	printf("%sTest event timestamp: %s\n", TAB4, pValueBuf);

	// print device serial number from pUserData
	char* pSerialNumberUserData = (char*)pUserData;

	printf("%sDevice Serial Number: %s\n", TAB4, pSerialNumberUserData);
}
// callback function
// (1) prints information from the callback
callback function
(1) prints information from the callback
callback function ( 1 ) prints information from the callback
void PrintNodeValue(acNode hNode, void* pUserData)
{
	printf("%sMessage from callback\n", TAB3);
	char pValueBuf[MAX_BUF];
	size_t valueBufLen = MAX_BUF;
	acValueToString(hNode, pValueBuf, &valueBufLen);
	printf("%sTest event timestamp: %s\n", TAB4, pValueBuf);
	char* pSerialNumberUserData = (char*)pUserData;
	printf("%sDevice Serial Number: %s\n", TAB4, pSerialNumberUserData);
}
void PrintNodeValue ( acNode hNode , void * pUserData ) { printf ( " \n " , TAB3 ) ; char pValueBuf [ MAX_BUF ] ; size_t valueBufLen = MAX_BUF ; acValueToString ( hNode , pValueBuf , & valueBufLen ) ; printf ( " \n " , TAB4 , pValueBuf ) ; char * pSerialNumberUserData = ( char * ) pUserData ; printf ( " \n " , TAB4 , pSerialNumberUserData ) ; }
callback function
(1) prints information from the callback
callback function ( 1 ) prints information from the callback
// Do something on callback // print test event timestamp // print device serial number from pUserData