コード例 #1
0

class LowPanRouteTableEntry(object):
    def __init__(self, dest_ipv6_addr, num_hops, nexthop_ipv6_addr):
        self.dest_ipv6_addr = dest_ipv6_addr
        self.num_hops = num_hops
        self.nexthop_ipv6_addr = nexthop_ipv6_addr


# Attributes
"""
The value used to configure lmin for the DIO Trickle timer.
The default value is 3.
This configuration results in Imin of 8 ms.
"""
LOWPAN_NET_RPL_DIO_INTERVAL_MIN = Attribute("rpl_dio_interval_min", type=int, isReadOnly=False)
"""
The value used to configure Imax for the DIO Trickle timer.
The default value is 20.
This configuration results in a maximum interval of 2.33 hours.
"""
LOWPAN_NET_RPL_DIO_INTERVAL_DOUBLINGS = Attribute("rpl_dio_interval_doublings", type=int, isReadOnly=False)  #:
"""
The value used to configure k for the DIO Trickle timer.
The default value is 10.
This configuration is a conservative value for Trickle suppression mechanism.
"""
LOWPAN_NET_RPL_DIO_REDUNDANCY = Attribute("rpl_dio_redundancy", type=int, isReadOnly=False)  #:
"""
Default route lifetime as a multiple of the lifetime unit.
The lifetime unit is the granularity of time used in RPL lifetime values, in seconds.
コード例 #2
0
ファイル: net.py プロジェクト: qblone/lora-wishful
__author__ = "Piotr Gawlowicz, Mikolaj Chwalisz, Zubow"
__copyright__ = "Copyright (c) 2015, Technische Universitat Berlin"
__version__ = "0.1.0"
__email__ = "{gawlowicz, chwalisz, zubow}@tkn.tu-berlin.de"


from wishful_upis.meta_models import Attribute, Measurement, Event, Action

# The protocol-specific definition of the WiSHFUL network control interface, UPI_N, for configuration/monitoring of the higher
# layers of the network protocol stack (upper MAC and higher).
# IEEE 802.11 protocol family

# ATTRIBUTES
DOT_80211_MODE = Attribute(key='DOT_80211_MODE', type=int, isReadOnly=False) #: Mode of device: STA, AP, P2P, MESH, AD-HOC
DOT_80211_STA_BLACKLIST = Attribute(key='DOT_80211_STA_BLACKLIST', type=str, isReadOnly=False) #: List of MAC addressed of blacklisted STAs
DOT_80211_STA_TX_POWER = Attribute(key='DOT_80211_STA_TX_POWER', type=int, isReadOnly=False) #: Per STA TX power


# MEASUREMENTS
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
コード例 #3
0
ファイル: radio.py プロジェクト: sensorlab/wishful_upis
__author__ = "Piotr Gawlowicz, Mikolaj Chwalisz, Zubow"
__copyright__ = "Copyright (c) 2015, Technische Universitat Berlin"
__version__ = "0.1.0"
__email__ = "{gawlowicz, chwalisz, zubow}@tkn.tu-berlin.de"

from wishful_upis.meta_models import Attribute, Measurement, Event, Action, ValueDoc
'''
    The protocol-specific definition of the WiSHFUL radio control interface,
    UPI_R, for configuration/monitoring of the
    lower layers of the network protocol stack (lower MAC and PHY).
    IEEE 802.11 protocol family
'''

# ATTRIBUTES
DOT_80211_PHY_ANI = Attribute(
    key='DOT_80211_PHY_ANI', type=int,
    isReadOnly=False)  #: Adaptive Noise Immunity (ANI)
DOT_80211_STANDARDS = Attribute(
    key='DOT_80211_STANDARDS', type=int,
    isReadOnly=False)  #: Supported 802.11 standards
DOT_80211_PHY_CHANNEL = Attribute(key='DOT_80211_PHY_CHANNEL',
                                  type=int,
                                  isReadOnly=False)  #: PHY channel
DOT_80211_PHY_RATE = Attribute(key='DOT_80211_PHY_RATE',
                               type=int,
                               isReadOnly=False)  #: Rate index value
DOT_80211_PHY_MCS = Attribute(
    key='DOT_80211_PHY_MCS', type=int,
    isReadOnly=False)  #: Modulation and Coding Scheme (MCS) index value
DOT_80211_PHY_CCA = Attribute(
    key='DOT_80211_PHY_CCA', type=int,
コード例 #4
0
ファイル: radio.py プロジェクト: qblone/lora-wishful
"""
from .lte.radio import *
from .wifi.radio import *
from .lowpan.radio import *


__author__ = "Piotr Gawlowicz, Mikolaj Chwalisz, Anatolij Zubow, Peter Ruckebusch, Domenico Garlisi"
__copyright__ = "Copyright (c) 2016, Technische Universitat Berlin, iMinds, CNIT"
__version__ = "0.1.0"
__email__ = "{gawlowicz, chwalisz, zubow}@tkn.tu-berlin.de, [email protected], [email protected]"

from wishful_upis.meta_models import Attribute, Measurement, Event, Action, ValueDoc


# ATTRIBUTES
TX_POWER = Attribute(key='TX_POWER', type=int, isReadOnly=False) #:Transmission power in dBm
TX_ANTENNA = Attribute(key='TX_ANTENNA', type=int, isReadOnly=False) #:Antenna number selected for transmission
RX_ANTENNA = Attribute(key='RX_ANTENNA', type=int, isReadOnly=False) #:Antenna number selected for reception

NETWORK_INTERFACE_HW_ADDRESS = Attribute(key='NETWORK_INTERFACE_HW_ADDRESS', type=int, isReadOnly=False) #:MAC address of wireless network interface card

TDMA_SUPER_FRAME_SIZE = Attribute(key='TDMA_SUPER_FRAME_SIZE', type=int, isReadOnly=False) #:TDMA protocol. Duration of periodic frames used for slot allocations in us
TDMA_NUMBER_OF_SYNC_SLOT = Attribute(key='TDMA_NUMBER_OF_SYNC_SLOT', type=int, isReadOnly=False) #:TDMA protocol. Number of slots included in a super frame
TDMA_ALLOCATED_SLOT = Attribute(key='TDMA_ALLOCATED_SLOT', type=int, isReadOnly=False) #:TDMA protocol. Assigned slot in a super frame
TDMA_MAC_PRIORITY_CLASS = Attribute(key='TDMA_MAC_PRIORITY_CLASS', type=int, isReadOnly=False) #:TDMA protocol. QUEUE class service associated with TDMA radio program

CSMA_BACKOFF_VALUE = Attribute(key='CSMA_BACKOFF_VALUE', type=int, isReadOnly=False) #:CSMA protocol. Backoff value
CSMA_CW = Attribute(key='CSMA_CW', type=int, isReadOnly=False) #:CSMA protocol.current value of the Contention Window
CSMA_CW_MIN = Attribute(key='CSMA_CW_MIN', type=int, isReadOnly=False) #:CSMA protocol. Minimum value of the Contention Window
CSMA_CW_MAX = Attribute(key='CSMA_CW_MAX', type=int, isReadOnly=False) #:CSMA protocol. Maximum value of the Contention Window
CSMA_TIMESLOT = Attribute(key='CSMA_TIMESLOT', type=int, isReadOnly=False) #:CSMA protocol.Duration of the backoff slot
コード例 #5
0
__author__ = "Francesco Giannone, Domenico Garlisi"
__copyright__ = "Copyright (c) 2017, Sant'Anna, CNIT"
__version__ = "0.1.0"
__email__ = "{[email protected], [email protected]}"
'''
The protocol-specific definition of the WiSHFUL network control interface, UPI_N, for configuration/monitoring of the higher
layers of the network protocol stack (upper MAC and higher).
LTE protocol family
'''

from wishful_upis.meta_models import Attribute, Measurement, Event, Action, ValueDoc

# ATTRIBUTES
MME_REALM = Attribute(key='MME_REALM', type=int, isReadOnly=False)  #:
MME_SERVED_ENB = Attribute(
    key='MME_SERVED_ENB', type=int,
    isReadOnly=False)  #: number of eNB served by the same MME
MME_SERVED_UE = Attribute(
    key='MME_SERVED_UE', type=int,
    isReadOnly=False)  #: number of UE served by the same MME
MME_TAI_LIST = Attribute(key='MME_TAI_LIST', type=int,
                         isReadOnly=False)  #: MME TAI list (TAI, MNC, MCC)
MME_GUMMEI_LIST = Attribute(
    key='MME_GUMMEI_LIST', type=int,
    isReadOnly=False)  #: MME GUMMEI LIST (MCC,MNC,MME_GID, MME_CODE)

ENB_NAME = Attribute(key='ENB_NAME', type=int,
                     isReadOnly=False)  #: name of the eNB
ENB_ID = Attribute(key='ENB_ID', type=int,
                   isReadOnly=False)  #: identification number of the eNB
ENB_CELL_TYPE = Attribute(key='ENB_CELL_TYPE', type=int,
コード例 #6
0
__author__ = "Qasim Lone"
__copyright__ = "Copyright (c) 2016, Grenoble INP, IMAG, LIG LAB"
__version__ = "0.1.0"
__email__ = "*****@*****.**"
'''LoRaWAN protocol family

The protocol-specific definition of the WiSHFUL radio control interface, UPI_R,
for configuration/monitoring of the lower layers of the network protocol stack
(lower MAC and PHY).

'''

# ATTRIBUTES

LORA_PHY_CURRENTCHANNEL = Attribute("LORA_phyCurrentChannel",
                                    type=int,
                                    isReadOnly=False)  #: LORA channel number.
LORA_TXPOWER = Attribute(
    "LORA_phyTXPower", type=int,
    isReadOnly=False)  #: The transmit power of the device.
LORA_ADR = Attribute("LORA_adrEnabled", type=bool,
                     isReadOnly=False)  #: Set the ADR on/off
LORA_CODERATE = Attribute(
    "LORA_codeRate", type=int,
    isReadOnly=False)  #: The transmit power of the device.


# Functions
def set_dr(datarate):
    """This function sets the data rate for LoRa Mote.
コード例 #7
0
__author__ = "Francesco Giannone, Domenico Garlisi"
__copyright__ = "Copyright (c) 2017, Sant'Anna, CNIT"
__version__ = "0.1.0"
__email__ = "{[email protected], [email protected]}"
'''
The protocol-specific definition of the WiSHFUL network control interface, UPI_N, for configuration/monitoring of the higher
layers of the network protocol stack (upper MAC and higher).
LTE protocol family
'''

from wishful_upis.meta_models import Attribute, Measurement, Event, Action, ValueDoc

#********
#ENB Attribute
#********
LTE_ENB_DL_BW = Attribute(key='LTE_ENB_DL_BW', type=int,
                          isReadOnly=False)  #: eNB Bandwidth DL
LTE_ENB_UL_BW = Attribute(key='LTE_ENB_UL_BW', type=int,
                          isReadOnly=False)  #: eNB bandwidth UL
LTE_ENB_DL_FREQ = Attribute(key='LTE_ENB_DL_FREQ', type=int,
                            isReadOnly=False)  #: eNB DL center frequency
LTE_ENB_UL_FREQ = Attribute(key='LTE_ENB_UL_FREQ', type=int,
                            isReadOnly=False)  #: eNB UL center frequency
LTE_ENB_FREQ_BAND = Attribute(
    key='LTE_ENB_FREQ_BAND', type=int,
    isReadOnly=False)  #: 3GPP eNB Frequency band indicator
LTE_ENB_N_TX_ANT = Attribute(key='LTE_ENB_N_TX_ANT',
                             type=int,
                             isReadOnly=False)  #: eNB Number of TX antennas
LTE_ENB_N_RX_ANT = Attribute(key='LTE_ENB_N_RX_ANT',
                             type=int,
                             isReadOnly=False)  #: eNB Number of RX antennas
コード例 #8
0
class DOT_802154E_SlotFrame(object):
    def __init__(self, slot_offset=0, num_slots=0, slot_frame=None):
        self.slot_offset = slot_offset
        self.num_slots = num_slots
        self.slot_frame = slot_frame


class DOT_802154E_SlotList(object):
    def __init__(self, num_slots, slot_list=None):
        self.num_slots = num_slots
        self.slot_list = slot_list


# ATTRIBUTES
# derived from the IEEE-802.15.4-2012 standard
DOT_802154_PHY_CURRENTCHANNEL = Attribute("IEEE802154_phyCurrentChannel", type=int, isReadOnly=False)  #: IEEE-802.15.4 channel number.
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.
コード例 #9
0
ファイル: net.py プロジェクト: qblone/lora-wishful
__author__ = "Francesco Giannone, Domenico Garlisi"
__copyright__ = "Copyright (c) 2017, Sant'Anna, CNIT"
__version__ = "0.1.0"
__email__ = "{[email protected], [email protected]}"
'''
The protocol-specific definition of the WiSHFUL network control interface, UPI_N, for configuration/monitoring of the higher
layers of the network protocol stack (upper MAC and higher).
LTE protocol family
'''

from wishful_upis.meta_models import Attribute, Measurement, Event, Action, ValueDoc

#********
#EPC Attribute
#********
LTE_EPC_MCC = Attribute(key='LTE_EPC_MCC', type=int,
                        isReadOnly=False)  #: MME Mobile Country Code
LTE_EPC_MNC = Attribute(key='LTE_EPC_MNC', type=int,
                        isReadOnly=False)  #: MME Mobile Network Code
LTE_EPC_OP = Attribute(
    key='LTE_EPC_OP', type=int,
    isReadOnly=False)  #: Configures global configuration parameters Global OP
LTE_EPC_AMF = Attribute(
    key='LTE_EPC_AMF', type=int,
    isReadOnly=False)  #: Configures global configuration parameters Global AMF
LTE_EPC_ENB_ADD = Attribute(
    key='LTE_EPC_ENB_ADD', type=int, isReadOnly=False
)  #: adds a eNB to be served by the EPC (required: IP address)
LTE_EPC_ENB_DEL = Attribute(key='LTE_EPC_ENB_DEL', type=int,
                            isReadOnly=False)  #: deletes an eNB
LTE_EPC_ENB_LIST = Attribute(key='LTE_EPC_ENB_LIST',
                             type=int,