• Home
  • Raw
  • Download

Lines Matching refs:buf

70     uint8_t* buf;  member
99 event->buf = (uint8_t*)calloc(event->bufSize, 1); in AStatsEvent_obtain()
101 event->buf[0] = OBJECT_TYPE; in AStatsEvent_obtain()
108 free(event->buf); in AStatsEvent_release()
126 memcpy(&event->buf[POS_TIMESTAMP + sizeof(uint8_t)], &timestampNs, sizeof(timestampNs)); in AStatsEvent_overwriteTimestamp()
149 event->buf = (uint8_t*)realloc(event->buf, event->bufSize); in overflows()
158 event->buf[event->numBytesWritten] = value; in append_byte()
169 memcpy(&event->buf[event->numBytesWritten], &value, sizeof(value)); in append_int32()
176 memcpy(&event->buf[event->numBytesWritten], &value, sizeof(value)); in append_int64()
183 memcpy(&event->buf[event->numBytesWritten], &value, sizeof(value)); in append_float()
188 static void append_byte_array(AStatsEvent* event, const uint8_t* buf, size_t size) { in append_byte_array() argument
190 memcpy(&event->buf[event->numBytesWritten], buf, size); in append_byte_array()
196 static void append_string(AStatsEvent* event, const char* buf) { in append_string() argument
197 size_t size = strnlen(buf, MAX_PULL_EVENT_PAYLOAD); in append_string()
204 append_byte_array(event, (uint8_t*)buf, size); in append_string()
233 void AStatsEvent_writeByteArray(AStatsEvent* event, const uint8_t* buf, size_t numBytes) { in AStatsEvent_writeByteArray() argument
235 if (buf == NULL) { in AStatsEvent_writeByteArray()
240 append_byte_array(event, buf, numBytes); in AStatsEvent_writeByteArray()
269 uint8_t fieldType = event->buf[event->lastFieldPos] & 0x0F; in increment_annotation_count()
270 uint32_t oldAnnotationCount = (event->buf[event->lastFieldPos] & 0xF0) >> 4; in increment_annotation_count()
278 event->buf[event->lastFieldPos] = (((uint8_t)newAnnotationCount << 4) & 0xF0) | fieldType; in increment_annotation_count()
317 return event->buf; in AStatsEvent_getBuffer()
335 event->buf[POS_ATOM_ID] = INT32_TYPE; in build_internal()
342 event->buf[POS_NUM_ELEMENTS] = event->numElements; in build_internal()
355 return write_buffer_to_statsd(event->buf, event->numBytesWritten, event->atomId); in AStatsEvent_write()