Skip to content

Commit ba71014

Browse files
committed
fix #232
1 parent 48e33cd commit ba71014

File tree

6 files changed

+34
-9
lines changed

6 files changed

+34
-9
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export DFGNode, DFGVariable, DFGFactor, AbstractDFGVariable, AbstractDFGFactor
2222
export InferenceType, PackedInferenceType, FunctorInferenceType, InferenceVariable, ConvolutionObject
2323
export FunctorSingleton, FunctorPairwise, FunctorPairwiseMinimize
2424
export getMaxPPE, getMeanPPE, getSuggestedPPE
25-
export label, timestamp, setTimestamp!, tags, setTags!, estimates, estimate, data, softtype, solverData, getData, solverDataDict, setSolverData, setSolverData!, internalId, smallData, setSmallData!, bigData
25+
export timestamp # DEPRECATED
26+
export label, getTimestamp, setTimestamp!, tags, setTags!, estimates, estimate, data, softtype, solverData, getData, solverDataDict, setSolverData, setSolverData!, internalId, smallData, setSmallData!, bigData
2627
export DFGVariableSummary, DFGFactorSummary, AbstractDFGSummary
2728
export addBigDataEntry!, getBigDataEntry, updateBigDataEntry!, deleteBigDataEntry!, getBigDataEntries, getBigDataKeys
2829

src/entities/DFGFactor.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,21 @@ setTags!(f::FactorDataLevel0, tags::Vector{Symbol}) = f.tags = tags
116116
"""
117117
$SIGNATURES
118118
119+
Get the timestamp from a DFGFactor object.
120+
121+
DEPRECATED -> use getTimestamp instead.
122+
"""
123+
function timestamp(v::FactorDataLevel1)
124+
@warn "timestamp deprecated, use getTimestamp instead"
125+
v.timestamp
126+
end
127+
128+
"""
129+
$SIGNATURES
130+
119131
Get the timestamp from a DFGFactor object.
120132
"""
121-
timestamp(v::FactorDataLevel1) = v.timestamp
133+
getTimestamp(v::FactorDataLevel1) = v.timestamp
122134

123135
"""
124136
$SIGNATURES

src/entities/DFGVariable.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,24 @@ Set the tags for a variable.
211211
"""
212212
setTags!(v::VariableDataLevel0, tags::Vector{Symbol}) = v.tags = tags
213213

214+
"""
215+
$SIGNATURES
216+
217+
Return the timestamp for a variable.
218+
219+
DEPRECATED -> use getTimestamp instead.
220+
"""
221+
function timestamp(v::VariableDataLevel1)
222+
@warn "timestamp is deprecated, use getTimestamp instead"
223+
v.timestamp
224+
end
225+
214226
"""
215227
$SIGNATURES
216228
217229
Return the timestamp for a variable.
218230
"""
219-
timestamp(v::VariableDataLevel1) = v.timestamp
231+
getTimestamp(v::VariableDataLevel1) = v.timestamp
220232

221233
"""
222234
$SIGNATURES

test/LightDFGSummaryTypes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ end
9898
@test tags(v1) == v1.tags
9999

100100
if VARTYPE == DFGVariableSummary
101-
@test timestamp(v1) == v1.timestamp
101+
@test getTimestamp(v1) == v1.timestamp
102102
@test estimates(v1) == v1.estimateDict
103103
@test estimate(v1, :notfound) == nothing
104104
@test softtype(v1) == :Pose2

test/iifInterfaceTests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ end
151151
# Accessors
152152
@test label(v1) == v1.label
153153
@test tags(v1) == v1.tags
154-
@test timestamp(v1) == v1.timestamp
154+
@test getTimestamp(v1) == v1.timestamp
155155
@test estimates(v1) == v1.estimateDict
156156
@test DistributedFactorGraphs.estimate(v1, :notfound) == nothing
157157
@test solverData(v1) === v1.solverDataDict[:default]

test/interfaceTests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ end
136136
@test setTags!(v1, testTags) == testTags
137137
@test tags(v1) == testTags
138138

139-
@test timestamp(v1) == v1.timestamp
139+
@test getTimestamp(v1) == v1.timestamp
140140
testTimestamp = now()
141141
@test setTimestamp!(v1, testTimestamp) == testTimestamp
142-
@test timestamp(v1) == testTimestamp
142+
@test getTimestamp(v1) == testTimestamp
143143

144-
@test timestamp(f1) == f1.timestamp
144+
@test getTimestamp(f1) == f1.timestamp
145145
testTimestamp = now()
146146
@test setTimestamp!(f1, testTimestamp) == testTimestamp
147-
@test timestamp(f1) == f1.timestamp
147+
@test getTimestamp(f1) == f1.timestamp
148148

149149
@test estimates(v1) == v1.estimateDict
150150
@test estimate(v1, :notfound) == nothing

0 commit comments

Comments
 (0)