DOT_80211_AP_NUMBER = Measurement(key='DOT_80211_STA_NUMBER', type=int) #: Number of APs in communication range DOT_80211_STA_NUMBER = Measurement(key='DOT_80211_STA_NUMBER', type=int) #: Number of STAs in communication range DOT_80211_SEEN_SSIDS = Measurement(key='DOT_80211_SEEN_SSIDS', type=str) #: List of SSIDs seen in communication range DOT_80211_CONNECTED_STA_NUMBER = Measurement(key='DOT_80211_CONNECTED_STA_NUMBER', type=int) #: Number of connected STAs to AP DOT_80211_STA_RSSI = Measurement(key='DOT_80211_STA_RSSI', type=str) #: Per-STA RSSI DOT_80211_STA_TX_BITRATE = Measurement(key='DOT_80211_STA_TX_BITRATE', type=str) #: Per-STA bitrate DOT_80211_STA_TX_BYTES = Measurement(key='DOT_80211_STA_TX_BYTES', type=str) #: Per-STA TX bytes DOT_80211_STA_TX_PKTS = Measurement(key='DOT_80211_STA_TX_PKTS', type=str) #: Per-STA TX packets DOT_80211_STA_RX_BYTES = Measurement(key='DOT_80211_STA_RX_BYTES', type=str) #: Per-STA RX bytes DOT_80211_STA_RX_PKTS = Measurement(key='DOT_80211_STA_RX_PKTS', type=str) #: Per-STA RX packets DOT_80211_STA_INACTIVE_TIME = Measurement(key='DOT_80211_STA_INACTIVE_TIME', type=str) #: Per-STA inactivity time DOT_80211_STA_RETRY_NUM = Measurement(key='DOT_80211_STA_RETRY_NUM', type=str) #: Per-STA TX retries number DOT_80211_STA_TX_FAILED = Measurement(key='DOT_80211_STA_TX_FAILED', type=str) #: Per-STA number of failed transmissions # EVENTS DOT_80211_PROBE_REQUEST = Event(key='DOT_80211_PROBE_REQUEST', type=None) #: Event triggered on Probe Request reception DOT_80211_STA_CONNECTED = Event(key='DOT_80211_STA_CONNECTED', type=None) #: Event triggered on STA connection to AP DOT_80211_STA_DISCONNECTED = Event(key='DOT_80211_STA_DISCONNECTED', type=None) #: Event triggered on STA disconnection from AP DOT_80211_STA_LOSS = Event(key='DOT_80211_STA_LOSS', type=None) #: Event triggered when STA lost connection with AP # ACTIONS DOT_80211_SCAN = Action(key='DOT_80211_SCAN', args_types=int, return_type=bool) #: Perform scanning DOT_80211_CONNECT = Action(key='DOT_80211_CONNECT', args_types=str, return_type=bool) #: Connect to network by SSID DOT_80211_DISCONNECT = Action(key='DOT_80211_DISCONNECT', args_types=str, return_type=bool) #: Disconnect from network # Upper MAC layer def set_hostapd_conf(iface, file_path, channel, essid): '''Set hostapd configuration, provide functionality to setting Access Point station
) #: Ratio of time that MAC spent in RX state in last sampling interval DOT_80211_MAC_STATE_ED_TIME = Measurement( key='DOT_80211_MAC_STATE_ED_TIME', type=int ) #: Time MAC spent in energy detection state in last sampling interval DOT_80211_MAC_STATE_ED_RATIO = Measurement( key='DOT_80211_MAC_STATE_ED_RATIO', type=float ) #: Ratio of time that MAC spent in energy detection state in last sampling interval DOT_80211_MAC_STA_AIR_TIME = Measurement( key='DOT_80211_MAC_STA_AIR_TIME', type=float) #: Per STA air-time statistics DOT_80211_PHY_LINK_INFO = Measurement(key='DOT_80211_PHY_LINK_INFO', type=float) #: Per STA link informations # EVENTS DOT_80211_DATA_FRAME_LOSS = Event(key='DOT_80211_DATA_FRAME_LOSS', type=None) #: Notify about data frame loss DOT_80211_CONTROL_FRAME_LOSS = Event( key='DOT_80211_CONTROL_FRAME_LOSS', type=None) #: Notify about control frame loss DOT_80211_MGMT_FRAME_LOSS = Event( key='DOT_80211_MGMT_FRAME_LOSS', type=None) #: Notify about management frame loss # ACTIONS DOT_80211_SWITCH_CHANNEL = Action( key='DOT_80211_SWITCH_CHANNEL', args_types=int, return_type=bool) #: Trigger channel switch to new channel DOT_80211_INJECT_L2_FRAME = Action( key='DOT_80211_INJECT_MGMT_FRAME', args_types=str, return_type=bool) #: Inject L2 frame in hex format DOT_80211_SNIFF_L2_FRAMES = Action(key='DOT_80211_SNIFF_L2_FRAMES',
NUM_GOOD_PREAMBLE = Measurement(key='NUM_GOOD_PREAMBLE', type=int) #:Number of preambles correctly synchronized by the receiver. NUM_BAD_PREAMBLE = Measurement(key='NUM_BAD_PREAMBLE', type=int) #:Number of receiver errors in synchronizing a valid preamble. NUM_GOOD_PLCP = Measurement(key='NUM_GOOD_PLCP', type=int) #:Number of valid PLCP synchronized by the receiver NUM_BAD_PLCP = Measurement(key='NUM_BAD_PLCP', type=int) #:Number of wrong PLCP errors triggered by the receiver NUM_GOOD_CRC = Measurement(key='NUM_GOOD_CRC', type=int) #:Number of success of CRC checks NUM_BAD_CRC = Measurement(key='NUM_BAD_CRC', type=int) #:Number of failures of CRC checks NUM_TX = Measurement(key='NUM_TX', type=int) #:Total number of transmitted frames measured since the interface has been started NUM_TX_DATA_FRAME = Measurement(key='NUM_TX_DATA_FRAME', type=int) #:Total number of transmitted frames measured since the interface has been started NUM_TX_SUCCESS = Measurement(key='NUM_TX_SUCCESS', type=int) #:Total number of successfully transmitted frame measured since the interface has been started NUM_RX = Measurement(key='NUM_RX', type=int) #:Total number of received frames since the interface has been started NUM_RX_ACK_RAMATCH = Measurement(key='NUM_RX_ACK_RAMATCH', type=int) #:Total number of received frames addressed to the node since the interface has been started. This measurement traces the number of received frame in which the receiver address field matches with the network interface card MAC address NUM_RX_ACK = Measurement(key='NUM_RX_ACK', type=int) #:Total receive ack frame measured since the interface has been started NUM_RX_SUCCESS = Measurement(key='NUM_RX_SUCCESS', type=int) #:Total number of successfully transmitted frame measured since the interface has been started # EVENTS CHANNEL_UP = Event(key='CHANNEL_UP', type=None) #:Triggered when the wireless channel switches from idle to busy CHANNEL_DOWN = Event(key='CHANNEL_DOWN', type=None) #:Triggered when the wireless channel switches from busy to idle QUEUE_OUT_UP = Event(key='QUEUE_OUT_UP', type=None) #:Triggered when the frame is injected into the physical queue of the platform from the upper MAC RX_END = Event(key='RX_END', type=None) #:Triggered when that receiver operation is finished RX_PLCP_END = Event(key='RX_PLCP_END', type=None) #:Triggered at the end of PLCP reception RX_ERROR_BAD_PLCP = Event(key='RX_ERROR_BAD_PLCP', type=None) #:Triggered at the occurrence of a receiver error due a PLCP check failure RX_ERROR_BAD_CRC = Event(key='RX_ERROR_BAD_CRC', type=None) #:Triggered at the occurrence of a receiver error due a CRC failure TDMA_SLOT_START = Event(key='TDMA_SLOT_START', type=None) #:Triggered at the beginning of a TDMA slot TDMA_SLOT_END = Event(key='TDMA_SLOT_END', type=None) #:Triggered at the end of a TDMA slot # Generic API to control the lower layers, i.e. key-value configuration. def set_parameters(param_key_values_dict): """The UPI_R interface is able to configure the radio and MAC behavior by changing parameters. Parameters correspond to the configuration registers of the hardware platform and to the variables used in
DOT_802154_PHY_TXPOWER = Attribute("IEEE802154_phyTXPower", type=int, isReadOnly=False) #: The transmit power of the device. DOT_802154_MAC_EXTENDEDADDRESS = Attribute("IEEE802154_macExtendedAddress", type=list, isReadOnly=False) #: The extended 64-bit IEEE address assigned to the device. DOT_802154_MAC_SHORTADDRESS = Attribute("IEEE802154_macShortAddress", type=int, isReadOnly=False) #: The short 16-bit address that the device uses to communicate in the PAN. DOT_802154_MAC_PANID = Attribute("IEEE802154_macPANId", type=int, isReadOnly=False) #: The 16-bit identifier of the PAN on which the device is operating. DOT_802154_MAC_CW = Attribute("IEEE802154_macCW", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154_MAC_MAX_BE = Attribute("IEEE802154_macMaxBE", type=int, isReadOnly=False) #: The maximum value of the backoff exponent, BE, in the CSMA-CA algorithm, as defined in Section 5.1.1.4. of the IEEE-802.15.4 standard. DOT_802154_MAC_MIN_BE = Attribute("IEEE802154_macMinBE", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154_MAC_MAXCSMABACKOFFS = Attribute("IEEE802154_macMaxCSMABackoffs", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154_MAC_MAXFRAMERETRIES = Attribute("IEEE802154_macMaxFrameRetries", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_HOPPINGSEQUENCELENGTH = Attribute("IEEE802154e_macHoppingSequenceLength", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_HOPPINGSEQUENCELIST = Attribute("IEEE802154e_macHoppingSequenceList", type=list, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_SLOTFRAMESIZE = Attribute("IEEE802154e_macSlotframeSize", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_TIMESLOT = Attribute("IEEE802154e_macTimeslot", type=DOT_802154E_TimeSlot, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_TSTIMESLOTLENGTH = Attribute("IEEE802154e_macTsTimeslotLength", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_SLOTLIST = Attribute("IEEE802154e_macSlotList", type=DOT_802154E_SlotList, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154E_MAC_SLOTFRAME = Attribute("IEEE802154e_macSlotFrame", type=DOT_802154E_SlotFrame, isReadOnly=False) #: IEEE-802.15.4 channel. # protocol (LPL, e.g. contiki_mac specific attributes or TAISC SPECIFIC) DOT_802154_MAC_LPL_CHANNELCHECKRATE = Attribute("IEEE802154_macLplChannelCheckRate", type=int, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154_MAC_LPL_PHASEOPTIMIZATION = Attribute("IEEE802154_macLplPhaseOptimization", type=bool, isReadOnly=False) #: IEEE-802.15.4 channel. DOT_802154_MAC_TAISC_ACTIVE_RADIO_PROGRAM = Attribute("TAISCActiveRadioProgram", type=str, isReadOnly=False) #: IEEE-802.15.4 channel. # MEASUREMENTS DOT_802154_MAC_STATISTICS = Measurement("IEEE802154_macStats", type=list) # EVENTS DOT_802154_MAC_STATISTICS_EVENT = Event("IEEE802154_macStatsEvent", type=list) def blacklist_channels(): return