view include/TaskManager/Task.h @ 311:b09784a9cb09

add smanager interface for test_nogl
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 08 Jun 2009 22:35:44 +0900
parents 7075842aa155
children a8fcb4431c76
line wrap: on
line source

#ifndef INCLUDED_TASK
#define INCLUDED_TASK

#include "base.h"
#include "types.h"
#include "ListData.h"

#define MAX_PARAMS 8

class Task {
public: // variables

    BASE_NEW_DELETE(Task);

    int command;         // 4 byte
    ListDataPtr inData;  // 4 byte
    ListDataPtr outData; // 4 byte
    uint32 self;         // 4 byte

    int param_size;        // 4 byte
    int param[MAX_PARAMS]; // 4*MAX_PARAMS byte

public: // functions
    int add_inData_t(unsigned int addr, int size);
    int add_outData_t(unsigned int addr, int size);
    int add_data(ListDataPtr list, unsigned int addr, int size);
    int add_param(int param);

#define add_inData(addr, size)			\
    add_inData_t((unsigned int)(addr), (size));
#define add_outData(addr, size)			\
    add_outData_t((unsigned int)(addr), (size));
};

typedef Task* TaskPtr;

#endif