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

	// Do something on callback
	//    This function is registered with the callback and invoked when the
	//    registered node is invalidated. In this case, the callback prints the
	//    display name and value of the invalidated node.
	printf("%sMessage from callback\n", TAB3);

	// get node display name
	char pDisplayNameBuf[MAX_BUF];
	size_t displayNameBufLen = MAX_BUF;

	acNodeGetDisplayName(hNode, pDisplayNameBuf, &displayNameBufLen);

	// print PayloadSize value
	char pValueBuf[MAX_BUF];
	size_t valueBufLen = MAX_BUF;

	acValueToString(hNode, pValueBuf, &valueBufLen);
	printf("%s%s: %s\n", TAB4, pDisplayNameBuf, 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 pDisplayNameBuf[MAX_BUF];
	size_t displayNameBufLen = MAX_BUF;
	acNodeGetDisplayName(hNode, pDisplayNameBuf, &displayNameBufLen);
	char pValueBuf[MAX_BUF];
	size_t valueBufLen = MAX_BUF;
	acValueToString(hNode, pValueBuf, &valueBufLen);
	printf("%s%s: %s\n", TAB4, pDisplayNameBuf, pValueBuf);
	char* pSerialNumberUserData = (char*)pUserData;
	printf("%sDevice Serial Number: %s\n", TAB4, pSerialNumberUserData);
}
void PrintNodeValue ( acNode hNode , void * pUserData ) { printf ( " \n " , TAB3 ) ; char pDisplayNameBuf [ MAX_BUF ] ; size_t displayNameBufLen = MAX_BUF ; acNodeGetDisplayName ( hNode , pDisplayNameBuf , & displayNameBufLen ) ; char pValueBuf [ MAX_BUF ] ; size_t valueBufLen = MAX_BUF ; acValueToString ( hNode , pValueBuf , & valueBufLen ) ; printf ( " \n " , TAB4 , pDisplayNameBuf , 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 //    This function is registered with the callback and invoked when the //    registered node is invalidated. In this case, the callback prints the //    display name and value of the invalidated node. // get node display name // print PayloadSize value // print device serial number from pUserData