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

Method OnNodeGeneralPropChanged

Source/Modules/nimRecorder/RecorderNode.cpp:239–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239XnStatus RecorderNode::OnNodeGeneralPropChanged(const XnChar* strNodeName, const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer)
240{
241 m_nConfigurationID++;
242
243 RecordedNodeInfo* pRecordedNodeInfo = NULL;
244 XnUInt64 nUndoRecordPos = 0;
245 XnStatus nRetVal = UpdateNodePropInfo(strNodeName, strPropName, pRecordedNodeInfo, nUndoRecordPos);
246 XN_IS_STATUS_OK(nRetVal);
247 GeneralPropRecord record(m_pRecordBuffer, RECORD_MAX_SIZE, FALSE);
248 record.SetNodeID(pRecordedNodeInfo->nNodeID);
249 record.SetPropName(strPropName);
250 record.SetPropData(pBuffer);
251 record.SetPropDataSize(nBufferSize);
252 record.SetUndoRecordPos(nUndoRecordPos);
253 nRetVal = record.Encode();
254 if (nRetVal != XN_STATUS_OK)
255 {
256 xnLogWarning(XN_MASK_OPEN_NI, "Failed to encode General Property record: %s", xnGetStatusString(nRetVal));
257 XN_ASSERT(FALSE);
258 return nRetVal;
259 }
260
261 nRetVal = WriteRecordToStream(strNodeName, record);
262 if (nRetVal != XN_STATUS_OK)
263 {
264 xnLogWarning(XN_MASK_OPEN_NI, "Failed to write General Property to file: %s", xnGetStatusString(nRetVal));
265 XN_ASSERT(FALSE);
266 return nRetVal;
267 }
268 return XN_STATUS_OK;
269}
270
271XnStatus RecorderNode::OnNodeStateReady(const XnChar* strNodeName)
272{

Callers 3

SetGeneralPropertyMethod · 0.45
NotifyExStateMethod · 0.45

Calls 7

xnGetStatusStringFunction · 0.85
SetNodeIDMethod · 0.80
SetPropNameMethod · 0.80
SetPropDataMethod · 0.80
SetPropDataSizeMethod · 0.80
SetUndoRecordPosMethod · 0.80
EncodeMethod · 0.80

Tested by

no test coverage detected