-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnode.py
More file actions
34 lines (28 loc) · 705 Bytes
/
Copy pathnode.py
File metadata and controls
34 lines (28 loc) · 705 Bytes
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
'''
Encapsulates both RX and TX
'''
class Node:
'''the parent class of RX and TX
'''
def __init__(self, x: int, y: int, indx: int):
'''
Args:
x -- x axis coordinate
y -- y axis coordinate
indx -- index
'''
self.x = x
self.y = y
self.indx = indx
class Sensor(Node):
'''encapsualte a receiver
'''
def __init__(self, x: int, y: int, indx: int):
'''init'''
super().__init__(x, y, indx)
class Transmitter(Node):
'''encapsulate a transmitter
'''
def __init__(self, x: int, y: int, indx: int, power: int):
super().__init__(x, y, indx)
self.power = power