DeviceEntry.h

00001 /* -*- mode:c++ -*- ********************************************************
00002  * Energy Framework for Omnet++, version 0.9
00003  *
00004  * Author:  Laura Marie Feeney
00005  *
00006  * Copyright 2009 Swedish Institute of Computer Science.
00007  *
00008  * This software is provided `as is' and without any express or implied
00009  * warranties, including, but not limited to, the implied warranties of
00010  * merchantability and fitness for a particular purpose.
00011  *
00012  ***************************************************************************/
00013 /*
00014  * per-device, per-activity energy data is shared between Battery and
00015  * BatteryStats using the DeviceEntry data structure
00016  *
00017  ***************************************************************************/
00018 
00019 #ifndef DEVICEENTRY_H
00020 #define DEVICEENTRY_H
00021 
00033 class DeviceEntry
00034   {
00035   public:
00037     opp_string  name;
00039     double  draw;
00041     int   currentActivity;
00044     int   numAccts;
00046     double  *accts;
00048     simtime_t *times;
00049 
00051     DeviceEntry() {
00052       name = NULL;
00053       draw = 0.0;
00054       numAccts = 0;
00055       currentActivity = -1;
00056       accts = NULL;
00057       times = NULL;
00058     }
00059 
00060     ~DeviceEntry() {
00061       delete []  accts;
00062       delete [] times;
00063     }
00064   };
00065 
00066 #endif
00067 
00068 //