Loading...
Searching...
No Matches
opencsd_c_api.h File Reference

OpenCSD : "C" API. More...

`#include "ocsd_c_api_types.h"`
`#include "ocsd_c_api_custom.h"`
Include dependency graph for opencsd_c_api.h:

Go to the source code of this file.

## Macros

#define | OCSD_C_API

## Functions

Library Version API
OCSD_C_API uint32_t | ocsd_get_version (void)
OCSD_C_API const char * | ocsd_get_version_str (void)
Library Decode Tree API
OCSD_C_API dcd_tree_handle_t | ocsd_create_dcd_tree (const ocsd_dcd_tree_src_t src_type, const uint32_t deformatterCfgFlags)
OCSD_C_API void | ocsd_destroy_dcd_tree (const dcd_tree_handle_t handle)
OCSD_C_API ocsd_datapath_resp_t | ocsd_dt_process_data (const dcd_tree_handle_t handle, const ocsd_datapath_op_t op, const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)
OCSD_C_API ocsd_err_t | ocsd_dt_set_gen_elem_outfn (const dcd_tree_handle_t handle, FnTraceElemIn pFn, const void *p_context)
OCSD_C_API ocsd_err_t | ocsd_dt_create_decoder (const dcd_tree_handle_t handle, const char *decoder_name, const int create_flags, const void *decoder_cfg, unsigned char *pCSID)
OCSD_C_API ocsd_err_t | ocsd_dt_remove_decoder (const dcd_tree_handle_t handle, const unsigned char CSID)
OCSD_C_API ocsd_err_t | ocsd_dt_attach_packet_callback (const dcd_tree_handle_t handle, const unsigned char CSID, const ocsd_c_api_cb_types callback_type, void *p_fn_callback_data, const void *p_context)
OCSD_C_API ocsd_err_t | ocsd_dt_get_decode_stats (const dcd_tree_handle_t handle, const unsigned char CSID, ocsd_decode_stats_t **p_stats_block)
OCSD_C_API ocsd_err_t | ocsd_dt_reset_decode_stats (const dcd_tree_handle_t handle, const unsigned char CSID)
Library Memory Accessor configuration on decode tree.
Configure the memory regions available for decode. Full decode requires memory regions set up to allow access to the traced opcodes. Add memory buffers or binary file regions to a map of regions.
OCSD_C_API ocsd_err_t | ocsd_dt_add_binfile_mem_acc (const dcd_tree_handle_t handle, const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space, const char *filepath)
OCSD_C_API ocsd_err_t | ocsd_dt_add_binfile_region_mem_acc (const dcd_tree_handle_t handle, const ocsd_file_mem_region_t *region_array, const int num_regions, const ocsd_mem_space_acc_t mem_space, const char *filepath)
OCSD_C_API ocsd_err_t | ocsd_dt_add_buffer_mem_acc (const dcd_tree_handle_t handle, const ocsd_vaddr_t address, const ocsd_mem_space_acc_t mem_space, const uint8_t *p_mem_buffer, const uint32_t mem_length)
OCSD_C_API ocsd_err_t | ocsd_dt_add_callback_mem_acc (const dcd_tree_handle_t handle, const ocsd_vaddr_t st_address, const ocsd_vaddr_t en_address, const ocsd_mem_space_acc_t mem_space, Fn_MemAcc_CB p_cb_func, const void *p_context)
OCSD_C_API ocsd_err_t | ocsd_dt_add_callback_trcid_mem_acc (const dcd_tree_handle_t handle, const ocsd_vaddr_t st_address, const ocsd_vaddr_t en_address, const ocsd_mem_space_acc_t mem_space, Fn_MemAccID_CB p_cb_func, const void *p_context)
OCSD_C_API ocsd_err_t | ocsd_dt_remove_mem_acc (const dcd_tree_handle_t handle, const ocsd_vaddr_t st_address, const ocsd_mem_space_acc_t mem_space)
OCSD_C_API void | ocsd_tl_log_mapped_mem_ranges (const dcd_tree_handle_t handle)
Library Default Error Log Object API
Configure the default error logging object in the library. Objects created by the decode trees will use this error logger. Configure for desired error severity, and to enable print or logfile output.
OCSD_C_API ocsd_err_t | ocsd_def_errlog_init (const ocsd_err_severity_t verbosity, const int create_output_logger)
OCSD_C_API ocsd_err_t | ocsd_def_errlog_config_output (const int output_flags, const char *log_file_name)
OCSD_C_API ocsd_err_t | ocsd_def_errlog_set_strprint_cb (const dcd_tree_handle_t handle, void *p_context, FnDefLoggerPrintStrCB p_str_print_cb)
OCSD_C_API void | ocsd_def_errlog_msgout (const char *msg)
OCSD_C_API void | ocsd_err_str (const ocsd_err_t err, char *buffer, const int buffer_size)
OCSD_C_API ocsd_err_t | ocsd_get_last_err (ocsd_trc_index_t *index, uint8_t *chan_id, char *message, const int message_len)
Packet to string interface
OCSD_C_API ocsd_err_t | ocsd_pkt_str (const ocsd_trace_protocol_t pkt_protocol, const void *p_pkt, char *buffer, const int buffer_size)
OCSD_C_API ocsd_err_t | ocsd_gen_elem_str (const ocsd_generic_trace_elem *p_pkt, char *buffer, const int buffer_size)
OCSD_C_API void | ocsd_gen_elem_init (ocsd_generic_trace_elem *p_pkt, const ocsd_gen_trc_elem_t elem_type)
Library packet and data printer control API
Allows client to use libraries packet and data printers to log packets etc rather than attach callbacks to packet output and use packet to string calls.
OCSD_C_API ocsd_err_t | ocsd_dt_set_raw_frame_printer (const dcd_tree_handle_t handle, int flags)
OCSD_C_API ocsd_err_t | ocsd_dt_set_gen_elem_printer (const dcd_tree_handle_t handle)
OCSD_C_API ocsd_err_t | ocsd_dt_set_pkt_protocol_printer (const dcd_tree_handle_t handle, uint8_t cs_id, int monitor)
Custom Decoder API functions
OCSD_C_API ocsd_err_t | ocsd_register_custom_decoder (const char *name, ocsd_extern_dcd_fact_t *p_dcd_fact)
OCSD_C_API ocsd_err_t | ocsd_deregister_decoders (void)
OCSD_C_API ocsd_err_t | ocsd_cust_protocol_to_str (const ocsd_trace_protocol_t pkt_protocol, const void *trc_pkt, char *buffer, const int buflen)

## Detailed Description

OpenCSD : "C" API.

Copyright
  Copyright (c) 2015, ARM Limited. All Rights Reserved.

Definition in file opencsd_c_api.h.