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

why send Hermes::BoardAvailableData() by downstream or send MachineReadyData by upstream,it will close... #3

Open
williamXDB opened this issue Jul 26, 2021 · 1 comment

Comments

@williamXDB
Copy link

Dear author,
why send Hermes::BoardAvailableData() by downstream or send MachineReadyData by upstream,it will close the connected?

@williamXDB
Copy link
Author

williamXDB commented Jul 26, 2021

void boardAvailable_data(void* ptrstream, void* ptrsink)
{
assert(ptrstream != nullptr);
assert(ptrsink != nullptr);
auto streamptr = (Hermes::Downstream*)ptrstream;
auto sinkptr = (Hermes::DownstreamSink*)ptrsink;
auto avd = Hermes::BoardAvailableData();
std::ostringstream oss;
oss << avd;
std::cout << oss.str();
streamptr->Signal(sinkptr->m_sessionId, avd);
}

void bachine_ready_data(void* ptrstream, void* ptrsink)
{
assert(ptrstream != nullptr);
assert(ptrsink != nullptr);
auto streamptr = (Hermes::Upstream*)ptrstream;
auto sinkptr = (Hermes::UpstreamSink*)ptrsink;
streamptr->Signal(sinkptr->m_sessionId, Hermes::MachineReadyData());
}

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

No branches or pull requests

1 participant