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

Function xnLogWriteBinaryDataImplV

Source/OpenNI/XnLog.cpp:821–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819}
820
821void xnLogWriteBinaryDataImplV(const XnChar* strMask, XnLogSeverity nSeverity, const XnChar* csFile, XnUInt32 nLine, XnUChar* pBinData, XnUInt32 nDataSize, const XnChar* csFormat, va_list args)
822{
823 // first write preceding message:
824 xnLogWriteImplV(strMask, nSeverity, csFile, nLine, csFormat, args);
825
826 // now write binary data (in lines of 16 bytes)
827 XnChar csLine[256];
828 XnUInt32 pos = 0;
829
830 for (XnUInt32 i = 0; i < nDataSize; ++i)
831 {
832 if ((i % 16) == 0) // first byte in line
833 {
834 // start a new line
835 pos = sprintf(csLine, "%6u: ", i);
836 }
837
838 pos += sprintf(csLine + pos, "%02x ", pBinData[i]);
839
840 if ((i % 16) == 15 || (i == nDataSize-1)) // last byte in line
841 {
842 xnLogWriteImpl(strMask, nSeverity, csFile, nLine, "%s", csLine);
843 }
844 }
845}
846
847XN_C_API XnStatus XN_C_DECL xnLogSetMaskMinSeverity(const XnChar* strMask, XnLogSeverity minSeverity)
848{

Callers 1

xnLoggerWriteBinaryDataFunction · 0.85

Calls 2

xnLogWriteImplVFunction · 0.85
xnLogWriteImplFunction · 0.85

Tested by

no test coverage detected