fnCreateCustomDecoder

Type Alias fnCreateCustomDecoder 

Source
pub type fnCreateCustomDecoder = Option<unsafe extern "C" fn(create_flags: c_int, decoder_cfg: *const c_void, p_lib_callbacks: *const ocsd_extern_dcd_cb_fns, p_decoder_inst: *mut ocsd_extern_dcd_inst_t) -> ocsd_err_t>;
Expand description

Function to create a decoder instance

Create a decoder instance according to the create_flags parameter and the supplied decoder_cfg structure. Fill in the p_decoder_inst structure, copy the p_lib_callbacks information for use in the decoder instance.

Create flags can be:

  • OCSD_CREATE_FLG_PACKET_PROC: decoder will split the incoming trace into trace protocol packets and not further decode them. fnPktDataSinkCB likely to be in use.
  • OCSD_CREATE_FLG_FULL_DECODER: decoder will split the incoming trace into trace protocol packets and further decode them to recreate program flow or other generic trace output.

@param create_flags : Sets the decoder operating mode. @param *decoder_cfg : Hardware specific configuration for this trace element. @param *p_lib_callbacks : Library callbacks plus context pointer. @param *p_decoder_inst : Structure representing the new decoder instance being created. Filled in by create function to contain handle and call-in functions for the library.

@return ocsd_err_t : Library error code - RCDTL_OK if successful

Aliased Type§

pub enum fnCreateCustomDecoder {
    None,
    Some(unsafe extern "C" fn(i32, *const c_void, *const _ocsd_extern_dcd_cb_fns, *mut _ocsd_extern_dcd_inst) -> u32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(i32, *const c_void, *const _ocsd_extern_dcd_cb_fns, *mut _ocsd_extern_dcd_inst) -> u32)

Some value of type T.