Skip to content

Commit 9904fee

Browse files
committed
ctx: Fix/migrate get_string_array, monitors, ZIP.
1 parent 923c47b commit 9904fee

39 files changed

+102
-92
lines changed

+DSS_MATLAB/APIUtil.m

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -122,42 +122,42 @@ function delete(obj)
122122
function result = get_string_array(obj, funcname, varargin)
123123
dataPointer = libpointer('voidPtr', 0);
124124
countPointer = libpointer('int32Ptr', [0, 0]);
125-
calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
125+
calllib(obj.libname, funcname, obj.dssctx, dataPointer, countPointer, varargin{:});
126126
result = cell(countPointer.Value(1), 1);
127127
for i=1:countPointer.Value(1)
128128
result(i) = cellstr(calllib(obj.libname, 'DSS_Get_PAnsiChar', dataPointer, i - 1));
129129
end
130130
calllib(obj.libname, 'DSS_Dispose_PPAnsiChar', dataPointer, countPointer.Value(2));
131131
end
132132

133-
function result = get_int8_array(obj, funcname, varargin)
134-
dataPointer = libpointer('int8PtrPtr');
135-
countPointer = libpointer('int32Ptr', [0, 0]);
136-
calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
137-
dataPointer.Value
138-
setdatatype(dataPointer.Value, 'int8Ptr', 1, countPointer.Value(1));
139-
result = dataPointer.Value;
140-
calllib(obj.libname, 'DSS_Dispose_PByte', dataPointer);
141-
obj.CheckForError();
142-
end
133+
% function result = get_int8_array(obj, funcname, varargin)
134+
% dataPointer = libpointer('int8PtrPtr');
135+
% countPointer = libpointer('int32Ptr', [0, 0]);
136+
% calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
137+
% dataPointer.Value
138+
% setdatatype(dataPointer.Value, 'int8Ptr', 1, countPointer.Value(1));
139+
% result = dataPointer.Value;
140+
% calllib(obj.libname, 'DSS_Dispose_PByte', dataPointer);
141+
% obj.CheckForError();
142+
% end
143143

144-
function result = get_int32_array(obj, funcname, varargin)
145-
dataPointer = libpointer('int32PtrPtr');
146-
countPointer = libpointer('int32Ptr', [0, 0]);
147-
calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
148-
setdatatype(dataPointer.Value, 'int32Ptr', 1, countPointer.Value(1));
149-
result = dataPointer.Value;
150-
calllib(obj.libname, 'DSS_Dispose_PInteger', dataPointer);
151-
end
144+
% function result = get_int32_array(obj, funcname, varargin)
145+
% dataPointer = libpointer('int32PtrPtr');
146+
% countPointer = libpointer('int32Ptr', [0, 0]);
147+
% calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
148+
% setdatatype(dataPointer.Value, 'int32Ptr', 1, countPointer.Value(1));
149+
% result = dataPointer.Value;
150+
% calllib(obj.libname, 'DSS_Dispose_PInteger', dataPointer);
151+
% end
152152

153-
function result = get_float64_array(obj, funcname, varargin)
154-
dataPointer = libpointer('doublePtrPtr');
155-
countPointer = libpointer('int32Ptr', [0, 0]);
156-
calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
157-
setdatatype(dataPointer.Value, 'doublePtr', 1, countPointer.Value(1));
158-
result = dataPointer.Value;
159-
calllib(obj.libname, 'DSS_Dispose_PDouble', dataPointer);
160-
end
153+
% function result = get_float64_array(obj, funcname, varargin)
154+
% dataPointer = libpointer('doublePtrPtr');
155+
% countPointer = libpointer('int32Ptr', [0, 0]);
156+
% calllib(obj.libname, funcname, dataPointer, countPointer, varargin{:});
157+
% setdatatype(dataPointer.Value, 'doublePtr', 1, countPointer.Value(1));
158+
% result = dataPointer.Value;
159+
% calllib(obj.libname, 'DSS_Dispose_PDouble', dataPointer);
160+
% end
161161

162162
end
163163
end

+DSS_MATLAB/IActiveClass.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
function result = get.AllNames(obj)
5959
% (read-only) Array of strings consisting of all element names in the active class.
60-
result = obj.apiutil.get_string_array('ctx_ActiveClass_Get_AllNames', obj.dssctx);
60+
result = obj.apiutil.get_string_array('ctx_ActiveClass_Get_AllNames');
6161
obj.CheckForError();
6262
end
6363

+DSS_MATLAB/IBus.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,19 +301,19 @@
301301

302302
function result = get.LoadList(obj)
303303
% List of strings: Full Names of LOAD elements connected to the active bus.
304-
result = obj.apiutil.get_string_array('ctx_Bus_Get_LoadList', obj.dssctx);
304+
result = obj.apiutil.get_string_array('ctx_Bus_Get_LoadList');
305305
obj.CheckForError();
306306
end
307307

308308
function result = get.LineList(obj)
309309
% List of strings: Full Names of LINE elements connected to the active bus.
310-
result = obj.apiutil.get_string_array('ctx_Bus_Get_LineList', obj.dssctx);
310+
result = obj.apiutil.get_string_array('ctx_Bus_Get_LineList');
311311
obj.CheckForError();
312312
end
313313

314314
function result = get.AllPCEatBus(obj)
315315
% Returns an array with the names of all PCE connected to the active bus
316-
result = obj.apiutil.get_string_array('ctx_Bus_Get_AllPCEatBus', obj.dssctx);
316+
result = obj.apiutil.get_string_array('ctx_Bus_Get_AllPCEatBus');
317317
obj.CheckForError();
318318
if (~isempty(result))
319319
result{end + 1} = '';
@@ -324,7 +324,7 @@
324324

325325
function result = get.AllPDEatBus(obj)
326326
% Returns an array with the names of all PDE connected to the active bus
327-
result = obj.apiutil.get_string_array('ctx_Bus_Get_AllPDEatBus', obj.dssctx);
327+
result = obj.apiutil.get_string_array('ctx_Bus_Get_AllPDEatBus');
328328
obj.CheckForError();
329329
if (~isempty(result))
330330
result{end + 1} = '';

+DSS_MATLAB/ICNData.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
function result = get.AllNames(obj)
6666
% Array of strings with all CNData names
67-
result = obj.apiutil.get_string_array('ctx_CNData_Get_AllNames', obj.dssctx);
67+
result = obj.apiutil.get_string_array('ctx_CNData_Get_AllNames');
6868
end
6969

7070
function result = get.Count(obj)

+DSS_MATLAB/ICapControls.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
function result = get.AllNames(obj)
6666
% Array of strings with all CapControl names
67-
result = obj.apiutil.get_string_array('ctx_CapControls_Get_AllNames', obj.dssctx);
67+
result = obj.apiutil.get_string_array('ctx_CapControls_Get_AllNames');
6868
end
6969

7070
function result = get.Count(obj)

+DSS_MATLAB/ICapacitors.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
function result = get.AllNames(obj)
6868
% Array of strings with all Capacitor names
69-
result = obj.apiutil.get_string_array('ctx_Capacitors_Get_AllNames', obj.dssctx);
69+
result = obj.apiutil.get_string_array('ctx_Capacitors_Get_AllNames');
7070
end
7171

7272
function result = get.Count(obj)

+DSS_MATLAB/ICircuit.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350

351351
function result = get.AllBusNames(obj)
352352
% (read-only) Array of strings containing names of all buses in circuit (see AllNodeNames).
353-
result = obj.apiutil.get_string_array('ctx_Circuit_Get_AllBusNames', obj.dssctx);
353+
result = obj.apiutil.get_string_array('ctx_Circuit_Get_AllBusNames');
354354
obj.CheckForError();
355355
end
356356

@@ -384,7 +384,7 @@
384384

385385
function result = get.AllElementNames(obj)
386386
% (read-only) Array of strings containing Full Name of all elements.
387-
result = obj.apiutil.get_string_array('ctx_Circuit_Get_AllElementNames', obj.dssctx);
387+
result = obj.apiutil.get_string_array('ctx_Circuit_Get_AllElementNames');
388388
obj.CheckForError();
389389
end
390390

@@ -397,7 +397,7 @@
397397

398398
function result = get.AllNodeNames(obj)
399399
% (read-only) Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc.
400-
result = obj.apiutil.get_string_array('ctx_Circuit_Get_AllNodeNames', obj.dssctx);
400+
result = obj.apiutil.get_string_array('ctx_Circuit_Get_AllNodeNames');
401401
obj.CheckForError();
402402
end
403403

@@ -477,7 +477,7 @@
477477

478478
function result = get.YNodeOrder(obj)
479479
% (read-only) Array of strings containing the names of the nodes in the same order as the Y matrix
480-
result = obj.apiutil.get_string_array('ctx_Circuit_Get_YNodeOrder', obj.dssctx);
480+
result = obj.apiutil.get_string_array('ctx_Circuit_Get_YNodeOrder');
481481
obj.CheckForError();
482482
end
483483

+DSS_MATLAB/ICktElement.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@
175175

176176
function result = get.AllPropertyNames(obj)
177177
% (read-only) Array containing all property names of the active device.
178-
result = obj.apiutil.get_string_array('ctx_CktElement_Get_AllPropertyNames', obj.dssctx);
178+
result = obj.apiutil.get_string_array('ctx_CktElement_Get_AllPropertyNames');
179179
obj.CheckForError();
180180
end
181181

182182
function result = get.AllVariableNames(obj)
183183
% (read-only) Array of strings listing all the published variable names, if a PCElement. Otherwise, null string.
184-
result = obj.apiutil.get_string_array('ctx_CktElement_Get_AllVariableNames', obj.dssctx);
184+
result = obj.apiutil.get_string_array('ctx_CktElement_Get_AllVariableNames');
185185
obj.CheckForError();
186186
end
187187

@@ -194,7 +194,7 @@
194194

195195
function result = get.BusNames(obj)
196196
% Array of strings. Get Bus definitions to which each terminal is connected. 0-based array.
197-
result = obj.apiutil.get_string_array('ctx_CktElement_Get_BusNames', obj.dssctx);
197+
result = obj.apiutil.get_string_array('ctx_CktElement_Get_BusNames');
198198
obj.CheckForError();
199199
end
200200
function obj = set.BusNames(obj, Value)

+DSS_MATLAB/ICtrlQueue.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
function result = get.Queue(obj)
9595
% (read-only) Array of strings containing the entire queue in CSV format
96-
result = obj.apiutil.get_string_array('ctx_CtrlQueue_Get_Queue', obj.dssctx);
96+
result = obj.apiutil.get_string_array('ctx_CtrlQueue_Get_Queue');
9797
obj.CheckForError();
9898
end
9999

+DSS_MATLAB/IDSS.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
function result = get.Classes(obj)
128128
% (read-only) List of DSS intrinsic classes (names of the classes)
129-
result = obj.apiutil.get_string_array('ctx_DSS_Get_Classes', obj.dssctx);
129+
result = obj.apiutil.get_string_array('ctx_DSS_Get_Classes');
130130
obj.CheckForError();
131131
end
132132

@@ -166,7 +166,7 @@
166166

167167
function result = get.UserClasses(obj)
168168
% (read-only) List of user-defined classes
169-
result = obj.apiutil.get_string_array('ctx_DSS_Get_UserClasses', obj.dssctx);
169+
result = obj.apiutil.get_string_array('ctx_DSS_Get_UserClasses');
170170
obj.CheckForError();
171171
end
172172

0 commit comments

Comments
 (0)