Testing SDK

This commit is contained in:
Pedro Pinto committed 2018-08-28 13:20:56 +00:00
1 parent 526805680a
commit c97e7675fd
1 file changed
+19 -1
+19 -1
View File
@@ -4,10 +4,26 @@
#include "spark/lib/md/MDProducer.h"
#include "spark/lib/utils/PBUtils.h"
#include "spark/lib/tracing/bts_trace_c.c"
#include "spark/lib/md/cme/MDP3Utils.h"
using namespace bts;
using namespace bts::md;
void crash_test()
{
auto configuredChannels = get_configured_cme_channels();
std::cout << "crash_test\n";
for (auto &configuredChannel : configuredChannels)
{
LOG(md, Info, "configuredChannel: {}", configuredChannel.id);
for(auto &symbol : configuredChannel.symbols)
{
LOG(md, Info, " symbol: {}", symbol.to_string());
}
}
}
void produce()
{
md::MDProducer producer(co2::PLATFORM_SIM);
@@ -76,6 +92,8 @@ int main()
// this is needed before using any part of the api
utils::init_spark_lib();
crash_test();
// this is how we log, the first arg is the subsystem, md in your
// case the second is the log level: Diag, Info, Warn, Error, Fatal
// the third argument is a format string, followed by arguments