• Home
  • Raw
  • Download

Lines Matching refs:len

91     for (uint32_t i = 0; i < array->len; i++) {  in Ntohl64Array()
98 for (uint32_t i = 0; i < array->len; i++) { in Htonl64Array()
117 if (msg.len <= *readIndex) { in ReadDataFromMsg()
122 if (msg.len - *readIndex < retData->len) { in ReadDataFromMsg()
127 if (memcpy_s(retData->data, retData->len, msg.data + *readIndex, retData->len) != EOK) { in ReadDataFromMsg()
132 *readIndex += retData->len; in ReadDataFromMsg()
152 if (msg->len <= *writeIndex) { in WriteDataToMsg()
157 if (msg->len - *writeIndex < data.len) { in WriteDataToMsg()
162 if (memcpy_s(msg->data + *writeIndex, msg->len - *writeIndex, data.data, data.len) != EOK) { in WriteDataToMsg()
167 *writeIndex += data.len; in WriteDataToMsg()
187 while (readIndex < msg.len) { in ParseAttributeSerializedMsgInner()
195 IF_TRUE_LOGE_AND_RETURN_VAL(length > readBuffer->len, GENERAL_ERROR); in ParseAttributeSerializedMsgInner()
270 ResultCode writeLengthResult = WriteUInt32ToMsg(retMsg, &writeIndex, array->len); in GetAttributeSerializedMsg()
273 if (array->len == 0) { in GetAttributeSerializedMsg()
281 retMsg->len = writeIndex; in GetAttributeSerializedMsg()
306 IF_TRUE_LOGE_AND_RETURN_VAL(uint32Data.len != sizeof(netOrderValue), GENERAL_ERROR); in GetAttributeUint32()
348 IF_TRUE_LOGE_AND_RETURN_VAL(uint64Data.len != sizeof(netOrderValue), GENERAL_ERROR); in GetAttributeUint64()
383 …if (attribute->values[attributeIndex]->data != NULL && attribute->values[attributeIndex]->len != 0… in GetAttributeUint8Array()
384 … errno_t memcpyRet = memcpy_s(retData->data, retData->len, attribute->values[attributeIndex]->data, in GetAttributeUint8Array()
385 attribute->values[attributeIndex]->len); in GetAttributeUint8Array()
390 retData->len = attribute->values[attributeIndex]->len; in GetAttributeUint8Array()
407 attribute->values[attributeIndex] = CreateUint8ArrayByData(data.data, data.len); in SetAttributeUint8Array()
422 Uint8Array uint64ArrayData = { (uint8_t *)retData->data, retData->len * sizeof(uint64_t) }; in GetAttributeUint64Array()
425 if (uint64ArrayData.len % sizeof(uint64_t) != 0) { in GetAttributeUint64Array()
426 LOG_ERROR("uint8 length %u is incorrect", uint64ArrayData.len); in GetAttributeUint64Array()
431 retData->len = uint64ArrayData.len / sizeof(uint64_t); in GetAttributeUint64Array()
440 Uint64Array *netOrderData = CreateUint64ArrayByData(data.data, data.len); in SetAttributeUint64Array()
446 if (netOrderData->len > UINT32_MAX / sizeof(uint64_t)) { in SetAttributeUint64Array()
451 (Uint8Array) { (uint8_t *)netOrderData->data, netOrderData->len * sizeof(uint64_t) }); in SetAttributeUint64Array()