DABC (Data Acquisition Backbone Core)  2.9.9
MBS API documentation

MBS plugin in DABC provides C++ based API to access MBS from user code. Two major classes are provided:

Complete API available via mbs/api.hmbs/api.h"" include file.

Simple MBS readout

#include "mbs/api.h"
int main()
{
mbs::ReadoutHandle ref = mbs::ReadoutHandle::Connect("mbs://r4-5/Stream");
if (ref.null()) return 1;
mbs::EventHeader* evnt = ref.NextEvent(1.);
if (evnt) evnt->PrintHeader();
ref.Disconnect();
return 0;
}

Example of usage such interface can be found in mbsprint.cxx

Command sending to MBS

#include "mbs/api.h"
int main()
{
mbs::MonitorHandle ref = mbs::MonitorHandle::Connect("r4-5");
if (ref.null()) return 1;
ref.MbsCmd("type event");
ref.Disconnect();
return 0;
}

Example of usage such interface can be found in mbscmd.cxx