forked from ChrisVeigl/BrainBay
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathob_counter.h
56 lines (39 loc) · 1.33 KB
/
ob_counter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* -----------------------------------------------------------------------------
BrainBay Version 1.7, GPL 2003-2010, contact: [email protected]
MODULE: OB_COUNTER.H: contains the COUNTER-Object
Author: Chris Veigl
This Object outputs a counter value at it's port and displays the value in a
seperate Window. It can count transistions of the input to or from INVALID_VALUE
or use the input direclty (without counting)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; See the
GNU General Public License for more details.
-----------------------------------------------------------------------------*/
#include "brainBay.h"
class COUNTEROBJ : public BASE_CL
{
protected:
DWORD dwRead,dwWritten;
LONGLONG period,prev_time;
public:
float input,oldinput;
HFONT font;
float countervalue;
float resetvalue;
int showcounter;
int fontsize;
int mode, integer;
int top,left,bottom,right;
char wndcaption[50];
COLORREF fontcolor,bkcolor;
COUNTEROBJ(int num);
void make_dialog(void);
void session_reset(void);
void load(HANDLE hFile);
void save(HANDLE hFile);
void incoming_data(int port, float value);
void update_inports(void);
void work(void);
~COUNTEROBJ();
};