Lines Matching refs:len

64     uint8_t type, len;  in readNanohubMemInfo()  local
85 len = buf.readU8(); in readNanohubMemInfo()
86 if (buf.getRoom() >= len) { in readNanohubMemInfo()
89 if (len == sizeof(ramFree)) in readNanohubMemInfo()
92 buf.readRaw(len); in readNanohubMemInfo()
95 if (len == sizeof(mi.ramSz)) in readNanohubMemInfo()
98 buf.readRaw(len); in readNanohubMemInfo()
101 if (len == sizeof(mi.ramSz)) in readNanohubMemInfo()
104 buf.readRaw(len); in readNanohubMemInfo()
107 if (len == sizeof(eeFree)) in readNanohubMemInfo()
110 buf.readRaw(len); in readNanohubMemInfo()
113 if (len == sizeof(mi.osSz)) in readNanohubMemInfo()
116 buf.readRaw(len); in readNanohubMemInfo()
119 if (len == sizeof(osFree)) in readNanohubMemInfo()
122 buf.readRaw(len); in readNanohubMemInfo()
125 if (len == sizeof(mi.sharedSz)) in readNanohubMemInfo()
128 buf.readRaw(len); in readNanohubMemInfo()
131 if (len == sizeof(sharedFree)) in readNanohubMemInfo()
134 buf.readRaw(len); in readNanohubMemInfo()
137 if (len != 0 || buf.getRoom() != 0) { in readNanohubMemInfo()
144 buf.readRaw(len); in readNanohubMemInfo()
184 int SystemComm::sendToSystem(const void *data, size_t len, uint32_t transactionId) in sendToSystem() argument
187 dumpBuffer("HAL -> SYS", getSystem()->mHostIfAppName, transactionId, 0, data, len); in sendToSystem()
189 return NanoHub::sendToDevice(&getSystem()->mHostIfAppName, data, len, transactionId); in sendToSystem()
253 size_t len = buf.getRoom(); in handleRx() local
262 if (len) { in handleRx()
604 size_t len = buf.getRoom(); in handleQueryStart() local
605 if (len) { in handleQueryStart()
736 size_t len = buf.getRoom(); in handleInfo() local
737 if (len) { in handleInfo()
1105 bool SystemComm::AppManager::writeApp(hub_app_name_t &appName, const uint8_t *data, int32_t len) in writeApp() argument
1116 if (write(fd, data, len) == len) { in writeApp()
1151 bool SystemComm::AppManager::cmpApp(hub_app_name_t &appName, const uint8_t *data, uint32_t len) in cmpApp() argument
1169 if (fstat(fd, &sb) == 0 && sb.st_size == len) { in cmpApp()
1170 void *buf = malloc(len); in cmpApp()
1171 … if (buf != nullptr && read(fd, buf, sb.st_size) == sb.st_size && memcmp(data, buf, len) == 0) in cmpApp()
1184 uint8_t tag, len; in readNanohubAppInfo() local
1195 len = buf.readU8(); in readNanohubAppInfo()
1196 if (tag != NANOHUB_HAL_APP_INFO_APPID || len != sizeof(name.id)) { in readNanohubAppInfo()
1213 len = buf.readU8(); in readNanohubAppInfo()
1214 if (buf.getRoom() >= len) { in readNanohubAppInfo()
1217 if (len == 0) in readNanohubAppInfo()
1219 else if (len == sizeof(app->crc)) in readNanohubAppInfo()
1222 buf.readRaw(len); in readNanohubAppInfo()
1225 if (len == 0) { in readNanohubAppInfo()
1230 } else if (len == sizeof(app->tid)) { in readNanohubAppInfo()
1235 buf.readRaw(len); in readNanohubAppInfo()
1238 if (len == sizeof(app->version)) in readNanohubAppInfo()
1241 buf.readRaw(len); in readNanohubAppInfo()
1244 if (len == sizeof(app->flashAddr)) in readNanohubAppInfo()
1247 buf.readRaw(len); in readNanohubAppInfo()
1250 if (len == 0) in readNanohubAppInfo()
1252 else if (len == sizeof(app->flashUse)) in readNanohubAppInfo()
1255 buf.readRaw(len); in readNanohubAppInfo()
1260 if (len == 0) in readNanohubAppInfo()
1262 else if (len == sizeof(uint32_t)) in readNanohubAppInfo()
1265 buf.readRaw(len); in readNanohubAppInfo()
1268 if (len == 0) in readNanohubAppInfo()
1270 else if (len == sizeof(app->chre_major)) { in readNanohubAppInfo()
1274 buf.readRaw(len); in readNanohubAppInfo()
1277 if (len == 0) in readNanohubAppInfo()
1279 else if (len == sizeof(app->chre_minor)) { in readNanohubAppInfo()
1283 buf.readRaw(len); in readNanohubAppInfo()
1286 if (len != 0 || buf.getRoom() != 0) { in readNanohubAppInfo()
1293 buf.readRaw(len); in readNanohubAppInfo()
1368 int SystemComm::doHandleRx(uint64_t appId, uint32_t transactionId, const char *data, int len, bool … in doHandleRx() argument
1377 if (!len) { in doHandleRx()
1380 MessageBuf buf(data, len); in doHandleRx()