<commit_before>#include "ua_services.h"
#include "ua_statuscodes.h"

//#if 0
/* Activate once the infrastructure for pushing events is in place. */

UA_Int32 Service_CreateMonitoredItems(SL_Channel *channel, const UA_CreateMonitoredItemsRequest *request, UA_CreateMonitoredItemsResponse *response) {
	if (request->itemsToCreateSize > 0) {
		response->resultsSize = request->itemsToCreateSize;

		UA_Array_new((void**)&(response->results),response->resultsSize,&UA_.types[UA_MONITOREDITEMCREATERESULT]);
		for (int i=0;request->itemsToCreateSize > 0 && i < request->itemsToCreateSize;i++) {
			UA_NodeId_printf("CreateMonitoredItems - itemToCreate=",&(request->itemsToCreate[i].itemToMonitor.nodeId));
			//FIXME: search the object in the namespace
			if (request->itemsToCreate[i].itemToMonitor.nodeId.identifier.numeric == 2253) { // server

				response->results[i].statusCode = UA_STATUSCODE_GOOD;
				response->results[i].monitoredItemId = 1024;
			} else {
				// response->results[i]->statusCode = UA_STATUSCODE_BAD_NODEIDUNKNOWN;

				response->results[i].statusCode = -1;
			}
		}
	}
	//mock up
	return UA_SUCCESS;
}

//#endif<commit_msg>monitoredItems mock up to prevent client from disconnecting with watchdogTimeout set revisedSamplingInterval to 1e5<commit_after>#include "ua_services.h"
#include "ua_statuscodes.h"

//#if 0
/* Activate once the infrastructure for pushing events is in place. */

UA_Int32 Service_CreateMonitoredItems(SL_Channel *channel, const UA_CreateMonitoredItemsRequest *request, UA_CreateMonitoredItemsResponse *response) {
	if (request->itemsToCreateSize > 0) {
		response->resultsSize = request->itemsToCreateSize;

		UA_Array_new((void**)&(response->results),response->resultsSize,&UA_.types[UA_MONITOREDITEMCREATERESULT]);
		for (int i=0;request->itemsToCreateSize > 0 && i < request->itemsToCreateSize;i++) {
			UA_NodeId_printf("CreateMonitoredItems - itemToCreate=",&(request->itemsToCreate[i].itemToMonitor.nodeId));
			//FIXME: search the object in the namespace

			if (request->itemsToCreate[i].itemToMonitor.nodeId.identifier.numeric == 2253) { // server

				response->results[i].statusCode = UA_STATUSCODE_GOOD;
				response->results[i].monitoredItemId = 1024;
				response->results[i].revisedSamplingInterval = 100000;
				response->results[i].revisedQueueSize = 1;
			} else {
				// response->results[i]->statusCode = UA_STATUSCODE_BAD_NODEIDUNKNOWN;

				response->results[i].statusCode = -1;
			}
		}
	}
	//mock up
	return UA_SUCCESS;
}

//#endif
{'fraction_non_alphanumeric': 0.1287485005997601, 'fraction_numerical': 0.015593762495002, 'mean_word_length': 5.398976982097187, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5980176', 'n_tokens_mistral': 909, 'n_tokens_neox': 794, 'n_words': 142}