| 141 | } |
| 142 | |
| 143 | XnStatus 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 | |
| 176 | XnStatus RecorderNode::OnNodeRealPropChanged(const XnChar* strNodeName, const XnChar* strPropName, XnDouble dValue) |
| 177 | { |
no test coverage detected