| 132 | }; |
| 133 | |
| 134 | class GenericResponse |
| 135 | { |
| 136 | private: |
| 137 | std::string dump_; |
| 138 | public: |
| 139 | GenericResponse(const std::vector<unsigned char> &data) |
| 140 | { |
| 141 | int length = data.size(); |
| 142 | std::stringstream dump; |
| 143 | dump << length << " bytes of raw data" << std::endl; |
| 144 | |
| 145 | int lines = length >> 4; |
| 146 | if (length % 16 != 0) lines += 1; |
| 147 | |
| 148 | for (int i = 0; i < lines; i++) |
| 149 | { |
| 150 | dump << "0x" << std::hex << std::setfill('0') << std::setw(4) << (i*16) << ": "; |
| 151 | for (int j = 0; j < 16; j++) |
| 152 | { |
| 153 | if (j < length) dump << std::hex << std::setfill('0') << std::setw(2) << int(data[i*16+j]) << " "; |
| 154 | else dump << " "; |
| 155 | } |
| 156 | dump << " "; |
| 157 | for (int j = 0; (j < 16) && (j < length); j++) |
| 158 | { |
| 159 | unsigned char c = data[i*16+j]; |
| 160 | dump << (((c<32)||(c>128))?'.':c); |
| 161 | } |
| 162 | dump << std::endl; |
| 163 | length -= 16; |
| 164 | } |
| 165 | |
| 166 | dump_ = dump.str(); |
| 167 | } |
| 168 | |
| 169 | std::string toString() |
| 170 | { |
| 171 | return dump_; |
| 172 | } |
| 173 | }; |
| 174 | |
| 175 | // probably some combination of color camera intrinsics + depth coefficient tables |
| 176 | LIBFREENECT2_PACK(struct RgbCameraParamsResponse |
nothing calls this directly
no outgoing calls
no test coverage detected