diff --git a/matlab/lib/+Ice/ACM.m b/matlab/lib/+Ice/ACM.m deleted file mode 100644 index 953db1695b0..00000000000 --- a/matlab/lib/+Ice/ACM.m +++ /dev/null @@ -1,41 +0,0 @@ -% ACM Summary of ACM -% -% A collection of Active Connection Management configuration settings. -% -% ACM Properties: -% timeout - A timeout value in seconds. -% close - The close semantics. -% heartbeat - The heartbeat semantics. - -% Copyright (c) ZeroC, Inc. All rights reserved. -% Generated from Connection.ice by slice2matlab version 3.7.10 - -classdef ACM - properties - % timeout - A timeout value in seconds. - timeout int32 - % close - The close semantics. - close Ice.ACMClose - % heartbeat - The heartbeat semantics. - heartbeat Ice.ACMHeartbeat - end - methods - function obj = ACM(timeout, close, heartbeat) - if nargin == 0 - obj.timeout = 0; - obj.close = Ice.ACMClose.CloseOff; - obj.heartbeat = Ice.ACMHeartbeat.HeartbeatOff; - elseif ne(timeout, IceInternal.NoInit.Instance) - obj.timeout = timeout; - obj.close = close; - obj.heartbeat = heartbeat; - end - end - function r = eq(obj, other) - r = isequal(obj, other); - end - function r = ne(obj, other) - r = ~isequal(obj, other); - end - end -end diff --git a/matlab/lib/+Ice/ACMClose.m b/matlab/lib/+Ice/ACMClose.m deleted file mode 100644 index d8e91d03039..00000000000 --- a/matlab/lib/+Ice/ACMClose.m +++ /dev/null @@ -1,48 +0,0 @@ -% ACMClose Summary of ACMClose -% -% Specifies the close semantics for Active Connection Management. -% -% ACMClose Properties: -% CloseOff - Disables automatic connection closure. -% CloseOnIdle - Gracefully closes a connection that has been idle for the configured timeout period. -% CloseOnInvocation - Forcefully closes a connection that has been idle for the configured timeout period, but only if the connection has pending invocations. -% CloseOnInvocationAndIdle - Combines the behaviors of CloseOnIdle and CloseOnInvocation. -% CloseOnIdleForceful - Forcefully closes a connection that has been idle for the configured timeout period, regardless of whether the connection has pending invocations or dispatch. - -% Copyright (c) ZeroC, Inc. All rights reserved. -% Generated from Connection.ice by slice2matlab version 3.7.10 - -classdef ACMClose < uint8 - enumeration - % Disables automatic connection closure. - CloseOff (0) - % Gracefully closes a connection that has been idle for the configured timeout period. - CloseOnIdle (1) - % Forcefully closes a connection that has been idle for the configured timeout period, but only if the connection - % has pending invocations. - CloseOnInvocation (2) - % Combines the behaviors of CloseOnIdle and CloseOnInvocation. - CloseOnInvocationAndIdle (3) - % Forcefully closes a connection that has been idle for the configured timeout period, regardless of whether the - % connection has pending invocations or dispatch. - CloseOnIdleForceful (4) - end - methods(Static) - function r = ice_getValue(v) - switch v - case 0 - r = Ice.ACMClose.CloseOff; - case 1 - r = Ice.ACMClose.CloseOnIdle; - case 2 - r = Ice.ACMClose.CloseOnInvocation; - case 3 - r = Ice.ACMClose.CloseOnInvocationAndIdle; - case 4 - r = Ice.ACMClose.CloseOnIdleForceful; - otherwise - throw(Ice.MarshalException('', '', sprintf('enumerator value %d is out of range', v))); - end - end - end -end diff --git a/matlab/lib/+Ice/ACMHeartbeat.m b/matlab/lib/+Ice/ACMHeartbeat.m deleted file mode 100644 index b6a4e0fad40..00000000000 --- a/matlab/lib/+Ice/ACMHeartbeat.m +++ /dev/null @@ -1,41 +0,0 @@ -% ACMHeartbeat Summary of ACMHeartbeat -% -% Specifies the heartbeat semantics for Active Connection Management. -% -% ACMHeartbeat Properties: -% HeartbeatOff - Disables heartbeats. -% HeartbeatOnDispatch - Send a heartbeat at regular intervals if the connection is idle and only if there are pending dispatch. -% HeartbeatOnIdle - Send a heartbeat at regular intervals when the connection is idle. -% HeartbeatAlways - Send a heartbeat at regular intervals until the connection is closed. - -% Copyright (c) ZeroC, Inc. All rights reserved. -% Generated from Connection.ice by slice2matlab version 3.7.10 - -classdef ACMHeartbeat < uint8 - enumeration - % Disables heartbeats. - HeartbeatOff (0) - % Send a heartbeat at regular intervals if the connection is idle and only if there are pending dispatch. - HeartbeatOnDispatch (1) - % Send a heartbeat at regular intervals when the connection is idle. - HeartbeatOnIdle (2) - % Send a heartbeat at regular intervals until the connection is closed. - HeartbeatAlways (3) - end - methods(Static) - function r = ice_getValue(v) - switch v - case 0 - r = Ice.ACMHeartbeat.HeartbeatOff; - case 1 - r = Ice.ACMHeartbeat.HeartbeatOnDispatch; - case 2 - r = Ice.ACMHeartbeat.HeartbeatOnIdle; - case 3 - r = Ice.ACMHeartbeat.HeartbeatAlways; - otherwise - throw(Ice.MarshalException('', '', sprintf('enumerator value %d is out of range', v))); - end - end - end -end diff --git a/matlab/lib/+Ice/Connection.m b/matlab/lib/+Ice/Connection.m index 368bb773a15..d0a1745abb9 100644 --- a/matlab/lib/+Ice/Connection.m +++ b/matlab/lib/+Ice/Connection.m @@ -15,8 +15,6 @@ % connection. % heartbeat - Send a heartbeat message. % heartbeatAsync - Send a heartbeat message. - % setACM - Set the active connection management parameters. - % getACM - Get the ACM parameters. % type - Return the connection type. % timeout - Get the timeout for the connection. % toString - Return a description of the connection as human readable @@ -151,41 +149,6 @@ function heartbeat(obj) assert(~isNull(future)); r = Ice.Future(future, 'heartbeat', 0, 'Ice_SimpleFuture', @(fut) fut.iceCall('check')); end - function setACM(obj, timeout, close, heartbeat) - % setACM Set the active connection management parameters. - % - % Parameters: - % timeout (int32) - The timeout value in milliseconds. - % close (Ice.ACMClose) - The close condition. - % heartbeat (Ice.ACMHeartbeat) - The hertbeat condition. - - if timeout == Ice.Unset - timeout = []; - end - if close == Ice.Unset - close = []; - end - if heartbeat == Ice.Unset - heartbeat = []; - end - obj.iceCall('setACM', timeout, close, heartbeat); - end - function r = getACM(obj) - % getACM Get the ACM parameters. - % - % Returns (Ice.ACM) - The ACM parameters. - - r = obj.iceCallWithResult('getACM'); - if isempty(r.timeout) - r.timeout = Ice.Unset; - end - if isempty(r.close) - r.close = Ice.Unset; - end - if isempty(r.heartbeat) - r.heartbeat = Ice.Unset; - end - end function r = type(obj) % type Return the connection type. This corresponds to the % endpoint type, i.e., "tcp", "udp", etc. diff --git a/matlab/src/Connection.cpp b/matlab/src/Connection.cpp index 2b3ea7f954c..bc1ba7f3be1 100644 --- a/matlab/src/Connection.cpp +++ b/matlab/src/Connection.cpp @@ -282,62 +282,6 @@ extern "C" return 0; } - mxArray* Ice_Connection_setACM(void* self, mxArray* t, mxArray* c, mxArray* h) - { - optional timeout; - optional close; - optional heartbeat; - - try - { - if (!mxIsEmpty(t)) - { - if (!mxIsScalar(t)) - { - throw invalid_argument("scalar value required for timeout"); - } - if (!mxIsNumeric(t)) - { - throw invalid_argument("numeric value required for timeout"); - } - timeout = static_cast(mxGetScalar(t)); - } - if (!mxIsEmpty(c)) - { - close = static_cast(getEnumerator(c, "Ice.ACMClose")); - } - if (!mxIsEmpty(h)) - { - heartbeat = static_cast(getEnumerator(h, "Ice.ACMHeartbeat")); - } - deref(self)->setACM(timeout, close, heartbeat); - } - catch (...) - { - return convertException(std::current_exception()); - } - return 0; - } - - mxArray* Ice_Connection_getACM(void* self) - { - try - { - auto acm = deref(self)->getACM(); - mxArray* params[3]; - params[0] = createInt(acm.timeout); - params[1] = createInt(static_cast(acm.close)); // The integer is converted to the enumerator. - params[2] = createInt(static_cast(acm.heartbeat)); // The integer is converted to the enumerator. - mxArray* r; - mexCallMATLAB(1, &r, 3, params, "Ice.ACM"); - return createResultValue(r); - } - catch (...) - { - return createResultException(convertException(std::current_exception())); - } - } - mxArray* Ice_Connection_type(void* self) { try