-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcalciumsensor.h
59 lines (48 loc) · 1.1 KB
/
calciumsensor.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
57
58
59
//Simple calcium conc sensor!
#ifndef CALCIUMSENSOR
#define CALCIUMSENSOR
#include "sensor.h"
//just a copy of calcium concentration!
class calciumsensor: public sensor {
protected:
// double value;
public:
calciumsensor()
{
pvalue = new double(0.0); //could be array
}
~calciumsensor() {}
int get_state_dim(void);
int get_value_dim(void);
void get_value(double*);
void integrate(double);
void connect(compstate*);
void state2double(double*);
void double2state(double*);
};
int calciumsensor::get_state_dim(void)
{
return 0;
}
int calciumsensor::get_value_dim(void)
{
return 1;
}
void calciumsensor::get_value(double* val)
{
val[0] = pcompartment_state->get_Ca();
}
void calciumsensor::integrate(double dt)
{
*pvalue = pcompartment_state->get_Ca();
}
void calciumsensor::connect(compstate* cs)
{
pcompartment_state = cs;
*pvalue = pcompartment_state->get_Ca();
}
void calciumsensor::state2double(double* st)
{ }
void calciumsensor::double2state(double* s_in)
{ }
#endif