-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_module.cpp
More file actions
40 lines (38 loc) · 1.07 KB
/
model_module.cpp
File metadata and controls
40 lines (38 loc) · 1.07 KB
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
/*
* model_module.cpp
*
* Created on: 25 dec. 2017
* Author: MisterCavespider
*/
#include "model_module.h"
//
//Module::Module()
//{
// id = -1; // invalid
// values = new BoundedValue[1]; // one value
// inputs = new uint8_t[1]; // one port
// outputs = new uint8_t[OUTPUTCONNECTIONS]; // one port, OUTPUTCONNECTIONS connections
// proto = NULL; // null pointer
//}
//
//Module::Module(ModuleProto *proto, uint8_t id)
//{
// this->proto = proto;
// this->id = id;
// values = new BoundedValue[proto->valueCount];
// inputs = new uint8_t[proto->inputCount];
// outputs = new uint8_t[proto->inputCount * OUTPUTCONNECTIONS];
//}
//
//Module::Module(ModuleProto *proto, uint8_t id, BoundedValue *values, uint8_t* inputs, uint8_t* outputs)
//{
// this->proto = proto;
// this->id = id;
// this->values = values;
// this->inputs = inputs;
// this->outputs = outputs;
//}
uint8_t Module::id() {return mId;}
BoundedValue *Module::values() {return mValues;}
uint8_t *Module::inputs() {return mInputs;}
uint8_t *Module::outputs() {return mOutputs;}