diff --git a/src/sdk/example/example.cpp b/src/sdk/example/example.cpp index ad7905e35..7e372bbd8 100644 --- a/src/sdk/example/example.cpp +++ b/src/sdk/example/example.cpp @@ -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