
{"id":12131,"date":"2024-12-26T19:38:14","date_gmt":"2024-12-26T19:38:14","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/"},"modified":"2025-03-25T05:18:32","modified_gmt":"2025-03-25T05:18:32","slug":"t2-0_common_library_apis","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/","title":{"rendered":"T2.0 Common Library APIs"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n <html><body><div class=\"contentLayout2\">\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<h2 class=\"wp-main-header wp-block-heading\">Introduction<\/h2><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<p>T2.0 Shared Library will be used by Components that wish to report Telemetry metrics. <span>This library and its APIs will allow migration away from the current mechanism for Telemetry that uses log message and grepping (via DCA) to report Component Metrics and information. <\/span><span>This library will insulate Components from needing to know the underlying BUS\/IPC used on the device; the T2 Common Library will use RBUS as its platform agnostic IPC, but can use CCSP directly in RDK-B. <\/span><\/p><p><span>NOTE:&nbsp; The DCA and grepping mechanism will continue to exist in order to support ad-hoc reporting of device\/component information.&nbsp; However, going forward, Components will be migrated to use the T2.0 Shared Library to report Telemetry data in order to reduce the need for grepping on devices. Porting all Components to use T2.0 is outside the scope of the T2.0 team, but will be accomplished via Jira tickets and working closely with Component owners once the T2.0 MVP for DCA port is complete and proven.<\/span><\/p><hr><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<h2 class=\"wp-main-header wp-block-heading\">T2 Common Library<\/h2><p>Telemetry APIs &#8211; for use by Components wishing to report metrics\/data:<\/p><p>t2_init( char* component) &ndash; init BUS\/IPC for component<\/p><p>t2_event_s(char* marker, char* value) &ndash; send marker with string value to T2<\/p><p>t2_event_f(char* marker, double value) &ndash; send marker with double value to T2<\/p><p>t2_event_d(char* marker, int value) &ndash; send marker with int value to T2<\/p><p>Usage:<\/p><ul><li>For count-based XConf markers<ul><li>t2_event_d(&ldquo;WIFI_INFO_clientdisconnect&rdquo;, 1);<\/li><\/ul><\/li><li>For string-match (_split) XConf markers:<ul><li>t2_event_s(&#8220;2GRSSI_split&#8221;, &#8220;Test_BOX_WIFI&rdquo;)<\/li><li>t2_event_d(&#8220;Total_5G_clients_split&#8221;, num_devs)<\/li><\/ul><\/li><\/ul><hr><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<h2 class=\"wp-main-header wp-block-heading\">T2 Common Library and RBUS<\/h2><p>Sequence diagram illustrating T2 Common Library usage of RBUS APIs.<\/p><p><span class=\"confluence-embedded-file-wrapper confluence-embedded-manual-size\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/16\/2025\/01\/T2-RBUS%20Integration%20Sequence.png\"><\/span><\/p><hr><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<h2 class=\"wp-main-header wp-block-heading\">RDKB: &nbsp;CcspBus API for Feed Data<\/h2><p>New APIs:<\/p><p>int CcspBaseIf_SendTelemetryDataSignal_s ( void* bus_handle, &nbsp; &nbsp;char* marker, &nbsp; &nbsp;char* value);<\/p><p>int CcspBaseIf_SendTelemetryDataSignal_d ( void* bus_handle, &nbsp; &nbsp;char* marker, &nbsp; &nbsp;int value);<\/p><p>int CcspBaseIf_SendTelemetryDataSignal_f ( void* bus_handle, &nbsp; &nbsp;char* marker, &nbsp; &nbsp;double value);<\/p><div class=\"conf-macro output-block\" data-hasbody=\"false\" data-macro-name=\"drawio\">\n\t<div class=\"drawio-macro\" data-macroid=\"199a0959-b358-4172-bda9-cd1ec75bad73\" data-buildnum=\"9012\" id=\"drawio-macro-content-199a0959-b358-4172-bda9-cd1ec75bad73\"><\/div>\n\t<div id=\"drawio-macro-data-199a0959-b358-4172-bda9-cd1ec75bad73\"><span class=\"confluence-embedded-file-wrapper confluence-embedded-manual-size\">\n\t<a class=\"lightboxcaller-image\" href=\"\/wp-content\/uploads\/sites\/16\/2025\/01\/RDKBCcspBus_API_for_Feed_Data.png\"><\/a>\n\t<img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/16\/2025\/01\/RDKBCcspBus_API_for_Feed_Data.png\">\n<\/span><\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n<div class=\"columnLayout single\" data-layout=\"single\">\n<div class=\"cell normal\" data-type=\"normal\">\n<div class=\"innerCell\">\n<p><br><\/p><\/div>\n<\/div>\n<\/div>\n<\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Introduction T2.0 Shared Library will be used by Components that wish to report Telemetry metrics. [&hellip;]<\/p>\n","protected":false},"author":597,"featured_media":0,"parent":11575,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-12131","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>T2.0 Common Library APIs - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"T2.0 Common Library APIs - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"Introduction T2.0 Shared Library will be used by Components that wish to report Telemetry metrics. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-25T05:18:32+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/\",\"name\":\"T2.0 Common Library APIs - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"datePublished\":\"2024-12-26T19:38:14+00:00\",\"dateModified\":\"2025-03-25T05:18:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Device Management\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Xconf\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Telemetry 2.0\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"T2.0 Common Library APIs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"T2.0 Common Library APIs - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/","og_locale":"en_US","og_type":"article","og_title":"T2.0 Common Library APIs - RDK Documentation Portal | Documentation","og_description":"Introduction T2.0 Shared Library will be used by Components that wish to report Telemetry metrics. [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2025-03-25T05:18:32+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/","name":"T2.0 Common Library APIs - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"datePublished":"2024-12-26T19:38:14+00:00","dateModified":"2025-03-25T05:18:32+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/t2-0_common_library_apis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"Device Management","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/"},{"@type":"ListItem","position":4,"name":"Xconf","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/"},{"@type":"ListItem","position":5,"name":"Telemetry 2.0","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/device_management\/xconf\/telemetry_2-0\/"},{"@type":"ListItem","position":6,"name":"T2.0 Common Library APIs"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/597"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=12131"}],"version-history":[{"count":2,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12131\/revisions"}],"predecessor-version":[{"id":12137,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12131\/revisions\/12137"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/11575"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=12131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}