Exemple #1
0
DysectAPI::DysectErrorCode Probe::notifyTriggered() {
  assert(dom != 0);

  MRN::Stream* stream = dom->getStream();

  assert(stream != 0);

  DYSECTVERBOSE(true, "Sending on stream id: %x", stream->get_Id());

  if(stream->send(dom->getProbeEnabledTag(), "%d %auc", 1, "", 1) == -1) {
    return StreamError;
  }

  if(stream->flush() == -1) {
    return StreamError;
  }

  return OK;
}
Exemple #2
0
DysectAPI::DysectErrorCode Probe::sendEnqueuedNotifications() {

  if(awaitingNotifications == 0)
    return OK;

  assert(dom != 0);

  MRN::Stream* stream = dom->getStream();

  assert(stream != 0);

  DYSECTVERBOSE(true, "Sending %d notifications on stream id: %x", awaitingNotifications, stream->get_Id());

  if(stream->send(dom->getProbeNotifyTag(), "%d %auc", awaitingNotifications, "", 1) == -1) {
    return StreamError;
  }

  if(stream->flush() == -1) {
    return StreamError;
  }

  awaitingNotifications = 0;

  return OK;

}