MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / OnNodeIntPropChanged

Method OnNodeIntPropChanged

Source/Modules/nimRecorder/RecorderNode.cpp:143–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143XnStatus RecorderNode::OnNodeIntPropChanged(const XnChar* strNodeName, const XnChar* strPropName, XnUInt64 nValue)
144{
145 m_nConfigurationID++;
146
147 XnUInt64 nUndoRecordPos = 0;
148 RecordedNodeInfo* pRecordedNodeInfo = NULL;
149 XnStatus nRetVal = UpdateNodePropInfo(strNodeName, strPropName, pRecordedNodeInfo, nUndoRecordPos);
150 XN_IS_STATUS_OK(nRetVal);
151
152 IntPropRecord intPropRecord(m_pRecordBuffer, RECORD_MAX_SIZE, FALSE);
153 intPropRecord.SetNodeID(pRecordedNodeInfo->nNodeID);
154 intPropRecord.SetPropName(strPropName);
155 intPropRecord.SetValue(nValue);
156 intPropRecord.SetUndoRecordPos(nUndoRecordPos);
157
158 nRetVal = intPropRecord.Encode();
159 if (nRetVal != XN_STATUS_OK)
160 {
161 xnLogWarning(XN_MASK_OPEN_NI, "Failed to encode Int Property '%s': %s", strPropName, xnGetStatusString(nRetVal));
162 XN_ASSERT(FALSE);
163 return nRetVal;
164 }
165
166 nRetVal = WriteRecordToStream(strNodeName, intPropRecord);
167 if (nRetVal != XN_STATUS_OK)
168 {
169 xnLogWarning(XN_MASK_OPEN_NI, "Failed to write Int Property '%s' to file: %s", strPropName, xnGetStatusString(nRetVal));
170 XN_ASSERT(FALSE);
171 return nRetVal;
172 }
173 return XN_STATUS_OK;
174}
175
176XnStatus RecorderNode::OnNodeRealPropChanged(const XnChar* strNodeName, const XnChar* strPropName, XnDouble dValue)
177{

Callers 3

SetIntPropertyMethod · 0.45
NotifyExStateMethod · 0.45
HandleIntPropRecordMethod · 0.45

Calls 6

xnGetStatusStringFunction · 0.85
SetNodeIDMethod · 0.80
SetPropNameMethod · 0.80
SetUndoRecordPosMethod · 0.80
EncodeMethod · 0.80
SetValueMethod · 0.45

Tested by

no test coverage detected