void ClientReportControlBlock_setIntgPd(ClientReportControlBlock self, uint32_t intgPd) { if (self->intgPd == NULL) self->intgPd = MmsValue_newUnsignedFromUint32(intgPd); else MmsValue_setUint32(self->intgPd, intgPd); }
void ClientReportControlBlock_setBufTm(ClientReportControlBlock self, uint32_t bufTm) { if (self->bufTm == NULL) self->bufTm = MmsValue_newUnsignedFromUint32(bufTm); else MmsValue_setUint32(self->bufTm, bufTm); }
void IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute* dataAttribute, uint32_t value) { assert(MmsValue_getType(dataAttribute->mmsValue) == MMS_UNSIGNED); assert(dataAttribute != NULL); assert(self != NULL); uint32_t currentValue = MmsValue_toUint32(dataAttribute->mmsValue); if (currentValue == value) { checkForUpdateTrigger(self, dataAttribute); } else { MmsValue_setUint32(dataAttribute->mmsValue, value); checkForChangedTriggers(self, dataAttribute); } }
void IedConnection_writeUnsigned32Value(IedConnection self, IedClientError* error, char* objectReference, FunctionalConstraint fc, uint32_t value) { uint8_t valueBuffer[4]; Asn1PrimitiveValue pVal; pVal.maxSize = 4; pVal.size = 4; pVal.octets = valueBuffer; MmsValue mmsValue; mmsValue.type = MMS_UNSIGNED; mmsValue.deleteValue = 0; mmsValue.value.integer = &pVal; MmsValue_setUint32(&mmsValue, value); IedConnection_writeObject(self, error, objectReference, fc, &mmsValue); }