Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dheadrick1618
Copy link
Member

No description provided.

…ent used with the simulated satellite system.
…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.
@dheadrick1618 dheadrick1618 requested a review from a team as a code owner August 15, 2023 18:57
…ity warning level from low to high for LEOP deployment sequence start and end logs.
closeSocket();
}

int DeployablesInterface :: openSocket(){
Copy link

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

Copy link
Member Author

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);
Copy link

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

Copy link
Member Author

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");
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants