typedef void (*ieee_802_15_4_probe_snoop_t)( lang_void *user_data, conf_object_t *probe, ieee_802_15_4_probe_side_t to_side, const frags_t *frame, uint32 rssi, uint16 channel_page, uint16 channel_number, ieee_802_15_4_frame_crc_status_t crc_status);
IEEE_802_15_4_Probe_Port_A
means that the frame is
from device to link.IEEE_802_15_4_Probe_Port_B
means that the frame is
from link to device.typedef enum { IEEE_802_15_4_Probe_Port_A = 0, IEEE_802_15_4_Probe_Port_B = 1 } ieee_802_15_4_probe_side_t;
SIM_INTERFACE(ieee_802_15_4_probe) { void (*attach_snooper)(conf_object_t *NOTNULL probe, ieee_802_15_4_probe_snoop_t snoop_fun, lang_void *user_data); void (*detach)(conf_object_t *NOTNULL probe); }; #define IEEE_802_15_4_PROBE_INTERFACE "ieee_802_15_4_probe"
The ieee_802_15_4_probe
interface is implemented by the
IEEE 802.15.4 probe devices that provide an interface for Simics users to
register their own callback to listen to the traffic going-on in the probe.
The attach_snooper attaches a snooper function. The probe will
pass each frame to the snooper function, then forward it unchanged where it
should be going.
The detach detaches the currently registered callback from
the probe.
This interface should only be used for inspection, and never as part of the actual simulation. The snoop functions must not affect the simulation in any way. The user_data parameter is passed to the snoop function every time it is called.