|
|
@ -506,11 +506,15 @@ MmsGooseControlBlock_disable(MmsGooseControlBlock self, MmsMapping* mmsMapping)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t currentTime)
|
|
|
|
MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t currentTime, MmsMapping* mapping)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (self->publisher) {
|
|
|
|
if (self->publisher) {
|
|
|
|
if (currentTime >= self->nextPublishTime) {
|
|
|
|
if (currentTime >= self->nextPublishTime) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IedServer_lockDataModel(mapping->iedServer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currentTime >= self->nextPublishTime) {
|
|
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_THREADLESS_STACK != 1)
|
|
|
|
#if (CONFIG_MMS_THREADLESS_STACK != 1)
|
|
|
|
Semaphore_wait(self->publisherMutex);
|
|
|
|
Semaphore_wait(self->publisherMutex);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -538,6 +542,10 @@ MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t current
|
|
|
|
Semaphore_post(self->publisherMutex);
|
|
|
|
Semaphore_post(self->publisherMutex);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IedServer_unlockDataModel(mapping->iedServer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
else if ((self->nextPublishTime - currentTime) > ((uint32_t) self->maxTime * 2)) {
|
|
|
|
else if ((self->nextPublishTime - currentTime) > ((uint32_t) self->maxTime * 2)) {
|
|
|
|
self->nextPublishTime = currentTime + self->minTime;
|
|
|
|
self->nextPublishTime = currentTime + self->minTime;
|
|
|
|
}
|
|
|
|
}
|
|
|
|