-
Notifications
You must be signed in to change notification settings - Fork 0
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
Devin/feature/create deployables interface fprime component #20
base: main
Are you sure you want to change the base?
Devin/feature/create deployables interface fprime component #20
Conversation
…ent used with the simulated satellite system.
…Deployment topology
…ort handling. A new thread is now created upon client socket creation that constantly checks the port for readable data, and upon receving it sends it to the DeployablesService component via async input port.
…tempt deploying all deployables. Not yet tested.
…lesService and DeployablesInterface components, talking to simulated Deployables python program.
…ity warning level from low to high for LEOP deployment sequence start and end logs.
closeSocket(); | ||
} | ||
|
||
int DeployablesInterface :: openSocket(){ |
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.
If all the Components are connecting with TCP you might want to make this a common utility
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.
I am working on this now, although I am not sure how to modify the Fprime build / compile process to compile a seperate 'TCP_stuff' source file and link it , given it will not be an 'fprime' component.
timeout.tv_sec = 10; | ||
timeout.tv_usec = 0; | ||
|
||
int activity = select(client_fd + 1, &set, NULL, NULL, &timeout); |
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.
Do you expect more than one channel from the device(s)? Just surprised you're using select() here
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.
I may be mistaken with handling sockets, but I read that unix system calls are regularly blocking. Given the communication between subsystem and OBC is asynchronous I wanted to be sure the client socket on the OBC stays open non-blocking for reads.
} | ||
} | ||
} | ||
|
||
void DeployablesInterface :: closeSocket(){ | ||
close(client_fd); | ||
fprintf(stderr, "Socket closed \n"); | ||
// fprintf(stderr, "Socket closed \n"); |
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.
Hopefully all the commented out printfs are only there until you verify that logging is working?
No description provided.