Statistics
| Branch: | Revision:

streamers / input.c @ e64fc7e5

History | View | Annotate | Download (453 Bytes)

1
#include <stdint.h>
2
#include <stdio.h>
3
#include <string.h>
4

    
5
#include <chunk.h>
6

    
7
#include "input.h"
8
#include "dbg.h"
9

    
10
void input_get(struct chunk *c)
11
{
12
  char buff[64];
13
  static int id;
14

    
15
  sprintf(buff, "Chunk %d", id);
16
  c->id = id;
17
  c->timestamp = 40 * id++;
18
  c->data = strdup(buff);
19
  c->size = strlen(c->data) + 1;
20
  c->attributes_size = 0;
21
  c->attributes = NULL;
22

    
23
  dprintf("Generate Chunk[%d] (TS: %llu): %s\n", c->id, c->timestamp, c->data);
24
}