|
|
@ -3,7 +3,7 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* IsoConnectionParameters abstract data type to represent the configurable parameters of the ISO protocol stack.
|
|
|
|
* IsoConnectionParameters abstract data type to represent the configurable parameters of the ISO protocol stack.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright 2013, 2014 Michael Zillgith
|
|
|
|
* Copyright 2013-2024 Michael Zillgith
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This file is part of libIEC61850.
|
|
|
|
* This file is part of libIEC61850.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -107,21 +107,23 @@ IsoConnectionParameters_setTcpParameters(IsoConnectionParameters self, const cha
|
|
|
|
void
|
|
|
|
void
|
|
|
|
IsoConnectionParameters_setLocalTcpParameters(IsoConnectionParameters self, const char* localIpAddress, int localTcpPort)
|
|
|
|
IsoConnectionParameters_setLocalTcpParameters(IsoConnectionParameters self, const char* localIpAddress, int localTcpPort)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (self) {
|
|
|
|
if (self)
|
|
|
|
if (localIpAddress) {
|
|
|
|
{
|
|
|
|
|
|
|
|
if (localIpAddress)
|
|
|
|
|
|
|
|
{
|
|
|
|
self->localIpAddress = strdup(localIpAddress);
|
|
|
|
self->localIpAddress = strdup(localIpAddress);
|
|
|
|
self->localTcpPort = localTcpPort;
|
|
|
|
self->localTcpPort = localTcpPort;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
IsoConnectionParameters_setRemoteApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier)
|
|
|
|
IsoConnectionParameters_setRemoteApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (apTitle == NULL)
|
|
|
|
if (apTitle == NULL)
|
|
|
|
self->remoteApTitleLen = 0;
|
|
|
|
self->remoteApTitleLen = 0;
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
self->remoteApTitleLen = BerEncoder_encodeOIDToBuffer(apTitle, self->remoteApTitle, 10);
|
|
|
|
self->remoteApTitleLen = BerEncoder_encodeOIDToBuffer(apTitle, self->remoteApTitle, 10);
|
|
|
|
self->remoteAEQualifier = aeQualifier;
|
|
|
|
self->remoteAEQualifier = aeQualifier;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -135,13 +137,13 @@ IsoConnectionParameters_setRemoteAddresses(IsoConnectionParameters self, PSelect
|
|
|
|
self->remoteTSelector = tSelector;
|
|
|
|
self->remoteTSelector = tSelector;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
IsoConnectionParameters_setLocalApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier)
|
|
|
|
IsoConnectionParameters_setLocalApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (apTitle == NULL)
|
|
|
|
if (apTitle == NULL)
|
|
|
|
self->localApTitleLen = 0;
|
|
|
|
self->localApTitleLen = 0;
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
self->localApTitleLen = BerEncoder_encodeOIDToBuffer(apTitle, self->localApTitle, 10);
|
|
|
|
self->localApTitleLen = BerEncoder_encodeOIDToBuffer(apTitle, self->localApTitle, 10);
|
|
|
|
self->localAEQualifier = aeQualifier;
|
|
|
|
self->localAEQualifier = aeQualifier;
|
|
|
|
}
|
|
|
|
}
|
|
|
|