|
|
|
@ -470,27 +470,45 @@ informationReportHandler(void* parameter, char* domainName,
|
|
|
|
|
MmsValue_delete(value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IedConnection
|
|
|
|
|
IedConnection_create()
|
|
|
|
|
static IedConnection
|
|
|
|
|
createNewConnectionObject(TLSConfiguration tlsConfig)
|
|
|
|
|
{
|
|
|
|
|
IedConnection self = (IedConnection) GLOBAL_CALLOC(1, sizeof(struct sIedConnection));
|
|
|
|
|
|
|
|
|
|
self->enabledReports = LinkedList_create();
|
|
|
|
|
self->logicalDevices = NULL;
|
|
|
|
|
self->clientControls = LinkedList_create();
|
|
|
|
|
if (self) {
|
|
|
|
|
self->enabledReports = LinkedList_create();
|
|
|
|
|
self->logicalDevices = NULL;
|
|
|
|
|
self->clientControls = LinkedList_create();
|
|
|
|
|
|
|
|
|
|
self->connection = MmsConnection_create();
|
|
|
|
|
if (tlsConfig)
|
|
|
|
|
self->connection = MmsConnection_createSecure(tlsConfig);
|
|
|
|
|
else
|
|
|
|
|
self->connection = MmsConnection_create();
|
|
|
|
|
|
|
|
|
|
self->state = IED_STATE_IDLE;
|
|
|
|
|
self->state = IED_STATE_IDLE;
|
|
|
|
|
|
|
|
|
|
self->stateMutex = Semaphore_create(1);
|
|
|
|
|
self->reportHandlerMutex = Semaphore_create(1);
|
|
|
|
|
self->stateMutex = Semaphore_create(1);
|
|
|
|
|
self->reportHandlerMutex = Semaphore_create(1);
|
|
|
|
|
|
|
|
|
|
self->connectionTimeout = DEFAULT_CONNECTION_TIMEOUT;
|
|
|
|
|
self->connectionTimeout = DEFAULT_CONNECTION_TIMEOUT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IedConnection
|
|
|
|
|
IedConnection_create()
|
|
|
|
|
{
|
|
|
|
|
return createNewConnectionObject(NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IedConnection
|
|
|
|
|
IedConnection_createWithTlsSupport(TLSConfiguration tlsConfig)
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
return createNewConnectionObject(tlsConfig);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs)
|
|
|
|
|
{
|
|
|
|
|