Trace functions

Table of contents Table of contents

Detailed Description

Provides interface for user-defined trace handles on important network events

Data Structures

struct  EMBENET_TRACE_LinkLayerTelemetry
 
struct  EMBENET_NODE_TraceHandlers
 structure describing all callbacks, set to NULL to deactivate More...
 

Typedef Documentation

◆ EMBENET_TRACE_Started

typedef void(* EMBENET_TRACE_Started) (uint64_t eui)

Called immediately stack started.

Note
Called in non privileged mode.
Parameters
[in]euiof node

◆ EMBENET_TRACE_Synchronized

typedef void(* EMBENET_TRACE_Synchronized) (uint16_t panid)

Called immediately after synchronization event.

Note
Called in privileged mode.
Parameters
[in]panidof the network, node has joined to.

◆ EMBENET_TRACE_Desynchronized

typedef void(* EMBENET_TRACE_Desynchronized) (void)

Called immediately after desynchronization event.

Note
Called in privileged mode.

◆ EMBENET_TRACE_PacketNoAck

typedef void(* EMBENET_TRACE_PacketNoAck) (uint64_t linkLocalDestinationEui, uint64_t destinationEui, uint8_t attempt)

Called when transmission was not successful.

Note
Called in privileged mode.
Parameters
[in]linkLocalDestinationEui
[in]destinationEui
[in]attemptthat was made

◆ EMBENET_TRACE_ManagedPacketNoAck

typedef void(* EMBENET_TRACE_ManagedPacketNoAck) (uint64_t linkLocalDestinationEui)

Called when managed transmission was not successful.

Note
Called in privileged mode.
Parameters
[in]linkLocalDestinationEui

◆ EMBENET_TRACE_PacketNotDelivered

typedef void(* EMBENET_TRACE_PacketNotDelivered) (uint64_t linkLocalDestinationEui, uint64_t destinationEui)

Called when all transmission attempts were unsuccessful and packet was discarded.

Note
Called in privileged mode.
Parameters
[in]linkLocalDestinationEui
[in]destinationEui

◆ EMBENET_TRACE_Joined

typedef void(* EMBENET_TRACE_Joined) (uint64_t parentEui)

Called after connection to target parent is established:

  • neighbor was selected
    • autonomous cells was scheduled
    • mandatory managed cells were successfully negotiated and added
      Note
      Called in non-privileged mode.
      Parameters
      [in]parentEui

◆ EMBENET_TRACE_SyncCorrection

typedef void(* EMBENET_TRACE_SyncCorrection) (int32_t us)

Called every time node synchronizes to it's time source.

Parameters
[in]us- time correction expressed in microseconds

◆ EMBENET_TRACE_ParentSelected

typedef void(* EMBENET_TRACE_ParentSelected) (uint64_t parentEui)

Called after parent is selected as new parent.

Note
Called in non-privileged mode.
Parameters
[in]parentEui(native endianess)

◆ EMBENET_TRACE_ParentLost

typedef void(* EMBENET_TRACE_ParentLost) (uint64_t parentEui)

Called after parent is considered lost:

Note
Called in non-privileged mode.
Parameters
[in]parentEui

◆ EMBENET_TRACE_NeighborAdded

typedef void(* EMBENET_TRACE_NeighborAdded) (uint64_t neighborEui, int8_t rssi)

Called every time a new neighbor is added to node's registry.

Note
Called in non-privileged mode.
Parameters
[in]neighborEui
[in]rssiaveraged

◆ EMBENET_TRACE_NeighborRemoved

typedef void(* EMBENET_TRACE_NeighborRemoved) (uint64_t neighborEui)

Called every time a new neighbor is removed from node's registry. Neighbor may be removed due to long inactivity time or lack of space in registry.

Note
Called in non-privileged mode.
Parameters
[in]neighborEui

◆ EMBENET_TRACE_RankUpdate

typedef void(* EMBENET_TRACE_RankUpdate) (uint16_t rank)

Called every time node's rank in changed.

Note
Called in non-privileged mode.
Parameters
[in]rankvalue.

◆ EMBENET_TRACE_QueueLength

typedef void(* EMBENET_TRACE_QueueLength) (size_t length)

Called every time a packet count in packet buffer is changed.

Note
May be called in privileged mode or non-privileged mode.
Parameters
[in]length

◆ EMBENET_TRACE_EnmsStatusSent

typedef void(* EMBENET_TRACE_EnmsStatusSent) (void)

Called every time the ENSM Status Indication Packet was sent.

Note
Called in non-privileged mode.

◆ EMBENET_TRACE_RadioActivity

typedef void(* EMBENET_TRACE_RadioActivity) (bool active)

Called every time radio is toggled from sleep to active state.

Note
May be called in ISR.
Parameters
active- true if radio is turned on, otherwise false

◆ EMBENET_TRACE_SlotStart

typedef void(* EMBENET_TRACE_SlotStart) (void)

Called every time radio is toggled from sleep to active state.

Note
May be called in ISR.

◆ EMBENET_TRACE_LinkLayerEvent

typedef void(* EMBENET_TRACE_LinkLayerEvent) (const EMBENET_TRACE_LinkLayerTelemetry *linkLayerTelemetry)

Called when frame is TXed or RXed.

Note
Is called in ISR.

Enumeration Type Documentation

◆ EMBENET_TRACE_CellEvent

Enumerator
EMBENET_TRACE_CELL_EVENT_TX 
EMBENET_TRACE_CELL_EVENT_RX 

◆ EMBENET_TRACE_CellRole

Enumerator
EMBENET_TRACE_CELL_ROLE_ADV 
EMBENET_TRACE_CELL_ROLE_AUTO_UP 
EMBENET_TRACE_CELL_ROLE_AUTO_DOWN 
EMBENET_TRACE_CELL_ROLE_AUTO_UPDOWN 
EMBENET_TRACE_CELL_ROLE_AUTO_MANAGED 

◆ EMBENET_TRACE_CellType

Enumerator
EMBENET_TRACE_CELL_TYPE_TX 
EMBENET_TRACE_CELL_TYPE_RX 
EMBENET_TRACE_CELL_TYPE_TXRX 

◆ EMBENET_TRACE_FrameType

Enumerator
EMBENET_TRACE_FRAME_TYPE_BEACON 
EMBENET_TRACE_FRAME_TYPE_DATA 
EMBENET_TRACE_FRAME_TYPE_ACK 

Function Documentation

◆ EMBENET_NODE_SetTraceHandlers()

void EMBENET_NODE_SetTraceHandlers ( const EMBENET_NODE_TraceHandlers traceHandlers)

Connects trace handlers.

Parameters
traceHandlersEMBENET_NODE_TraceHandlers