Type Alias simics::api::base::event::EventClass

source ·
pub type EventClass = event_class_t;
Expand description

Alias for event_class_t

Aliased Type§

struct EventClass {
    pub name: *const i8,
    pub conf_class: *mut conf_class,
    pub flags: event_class_flag_t,
    pub callback: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void)>,
    pub destroy: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void)>,
    pub get_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void) -> attr_value>,
    pub set_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: attr_value) -> *mut c_void>,
    pub describe: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void) -> *mut i8>,
    pub slot: u32,
}

Fields§

§name: *const i8

identifier, unique within the conf_class (malloced)

§conf_class: *mut conf_class

conf class this event class belongs to; posting object must belong to this class.

§flags: event_class_flag_t§callback: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void)>

function called when event expires

§destroy: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void)>

function called when the event is removed without expiry. May be null. Must not access the Simics configuration in any way!

§get_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void) -> attr_value>

convert event data to an attribute value. May be null if flags has Sim_EC_Notsaved set. Event should not be saved if return value is invalid.

§set_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: attr_value) -> *mut c_void>

convert attribute value to event data. May be null if flags has Sim_EC_Notsaved set.

§describe: Option<unsafe extern "C" fn(_: *mut conf_object, _: *mut c_void) -> *mut i8>

human-readable event description. The returned string must be malloced; it will be freed by the caller.

§slot: u32

internal - absolute priority for event