static void closeAllOpenClientConnections(IsoServer self) { #if (CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS == -1) LinkedList openConnection = LinkedList_getNext(self->openClientConnections); while (openConnection != NULL) { IsoConnection isoConnection = (IsoConnection) openConnection->data; IsoConnection_close(isoConnection); openConnection = LinkedList_getNext(openConnection); } #else int i; for (i = 0; i < CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS; i++) { if (self->openClientConnections[i] != NULL) { IsoConnection_close(self->openClientConnections[i]); #if (CONFIG_MMS_SINGLE_THREADED == 1) /* if CONFIG_MMS_SINGLE_THREADED == 0 connection instance will be destroyed by connection thread. */ IsoConnection_destroy(self->openClientConnections[i]); #endif } } #endif }
static void addVariablesWithFc(char* fc, char* lnName, LinkedList variables, LinkedList lnDirectory) { LinkedList variable = LinkedList_getNext(variables); while (variable != NULL) { char* variableName = (char*) variable->data; char* fcPos = strchr(variableName, '$'); if (fcPos != NULL) { if (memcmp(fcPos + 1, fc, 2) != 0) goto next_element; int lnNameLen = fcPos - variableName; if (strncmp(variableName, lnName, lnNameLen) == 0) { char* fcEndPos = strchr(fcPos + 1, '$'); if (fcEndPos != NULL) { char* nameEndPos = strchr(fcEndPos + 1, '$'); if (nameEndPos == NULL) addToStringSet(lnDirectory, copyString(fcEndPos + 1)); } } } next_element: variable = LinkedList_getNext(variable); } }
LinkedList /*<char*>*/ IedConnection_getLogicalDeviceList(IedConnection self, IedClientError* error) { *error = IED_ERROR_OK; if (self->logicalDevices == NULL) { IedConnection_getDeviceModelFromServer(self, error); if (*error != IED_ERROR_OK) return NULL; } if (self->logicalDevices != NULL) { LinkedList logicalDevice = LinkedList_getNext(self->logicalDevices); LinkedList logicalDeviceList = LinkedList_create(); while (logicalDevice != NULL) { ICLogicalDevice* icLogicalDevice = (ICLogicalDevice*) logicalDevice->data; char* logicalDeviceName = copyString(icLogicalDevice->name); LinkedList_add(logicalDeviceList, logicalDeviceName); logicalDevice = LinkedList_getNext(logicalDevice); } *error = IED_ERROR_OK; return logicalDeviceList; } else { *error = IED_ERROR_UNKNOWN; return NULL; } }
void IedConnection_getDeviceModelFromServer(IedConnection self, IedClientError* error) { MmsError mmsError = MMS_ERROR_NONE; *error = IED_ERROR_OK; LinkedList logicalDeviceNames = MmsConnection_getDomainNames(self->connection, &mmsError); if (logicalDeviceNames != NULL) { if (self->logicalDevices != NULL) { LinkedList_destroyDeep(self->logicalDevices, (LinkedListValueDeleteFunction) ICLogicalDevice_destroy); self->logicalDevices = NULL; } LinkedList logicalDevice = LinkedList_getNext(logicalDeviceNames); LinkedList logicalDevices = LinkedList_create(); while (logicalDevice != NULL) { char* name = (char*) logicalDevice->data; ICLogicalDevice* icLogicalDevice = ICLogicalDevice_create(name); LinkedList variables = MmsConnection_getDomainVariableNames(self->connection, &mmsError, name); if (variables != NULL) ICLogicalDevice_setVariableList(icLogicalDevice, variables); else { *error = iedConnection_mapMmsErrorToIedError(mmsError); break; } LinkedList dataSets = MmsConnection_getDomainVariableListNames(self->connection, &mmsError, name); if (dataSets != NULL) ICLogicalDevice_setDataSetList(icLogicalDevice, dataSets); else { *error = iedConnection_mapMmsErrorToIedError(mmsError); break; } LinkedList_add(logicalDevices, icLogicalDevice); logicalDevice = LinkedList_getNext(logicalDevice); } self->logicalDevices = logicalDevices; LinkedList_destroy(logicalDeviceNames); } else { *error = iedConnection_mapMmsErrorToIedError(mmsError); } }
static void handleClientConnections(IsoServer self) { #if (CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS == -1) #if (CONFIG_MMS_THREADLESS_STACK != 1) lockClientConnections(self); #endif LinkedList openConnection = LinkedList_getNext(self->openClientConnections); LinkedList lastConnection = self->openClientConnections; while (openConnection != NULL) { IsoConnection isoConnection = (IsoConnection) openConnection->data; if (IsoConnection_isRunning(isoConnection)) IsoConnection_handleTcpConnection(isoConnection); else { IsoConnection_destroy(isoConnection); lastConnection->next = openConnection->next; GLOBAL_FREEMEM(openConnection); } openConnection = LinkedList_getNext(openConnection); } #if (CONFIG_MMS_THREADLESS_STACK != 1) unlockClientConnections(self); #endif #else int i; for (i = 0; i < CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS; i++) { if (self->openClientConnections[i] != NULL) { if (IsoConnection_isRunning(self->openClientConnections[i])) { IsoConnection_handleTcpConnection(self->openClientConnections[i]); } else { IsoConnection_destroy(self->openClientConnections[i]); self->openClientConnections[i] = NULL; } } } #endif /* (CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS == -1) */ }
void IedConnection_createDataSet(IedConnection self, IedClientError* error, char* dataSetReference, LinkedList /* <char*> */dataSetElements) { char domainIdBuffer[65]; char itemIdBuffer[129]; char* domainId; char* itemId; bool isAssociationSpecific = false; if (dataSetReference[0] != '@') { domainId = MmsMapping_getMmsDomainFromObjectReference(dataSetReference, domainIdBuffer); itemId = copyStringToBuffer(dataSetReference + strlen(domainId) + 1, itemIdBuffer); StringUtils_replace(itemId, '.', '$'); } else { itemId = dataSetReference; isAssociationSpecific = true; } MmsError mmsError; LinkedList dataSetEntries = LinkedList_create(); LinkedList dataSetElement = LinkedList_getNext(dataSetElements); while (dataSetElement != NULL) { MmsVariableAccessSpecification* dataSetEntry = MmsMapping_ObjectReferenceToVariableAccessSpec((char*) dataSetElement->data); LinkedList_add(dataSetEntries, (void*) dataSetEntry); dataSetElement = LinkedList_getNext(dataSetElement); } if (isAssociationSpecific) MmsConnection_defineNamedVariableListAssociationSpecific(self->connection, &mmsError, itemId, dataSetEntries); else MmsConnection_defineNamedVariableList(self->connection, &mmsError, domainId, itemId, dataSetEntries); /* delete list and all elements */ LinkedList_destroyDeep(dataSetEntries, (LinkedListValueDeleteFunction) MmsVariableAccessSpecification_destroy); *error = iedConnection_mapMmsErrorToIedError(mmsError); }
void MmsServer_sendInformationReportVarList(MmsServer self, char* domainId, char* itemId, LinkedList values) { int i; LinkedList value; AccessResult_t** accessResultList; int variableCount; InformationReport_t* report; MmsPdu_t* mmsPdu = calloc(1, sizeof(MmsPdu_t)); mmsPdu->present = MmsPdu_PR_unconfirmedPDU; mmsPdu->choice.unconfirmedPDU.unconfirmedService.present = UnconfirmedService_PR_informationReport; report = &(mmsPdu->choice.unconfirmedPDU.unconfirmedService.choice.informationReport); report->variableAccessSpecification.present = VariableAccessSpecification_PR_variableListName; if (domainId != NULL) { report->variableAccessSpecification.choice.variableListName.present = ObjectName_PR_domainspecific; report->variableAccessSpecification.choice.variableListName.choice.domainspecific.domainId.size = strlen(domainId); report->variableAccessSpecification.choice.variableListName.choice.domainspecific.domainId.buf = domainId; report->variableAccessSpecification.choice.variableListName.choice.domainspecific.itemId.size = strlen(itemId); report->variableAccessSpecification.choice.variableListName.choice.domainspecific.itemId.buf = itemId; } else { report->variableAccessSpecification.choice.variableListName.present = ObjectName_PR_vmdspecific; report->variableAccessSpecification.choice.variableListName.choice.vmdspecific.size = strlen(itemId); report->variableAccessSpecification.choice.variableListName.choice.vmdspecific.buf = itemId; } variableCount = LinkedList_size(values); accessResultList = mmsMsg_createAccessResultsList(mmsPdu, variableCount); /* iterate values list and add values to the accessResultList */ value = LinkedList_getNext(values); for (i = 0; i < variableCount; i++) { AccessResult_t* accessResult = accessResultList[i]; mmsMsg_addResultToResultList(accessResult, (MmsValue*) value->data); value = LinkedList_getNext(value); } report->listOfAccessResult.list.array = accessResultList; report->listOfAccessResult.list.size = variableCount; report->listOfAccessResult.list.count = variableCount; }
static void deleteValueList(LinkedList values) { LinkedList value = LinkedList_getNext(values); while (value != NULL ) { MmsValue* typedValue = (MmsValue*) (value->data); MmsValue_deleteConditional(typedValue); value = LinkedList_getNext(value); } LinkedList_destroyStatic(values); }
static bool addToStringSet(LinkedList set, char* string) { LinkedList element = set; while (LinkedList_getNext(element) != NULL) { if (strcmp((char*) LinkedList_getNext(element)->data, string) == 0) return false; element = LinkedList_getNext(element); } LinkedList_insertAfter(element, string); return true; }
void* Map_removeEntry(Map map, void* key, bool deleteKey) { LinkedList element = map->entries; LinkedList lastElement = element; MapEntry* entry; void* value = NULL; while ((element = LinkedList_getNext(element)) != NULL) { entry = (MapEntry*) element->data; if (map->compareKeys(key, entry->key) == 0) { lastElement->next = element->next; value = entry->value; if (deleteKey == true) free(entry->key); free(entry); free(element); break; } lastElement = element; } return value; }
void Control_processControlActions(MmsMapping* self, uint64_t currentTimeInMs) { LinkedList element = LinkedList_getNext(self->controlObjects); while (element != NULL) { ControlObject* controlObject = (ControlObject*) element->data; if (controlObject->state == STATE_WAIT_FOR_ACTIVATION_TIME) { if (controlObject->operateTime <= currentTimeInMs) { if (DEBUG_IED_SERVER) printf("time activated operate: start operation\n"); controlObject->timeActivatedOperate = false; CheckHandlerResult checkResult = CONTROL_ACCEPTED; if (controlObject->checkHandler != NULL) { /* perform operative tests */ checkResult = controlObject->checkHandler( controlObject->checkHandlerParameter, controlObject->ctlVal, controlObject->testMode, controlObject->interlockCheck, (ClientConnection) controlObject->mmsConnection); } if (checkResult == CONTROL_ACCEPTED) { executeControlTask(controlObject); } else { ControlObject_sendLastApplError(controlObject, controlObject->mmsConnection, "Oper", CONTROL_ERROR_NO_ERROR, ADD_CAUSE_BLOCKED_BY_INTERLOCKING, controlObject->ctlNum, controlObject->origin, false); abortControlOperation(controlObject); } } } /* if (controlObject->state == STATE_WAIT_FOR_ACTICATION_TIME) */ else if (!((controlObject->state == STATE_UNSELECTED) || (controlObject->state == STATE_READY))) { executeControlTask(controlObject); } element = LinkedList_getNext(element); } }
LinkedList LinkedList_get(LinkedList list, int index) { LinkedList element = LinkedList_getNext(list); int i = 0; while (i < index) { element = LinkedList_getNext(element); if (element == NULL) return NULL; i++; } return element; }
static void informationReportHandler(void* parameter, char* domainName, char* variableListName, MmsValue* value, bool isVariableListName) { IedConnection self = (IedConnection) parameter; if (DEBUG_IED_CLIENT) printf("DEBUG_IED_CLIENT: received information report for %s\n", variableListName); if (domainName == NULL) { if (isVariableListName) { private_IedConnection_handleReport(self, value); } else { if (strcmp(variableListName, "LastApplError") == 0) handleLastApplErrorMessage(self, value); else { if (DEBUG_IED_CLIENT) printf("IED_CLIENT: Received unknown variable list report for list: %s\n", variableListName); } } } else { if (DEBUG_IED_CLIENT) printf("IED_CLIENT: RCVD CommandTermination for %s/%s\n", domainName, variableListName); LinkedList control = LinkedList_getNext(self->clientControls); while (control != NULL) { ControlObjectClient object = (ControlObjectClient) control->data; char* objectRef = ControlObjectClient_getObjectReference(object); if (doesReportMatchControlObject(domainName, variableListName, objectRef)) private_ControlObjectClient_invokeCommandTerminationHandler(object); control = LinkedList_getNext(control); } } MmsValue_delete(value); }
ClientConnection private_IedServer_getClientConnectionByHandle(IedServer self, void* serverConnectionHandle) { LinkedList element = LinkedList_getNext(self->clientConnections); ClientConnection matchingConnection = NULL; while (element != NULL) { ClientConnection connection = (ClientConnection) element->data; if (private_ClientConnection_getServerConnectionHandle(connection) == serverConnectionHandle) { matchingConnection = connection; break; } element = LinkedList_getNext(element); } return matchingConnection; }
MmsNamedVariableList MmsDomain_getNamedVariableList(MmsDomain* self, char* variableListName) { MmsNamedVariableList variableList = NULL; LinkedList element = LinkedList_getNext(self->namedVariableLists); while (element != NULL) { MmsNamedVariableList varList = (MmsNamedVariableList) element->data; if (strcmp(MmsNamedVariableList_getName(varList), variableListName) == 0) { variableList = varList; break; } element = LinkedList_getNext(element); } return variableList; }
static void createNamedVariableListResponse(MmsServerConnection* connection, MmsNamedVariableList namedList, int invokeId, ByteBuffer* response, ReadRequest_t* read, VarAccessSpec* accessSpec) { LinkedList /*<MmsValue>*/ values = LinkedList_create(); LinkedList variables = MmsNamedVariableList_getVariableList(namedList); int variableCount = LinkedList_size(variables); MmsServer_lockModel(connection->server); int i; LinkedList variable = LinkedList_getNext(variables); for (i = 0; i < variableCount; i++) { MmsNamedVariableListEntry variableListEntry = (MmsNamedVariableListEntry) variable->data; MmsDomain* variableDomain = MmsNamedVariableListEntry_getDomain(variableListEntry); char* variableName = MmsNamedVariableListEntry_getVariableName(variableListEntry); MmsTypeSpecification* namedVariable = MmsDomain_getNamedVariable(variableDomain, variableName); addNamedVariableToResultList(namedVariable, variableDomain, variableName, values, connection, NULL); variable = LinkedList_getNext(variable); } if (isSpecWithResult(read)) /* add specification to result */ encodeReadResponse(connection, invokeId, response, values, accessSpec); else encodeReadResponse(connection, invokeId, response, values, NULL); MmsServer_unlockModel(connection->server); deleteValueList(values); }
ControlObject* Control_lookupControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* objectName) { LinkedList element = LinkedList_getNext(self->controlObjects); while (element != NULL) { ControlObject* controlObject = (ControlObject*) element->data; if (ControlObject_getDomain(controlObject) == domain) { if (strcmp(ControlObject_getLNName(controlObject), lnName) == 0) { if (strcmp(ControlObject_getName(controlObject), objectName) == 0) { return controlObject; } } } element = LinkedList_getNext(element); } return NULL; }
MmsNamedVariableList MmsServerConnection_getNamedVariableList(MmsServerConnection* self, char* variableListName) { //TODO remove code duplication - similar to MmsDomain_getNamedVariableList ! MmsNamedVariableList variableList = NULL; LinkedList element = LinkedList_getNext(self->namedVariableLists); while (element != NULL) { MmsNamedVariableList varList = (MmsNamedVariableList) element->data; if (strcmp(MmsNamedVariableList_getName(varList), variableListName) == 0) { variableList = varList; break; } element = LinkedList_getNext(element); } return variableList; }
void handleLastApplErrorMessage(IedConnection self, MmsValue* value) { if (DEBUG_IED_CLIENT) printf("DEBUG_IED_CLIENT: received LastApplError\n"); MmsValue* lastApplError = value; MmsValue* cntrlObj = MmsValue_getElement(lastApplError, 0); MmsValue* error = MmsValue_getElement(lastApplError, 1); //MmsValue* origin = MmsValue_getElement(lastApplError, 2); MmsValue* ctlNum = MmsValue_getElement(lastApplError, 3); MmsValue* addCause = MmsValue_getElement(lastApplError, 4); if (DEBUG_IED_CLIENT) printf("DEBUG_IED_CLIENT: CntrlObj: %s\n", MmsValue_toString(cntrlObj)); if (DEBUG_IED_CLIENT) printf("DEBUG_IED_CLIENT: ctlNum: %u\n", MmsValue_toUint32(ctlNum)); if (DEBUG_IED_CLIENT) printf("DEBUG_IED_CLIENT: addCause: %i\n", MmsValue_toInt32(addCause)); if (DEBUG_IED_CLIENT) printf("DEBUG_IED_CLIENT: error: %i\n", MmsValue_toInt32(error)); self->lastApplError.ctlNum = MmsValue_toUint32(ctlNum); self->lastApplError.addCause = MmsValue_toInt32(addCause); self->lastApplError.error = MmsValue_toInt32(error); LinkedList control = LinkedList_getNext(self->clientControls); while (control != NULL) { ControlObjectClient object = (ControlObjectClient) control->data; char* objectRef = ControlObjectClient_getObjectReference(object); if (doesControlObjectMatch(objectRef, MmsValue_toString(cntrlObj))) ControlObjectClient_setLastApplError(object, self->lastApplError); control = LinkedList_getNext(control); } }
LinkedList /*<char*>*/ IedConnection_getLogicalDeviceDirectory(IedConnection self, IedClientError* error, char* logicalDeviceName) { if (self->logicalDevices == NULL) IedConnection_getDeviceModelFromServer(self, error); if (self->logicalDevices == NULL) return NULL; LinkedList logicalDevice = LinkedList_getNext(self->logicalDevices); while (logicalDevice != NULL) { ICLogicalDevice* device = (ICLogicalDevice*) logicalDevice->data; if (strcmp(device->name, logicalDeviceName) == 0) { LinkedList logicalNodeNames = LinkedList_create(); LinkedList variable = LinkedList_getNext(device->variables); while (variable != NULL) { char* variableName = (char*) variable->data; if (strchr(variableName, '$') == NULL) LinkedList_add(logicalNodeNames, copyString((char*) variable->data)); variable = LinkedList_getNext(variable); } return logicalNodeNames; } logicalDevice = LinkedList_getNext(logicalDevice); } *error = IED_ERROR_OBJECT_REFERENCE_INVALID; return NULL; }
void LinkedList_printStringList(LinkedList list) { LinkedList element = list; int elementCount = 0; char* str; while ((element = LinkedList_getNext(element)) != NULL) { str = (char*) (element->data); printf("%s\n", str); elementCount++; } }
LinkedList LinkedList_insertAfter(LinkedList list, void* data) { LinkedList originalNextElement = LinkedList_getNext(list); LinkedList newElement = LinkedList_create(); newElement->data = data; newElement->next = originalNextElement; list->next = newElement; return newElement; }
static void deleteValueList(LinkedList values) { LinkedList value = values; MmsValue* typedValue; while ((value = LinkedList_getNext(value)) != NULL ) { typedValue = (MmsValue*) (value->data); if (typedValue->deleteValue == 1) { MmsValue_delete(typedValue); } } LinkedList_destroyStatic(values); }
void printDataDirectory(char* doRef, IedConnection con, int spaces) { IedClientError error; LinkedList dataAttributes = IedConnection_getDataDirectory(con, &error, doRef); if (dataAttributes != NULL) { LinkedList dataAttribute = LinkedList_getNext(dataAttributes); while (dataAttribute != NULL) { char* daName = (char*) dataAttribute->data; printSpaces(spaces); printf("DA: %s\n", (char*) dataAttribute->data); dataAttribute = LinkedList_getNext(dataAttribute); char* daRef = (char*) alloca(129); sprintf(daRef, "%s.%s", doRef, daName); printDataDirectory(daRef, con, spaces + 2); } } }
void* Map_getEntry(Map map, void* key) { LinkedList element = map->entries; MapEntry* entry; while ((element = LinkedList_getNext(element)) != NULL) { entry = (MapEntry*) element->data; if (map->compareKeys(key, entry->key) == 0) { return entry->value; }; } return NULL; }
void Map_deleteDeep(Map map, bool deleteKey, void (*valueDeleteFunction) (void*)) { LinkedList element = map->entries; MapEntry* entry; while ((element = LinkedList_getNext(element)) != NULL) { entry = (MapEntry*) element->data; if (deleteKey == true) free(entry->key); valueDeleteFunction(entry->value); } LinkedList_destroy(map->entries); free(map); }
void Map_deleteStatic(Map map, bool deleteKey) { LinkedList element = map->entries; MapEntry* entry; if (deleteKey == true) { while ((element = LinkedList_getNext(element)) != NULL) { entry = (MapEntry*) element->data; free(entry->key); } } LinkedList_destroy(map->entries); free(map); }
/** * Request multiple values of a single domain */ int mmsClient_createReadRequestMultipleValues(char* domainId, LinkedList items, ByteBuffer* writeBuffer) { MmsPdu_t* mmsPdu = mmsClient_createConfirmedRequestPdu(1); ReadRequest_t* readRequest = createReadRequest(mmsPdu); readRequest->specificationWithResult = NULL; int valuesCount = LinkedList_size(items); ListOfVariableSeq_t** listOfVars = createListOfVariables(readRequest, valuesCount); LinkedList item = items; char* itemId; int i = 0; while ((item = LinkedList_getNext(item)) != NULL) { itemId = (char*) (item->data); listOfVars[i] = createVariableIdentifier(domainId, itemId); i++; } asn_enc_rval_t rval; rval = der_encode(&asn_DEF_MmsPdu, mmsPdu, mmsClient_write_out, (void*) writeBuffer); if (DEBUG) xer_fprint(stdout, &asn_DEF_MmsPdu, mmsPdu); for (i = 0; i < valuesCount; i++) { free(listOfVars[i]); } free(listOfVars); readRequest->variableAccessSpecification.choice.listOfVariable.list.count = 0; readRequest->variableAccessSpecification.choice.listOfVariable.list.size = 0; readRequest->variableAccessSpecification.choice.listOfVariable.list.array = NULL; asn_DEF_MmsPdu.free_struct(&asn_DEF_MmsPdu, mmsPdu, 0); return rval.encoded; }
/** * Request multiple values of a single domain */ int mmsClient_createReadRequestMultipleValues(uint32_t invokeId, const char* domainId, LinkedList items, ByteBuffer* writeBuffer) { MmsPdu_t* mmsPdu = mmsClient_createConfirmedRequestPdu(invokeId); ReadRequest_t* readRequest = createReadRequest(mmsPdu); readRequest->specificationWithResult = NULL; int valuesCount = LinkedList_size(items); ListOfVariableSeq_t** listOfVars = createListOfVariables(readRequest, valuesCount); LinkedList item = items; int i = 0; while ((item = LinkedList_getNext(item)) != NULL) { listOfVars[i] = createVariableIdentifier(domainId, (char*) (item->data)); i++; } asn_enc_rval_t rval; rval = der_encode(&asn_DEF_MmsPdu, mmsPdu, (asn_app_consume_bytes_f*) mmsClient_write_out, (void*) writeBuffer); for (i = 0; i < valuesCount; i++) { GLOBAL_FREEMEM(listOfVars[i]); } GLOBAL_FREEMEM(listOfVars); readRequest->variableAccessSpecification.choice.listOfVariable.list.count = 0; readRequest->variableAccessSpecification.choice.listOfVariable.list.size = 0; readRequest->variableAccessSpecification.choice.listOfVariable.list.array = NULL; asn_DEF_MmsPdu.free_struct(&asn_DEF_MmsPdu, mmsPdu, 0); return rval.encoded; }
void Reporting_processReportEvents(MmsMapping* self, uint64_t currentTimeInMs) { LinkedList element = self->reportControls; while ((element = LinkedList_getNext(element)) != NULL ) { ReportControl* rc = (ReportControl*) element->data; if (rc->enabled) { if (rc->triggerOps & TRG_OPT_GI) { if (rc->gi) { updateTimeOfEntry(rc, currentTimeInMs); sendReport(rc, false, true); rc->triggered = false; } } if (rc->triggerOps & TRG_OPT_INTEGRITY) { if (rc->intgPd > 0) { if (currentTimeInMs >= rc->nextIntgReportTime) { rc->nextIntgReportTime = currentTimeInMs + rc->intgPd; updateTimeOfEntry(rc, currentTimeInMs); sendReport(rc, true, false); rc->triggered = false; } } } if (rc->triggered) { if (currentTimeInMs >= rc->reportTime) { sendReport(rc, false, false); rc->triggered = false; } } } } }