-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDS Port #38
base: master
Are you sure you want to change the base?
PDS Port #38
Conversation
@colton-smith is this ready for review yet or still WIP? |
@Burke-Daniel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things I need to fix here stylewise
class BoringPacket(): | ||
""" Create and pack The Boring Struct | ||
""" | ||
raise NotImplementedError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new newline EOF
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT)) | ||
print("Message sent...\n") | ||
time.sleep(1/SEND_FREQUENCY) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats going on here
timeout: timedelta - how long to poll for data on the socket before timing out | ||
""" | ||
|
||
def __init__(self, ip : str, port : int, max_buffer : int, timeout : timedelta): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this typehinting style??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple little style things we discussed on call but after that GTM!
def __str__(self): | ||
ret_str = f"""UDP Connection: | ||
\nIp: {self.ip} | ||
\nPort: {self.port} | ||
\nBuffer Size: {self.max_buffer_size} | ||
""" | ||
return ret_str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nice
con = UDPListener(VEHICLE_IP, VEHICLE_UDP_PORT, 1024, timedelta(seconds=2)) | ||
con.connect() | ||
|
||
counter = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be getting used anywhere
Brief
WIP - Porting the PDS from competition 4.
Completed So far:
UDPListener
class, a port of thePodUdpConnection
classNeed to add: