@@ -177,8 +177,15 @@ getEstimateFields(::MeanMaxPPE) = [:suggested, :max, :mean]
177
177
# # DFG Variables
178
178
# #==============================================================================
179
179
180
- # Packed Variable
181
- Base. @kwdef struct PackedVariable <: AbstractDFGVariable
180
+
181
+ export Variable
182
+
183
+ """
184
+ $(TYPEDEF)
185
+
186
+ The Variable information packed in a way that accomdates multi-lang using json.
187
+ """
188
+ Base. @kwdef struct Variable <: AbstractDFGVariable
182
189
id:: Union{UUID, Nothing} = nothing
183
190
label:: Symbol
184
191
tags:: Vector{Symbol} = Symbol[]
@@ -194,7 +201,7 @@ Base.@kwdef struct PackedVariable <: AbstractDFGVariable
194
201
end
195
202
196
203
# IIF like contruction helper for packed variable
197
- function PackedVariable (
204
+ function Variable (
198
205
label:: Symbol ,
199
206
variableType:: String ;
200
207
tags:: Vector{Symbol} = Symbol[],
@@ -206,7 +213,7 @@ function PackedVariable(
206
213
)
207
214
union! (tags, [:VARIABLE ])
208
215
209
- pacvar = PackedVariable (;
216
+ pacvar = Variable (;
210
217
label,
211
218
variableType,
212
219
nstime = string (nanosecondtime),
@@ -219,10 +226,11 @@ function PackedVariable(
219
226
220
227
return pacvar
221
228
end
229
+ const PackedVariable = Variable
222
230
223
- StructTypes. StructType (:: Type{PackedVariable } ) = StructTypes. UnorderedStruct ()
224
- StructTypes. idproperty (:: Type{PackedVariable } ) = :id
225
- StructTypes. omitempties (:: Type{PackedVariable } ) = (:id ,)
231
+ StructTypes. StructType (:: Type{Variable } ) = StructTypes. UnorderedStruct ()
232
+ StructTypes. idproperty (:: Type{Variable } ) = :id
233
+ StructTypes. omitempties (:: Type{Variable } ) = (:id ,)
226
234
227
235
# #------------------------------------------------------------------------------
228
236
# # DFGVariable lv2
@@ -424,8 +432,8 @@ StructTypes.omitempties(::Type{SkeletonDFGVariable}) = (:id,)
424
432
# #==============================================================================
425
433
# Define variable levels
426
434
# #==============================================================================
427
- const VariableDataLevel0 = Union{DFGVariable, DFGVariableSummary, PackedVariable , SkeletonDFGVariable}
428
- const VariableDataLevel1 = Union{DFGVariable, DFGVariableSummary, PackedVariable }
435
+ const VariableDataLevel0 = Union{DFGVariable, DFGVariableSummary, Variable , SkeletonDFGVariable}
436
+ const VariableDataLevel1 = Union{DFGVariable, DFGVariableSummary, Variable }
429
437
const VariableDataLevel2 = Union{DFGVariable}
430
438
431
439
# #==============================================================================
0 commit comments