view ppe/TitleMove.cc @ 26:6bea374ee604

global alloc test.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 10 Dec 2010 02:20:37 +0900
parents 3fb8a6a34e24
children 34fde39c0a31
line wrap: on
line source

#include <stdio.h>
#include "SchedTask.h"
#include "Property.h"
#include "Pad.h"
#include "Func.h"

/* これは必須 */
SchedDefineTask1(TitleMove, titlemove);

static int
titlemove(SchedTask *s,void *rbuf, void *wbuf)
{
  Pad* pad;
  ObjPropertyPtr i_obj, o_obj;

  i_obj = (ObjPropertyPtr)s->get_input(rbuf, 0);
  o_obj = (ObjPropertyPtr)s->get_output(wbuf, 0);
  int pad_id = (int)s->get_param(0);
  pad = (Pad*)s->global_get(pad_id);
  
  if(pad->start.isPush() || pad->start.isHold()) {
      printf("success \n");
  }
  
  s->swap();
  
  return 0;
}