annotate Renderer/Test/init_aquarium.cc @ 1343:e4a65e0be060 draft

minor changes.
author e095732 <e095732@ie.u-ryukyu.ac.jp>
date Fri, 13 Jan 2012 03:58:49 +0900
parents 08ed5e750d78
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
867
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <stdio.h>
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include "lindaapi.h"
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include "aquarium.pb.h"
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 int main(int argc, char *argv[]) {
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 init_linda();
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 aqua::Width *width = new aqua::Width();
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 width->set_width(0); // 0 ¤Ç½é´ü²½
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 int size = width->ByteSize();
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 unsigned char *msg = (unsigned char *) malloc(sizeof(char) * size);
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 width->SerializeToArray(msg, size);
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 int linda = open_linda_java("localhost", 10000);
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 psx_out(linda, 1, msg, size);
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 psx_sync_n();
868
08ed5e750d78 [aquarium]: update screen scope on linda with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 867
diff changeset
16 delete width;
867
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 return 0;
9b25de3bb8de add init_aquarium with protobuf
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 }