Skip to content

Commit 4610002

Browse files
add uncommited DeviceLibrary
1 parent 1a6216a commit 4610002

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

PySpice/DeviceLibrary/__init__.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
####################################################################################################
2+
#
3+
# PySpice - A Spice Package for Python
4+
# Copyright (C) 2017 Fabrice Salvaire
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
####################################################################################################
20+
21+
####################################################################################################
22+
23+
class Manufacturer:
24+
25+
##############################################
26+
27+
def __init__(self,
28+
name,
29+
url=None,
30+
):
31+
32+
self._name = name
33+
self._url = url
34+
35+
##############################################
36+
37+
@property
38+
def name(self):
39+
return self._name
40+
41+
@name.setter
42+
def name(self, value):
43+
self._name = value
44+
45+
@property
46+
def url(self):
47+
return self._url
48+
49+
@url.setter
50+
def url(self, value):
51+
self._url = value
52+
53+
####################################################################################################
54+
55+
class Footprint:
56+
57+
##############################################
58+
59+
def __init__(self,
60+
name,
61+
):
62+
63+
self._name = name
64+
65+
##############################################
66+
67+
@property
68+
def name(self):
69+
return self._name
70+
71+
@name.setter
72+
def name(self, value):
73+
self._name = value
74+
75+
####################################################################################################
76+
77+
class Device:
78+
79+
##############################################
80+
81+
def __init__(self,
82+
name,
83+
manufacturer,
84+
datasheet_url=None,
85+
model_url=None
86+
):
87+
88+
# part
89+
# part_number
90+
# footprint
91+
# description
92+
# device_category x/y
93+
# pins
94+
# features / parameters
95+
96+
self._name = name
97+
98+
##############################################
99+
100+
@property
101+
def name(self):
102+
return self._name
103+
104+
@name.setter
105+
def name(self, value):
106+
self._name = value

0 commit comments

Comments
 (0)