MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / isResponseCompleteResult

Method isResponseCompleteResult

src/command_transaction.cpp:125–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125bool CommandTransaction::isResponseCompleteResult(CommandTransaction::Result& result, uint32_t sequence)
126{
127 if(result.size() == ResponseCompleteLength)
128 {
129 uint32_t *data = reinterpret_cast<uint32_t *>(&result[0]);
130
131 if(data[0] == ResponseCompleteMagic)
132 {
133 if(data[1] != sequence)
134 {
135 LOG_ERROR << "response complete with wrong sequence number! expected: " << sequence << " got: " << data[1];
136 }
137 return true;
138 }
139 }
140
141 return false;
142}
143
144
145} /* namespace protocol */

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected