]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/arm-ds5-gator.git/blob - daemon/Collector.h
gator: Prevent BUG() when no device-tree cpu nodes present.
[android-sdk/arm-ds5-gator.git] / daemon / Collector.h
1 /**
2  * Copyright (C) ARM Limited 2010-2013. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
9 #ifndef __COLLECTOR_H__
10 #define __COLLECTOR_H__
12 #include <stdio.h>
14 class Collector {
15 public:
16         Collector();
17         ~Collector();
18         void start();
19         void stop();
20         int collect(char* buffer);
21         int getBufferSize() {return mBufferSize;}
23         static int readIntDriver(const char* path, int* value);
24         static int readInt64Driver(const char* path, int64_t* value);
25         static int writeDriver(const char* path, int value);
26         static int writeDriver(const char* path, int64_t value);
27         static int writeDriver(const char* path, const char* data);
28         static int writeReadDriver(const char* path, int* value);
29         static int writeReadDriver(const char* path, int64_t* value);
31 private:
32         int mBufferSize;
33         int mBufferFD;
35         void checkVersion();
36 };
38 #endif  //__COLLECTOR_H__