dlt_sys/
dlt_bindings.rs

1/*
2 * Copyright (c) 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS)
3 *
4 * See the NOTICE file(s) distributed with this work for additional
5 * information regarding copyright ownership.
6 *
7 * This program and the accompanying materials are made available under the
8 * terms of the Apache License Version 2.0 which is available at
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * SPDX-License-Identifier: Apache-2.0
12 */
13
14/* automatically generated by rust-bindgen 0.72.1 */
15
16pub const DLT_ID_SIZE : u32 = 4 ; pub const DltReturnValue_DLT_RETURN_LOAD_EXCEEDED : DltReturnValue = - 9 ; pub const DltReturnValue_DLT_RETURN_FILESZERR : DltReturnValue = - 8 ; pub const DltReturnValue_DLT_RETURN_LOGGING_DISABLED : DltReturnValue = - 7 ; pub const DltReturnValue_DLT_RETURN_USER_BUFFER_FULL : DltReturnValue = - 6 ; pub const DltReturnValue_DLT_RETURN_WRONG_PARAMETER : DltReturnValue = - 5 ; pub const DltReturnValue_DLT_RETURN_BUFFER_FULL : DltReturnValue = - 4 ; pub const DltReturnValue_DLT_RETURN_PIPE_FULL : DltReturnValue = - 3 ; pub const DltReturnValue_DLT_RETURN_PIPE_ERROR : DltReturnValue = - 2 ; pub const DltReturnValue_DLT_RETURN_ERROR : DltReturnValue = - 1 ; pub const DltReturnValue_DLT_RETURN_OK : DltReturnValue = 0 ; pub const DltReturnValue_DLT_RETURN_TRUE : DltReturnValue = 1 ; pub type DltReturnValue = :: std :: os :: raw :: c_int ; pub const DltLogLevelType_DLT_LOG_DEFAULT : DltLogLevelType = - 1 ; pub const DltLogLevelType_DLT_LOG_OFF : DltLogLevelType = 0 ; pub const DltLogLevelType_DLT_LOG_FATAL : DltLogLevelType = 1 ; pub const DltLogLevelType_DLT_LOG_ERROR : DltLogLevelType = 2 ; pub const DltLogLevelType_DLT_LOG_WARN : DltLogLevelType = 3 ; pub const DltLogLevelType_DLT_LOG_INFO : DltLogLevelType = 4 ; pub const DltLogLevelType_DLT_LOG_DEBUG : DltLogLevelType = 5 ; pub const DltLogLevelType_DLT_LOG_VERBOSE : DltLogLevelType = 6 ; pub const DltLogLevelType_DLT_LOG_MAX : DltLogLevelType = 7 ; pub type DltLogLevelType = :: std :: os :: raw :: c_int ; pub const DltTraceStatusType_DLT_TRACE_STATUS_DEFAULT : DltTraceStatusType = - 1 ; pub const DltTraceStatusType_DLT_TRACE_STATUS_OFF : DltTraceStatusType = 0 ; pub const DltTraceStatusType_DLT_TRACE_STATUS_ON : DltTraceStatusType = 1 ; pub const DltTraceStatusType_DLT_TRACE_STATUS_MAX : DltTraceStatusType = 2 ; pub type DltTraceStatusType = :: std :: os :: raw :: c_int ; pub const DltTimestampType_DLT_AUTO_TIMESTAMP : DltTimestampType = 0 ; pub const DltTimestampType_DLT_USER_TIMESTAMP : DltTimestampType = 1 ; pub type DltTimestampType = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct DltContext { pub contextID : [:: std :: os :: raw :: c_char ; 4usize] , pub log_level_pos : i32 , pub log_level_ptr : * mut i8 , pub trace_status_ptr : * mut i8 , pub mcnt : u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of DltContext"] [:: std :: mem :: size_of :: < DltContext > () - 32usize] ; ["Alignment of DltContext"] [:: std :: mem :: align_of :: < DltContext > () - 8usize] ; ["Offset of field: DltContext::contextID"] [:: std :: mem :: offset_of ! (DltContext , contextID) - 0usize] ; ["Offset of field: DltContext::log_level_pos"] [:: std :: mem :: offset_of ! (DltContext , log_level_pos) - 4usize] ; ["Offset of field: DltContext::log_level_ptr"] [:: std :: mem :: offset_of ! (DltContext , log_level_ptr) - 8usize] ; ["Offset of field: DltContext::trace_status_ptr"] [:: std :: mem :: offset_of ! (DltContext , trace_status_ptr) - 16usize] ; ["Offset of field: DltContext::mcnt"] [:: std :: mem :: offset_of ! (DltContext , mcnt) - 24usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct DltContextData { pub handle : * mut DltContext , pub buffer : * mut :: std :: os :: raw :: c_uchar , pub size : i32 , pub log_level : i32 , pub trace_status : i32 , pub args_num : i32 , pub context_description : * mut :: std :: os :: raw :: c_char , pub use_timestamp : DltTimestampType , pub user_timestamp : u32 , pub verbose_mode : i8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of DltContextData"] [:: std :: mem :: size_of :: < DltContextData > () - 56usize] ; ["Alignment of DltContextData"] [:: std :: mem :: align_of :: < DltContextData > () - 8usize] ; ["Offset of field: DltContextData::handle"] [:: std :: mem :: offset_of ! (DltContextData , handle) - 0usize] ; ["Offset of field: DltContextData::buffer"] [:: std :: mem :: offset_of ! (DltContextData , buffer) - 8usize] ; ["Offset of field: DltContextData::size"] [:: std :: mem :: offset_of ! (DltContextData , size) - 16usize] ; ["Offset of field: DltContextData::log_level"] [:: std :: mem :: offset_of ! (DltContextData , log_level) - 20usize] ; ["Offset of field: DltContextData::trace_status"] [:: std :: mem :: offset_of ! (DltContextData , trace_status) - 24usize] ; ["Offset of field: DltContextData::args_num"] [:: std :: mem :: offset_of ! (DltContextData , args_num) - 28usize] ; ["Offset of field: DltContextData::context_description"] [:: std :: mem :: offset_of ! (DltContextData , context_description) - 32usize] ; ["Offset of field: DltContextData::use_timestamp"] [:: std :: mem :: offset_of ! (DltContextData , use_timestamp) - 40usize] ; ["Offset of field: DltContextData::user_timestamp"] [:: std :: mem :: offset_of ! (DltContextData , user_timestamp) - 44usize] ; ["Offset of field: DltContextData::verbose_mode"] [:: std :: mem :: offset_of ! (DltContextData , verbose_mode) - 48usize] ; } ; unsafe extern "C" { pub fn registerApplication (appId : * const :: std :: os :: raw :: c_char , appDescription : * const :: std :: os :: raw :: c_char) -> DltReturnValue ; } unsafe extern "C" { pub fn unregisterApplicationFlushBufferedLogs () -> DltReturnValue ; } unsafe extern "C" { pub fn dltFree () -> DltReturnValue ; } unsafe extern "C" { pub fn registerContext (contextId : * const :: std :: os :: raw :: c_char , contextDescription : * const :: std :: os :: raw :: c_char , context : * mut DltContext) -> DltReturnValue ; } unsafe extern "C" { pub fn unregisterContext (context : * mut DltContext) -> DltReturnValue ; } unsafe extern "C" { pub fn logDlt (context : * mut DltContext , logLevel : DltLogLevelType , message : * const :: std :: os :: raw :: c_char) -> DltReturnValue ; } unsafe extern "C" { pub fn logDltString (context : * mut DltContext , logLevel : DltLogLevelType , message : * const :: std :: os :: raw :: c_char) -> DltReturnValue ; } unsafe extern "C" { pub fn logDltUint (context : * mut DltContext , logLevel : DltLogLevelType , value : u32) -> DltReturnValue ; } unsafe extern "C" { pub fn logDltInt (context : * mut DltContext , logLevel : DltLogLevelType , value : i32) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteStart (context : * mut DltContext , log : * mut DltContextData , logLevel : DltLogLevelType) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteFinish (log : * mut DltContextData) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteString (log : * mut DltContextData , text : * const :: std :: os :: raw :: c_char) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteUint (log : * mut DltContextData , data : u32) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteInt (log : * mut DltContextData , data : i32) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteUint64 (log : * mut DltContextData , data : u64) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteInt64 (log : * mut DltContextData , data : i64) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteFloat32 (log : * mut DltContextData , data : f32) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteFloat64 (log : * mut DltContextData , data : f64) -> DltReturnValue ; } unsafe extern "C" { pub fn dltUserLogWriteBool (log : * mut DltContextData , data : u8) -> DltReturnValue ; } unsafe extern "C" { pub fn registerLogLevelChangedCallback (handle : * mut DltContext , callback : :: std :: option :: Option < unsafe extern "C" fn (context_id : * mut :: std :: os :: raw :: c_char , log_level : u8 , trace_status : u8) >) -> DltReturnValue ; }