-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
65 lines (47 loc) · 1.92 KB
/
main.cpp
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
60
61
62
63
64
65
#include <iostream>
using namespace std;
#include "schematic.h"
#include "component.h"
#include "capacitor.h"
#include "resistor.h"
#include "IC.h"
#include "inductor.h"
#include "diode.h"
#include "crystal.h"
#include "capacitor_WUERTH.h"
#include "inductor_WUERTH.h"
#include "IC_TI.h"
#include "IC_MAXIM.h"
#include "IC_AD.h"
#include "PCB.h"
#include "capacitor_WIMA.h"
#include "capacitor_WIMA_SMD_PPS.h"
#include "capacitor_VISHAY.h"
#include "crystal_EPSON.h"
#include "utils.h"
int main(){
cout << "Reliability Calculator" << endl;
cout << "\tcompiled @ " << __DATE__ << " " << __TIME__ << " using GCC " << __VERSION__ << endl << endl;
cout << "FIT for 0.5% in 6 years " << utils::FailureRate2FIT(0.5/100., 6*365*24.) << endl;
component::setAmbientTemperature(40);
schematic* example = new schematic("Example Board");
example -> addComponent(new capacitor_VISHAY("C90", capacitor_VISHAY::CLASS_1, 1*capacitor::pF, 24, 50));
example -> addComponent(new capacitor_VISHAY("C91", capacitor_VISHAY::CLASS_2, 1*capacitor::pF, 24, 50));
example -> addComponent(new capacitor_WIMA("C10", 1*capacitor::uF, 24, 50));
example -> addComponent(new capacitor_WIMA_SMD_PPS("C10", 1*capacitor::uF, 24, 50));
example -> addComponent(new crystal("Q1", 36, 25));
example -> addComponent(new crystal_EPSON("Q1", 36, 25));
/*
example -> addComponent(new IC_TI("GCU_ISO", "ISO7341CQDWQ1"));
example -> addComponent(new IC_TI("GCU_ISO", "DS30EA101"));
example -> getLastComponent() -> setDeviceTemperature(55);
example -> addComponent(new IC_MAXIM("IC2", "MAX232"));
example -> addComponent(new IC_MAXIM("IC2", "MAX485"));
example -> addComponent(new IC_AD("IC5", "ADP1765"));
*/
example -> addComponent(new PCB("PCB", 4 ,1000, PCB::MICRO_VIA , 500));
example -> setVerboseOutput(true); // enable verbose output
example -> getFIT();
schematic::printPartCount();
return 0;
}