updates to support emane 1.2.1
This commit is contained in:
parent
188f9420ca
commit
cd7fd43978
2 changed files with 16 additions and 17 deletions
|
@ -29,21 +29,21 @@ from core.misc import utils
|
|||
from core.misc.ipaddress import MacAddress
|
||||
from core.xml import xmlutils
|
||||
|
||||
_PATH = os.path.abspath(os.path.dirname(__file__))
|
||||
try:
|
||||
from emane.events import EventService
|
||||
from emane.events import LocationEvent
|
||||
except ImportError:
|
||||
try:
|
||||
from emanesh.events import EventService
|
||||
from emanesh.events import LocationEvent
|
||||
except ImportError:
|
||||
logger.info("emane 0.9.1+ not found")
|
||||
|
||||
# EMANE 0.7.4/0.8.1
|
||||
try:
|
||||
import emaneeventservice
|
||||
import emaneeventlocation
|
||||
except ImportError:
|
||||
logger.error("error importing emaneeventservice and emaneeventlocation")
|
||||
|
||||
# EMANE 0.9.1+
|
||||
try:
|
||||
from emanesh.events import EventService
|
||||
from emanesh.events import LocationEvent
|
||||
except ImportError:
|
||||
logger.error("error importing emanesh")
|
||||
logger.info("emane < 0.9.1 not found")
|
||||
|
||||
EMANE_MODELS = [
|
||||
EmaneRfPipeModel,
|
||||
|
|
|
@ -14,19 +14,18 @@ from core.enumerations import NodeTypes
|
|||
from core.enumerations import RegisterTlvs
|
||||
|
||||
try:
|
||||
from emanesh.events import LocationEvent
|
||||
from emane.events import LocationEvent
|
||||
except ImportError:
|
||||
logger.error("error loading emanesh")
|
||||
try:
|
||||
from emanesh.events import LocationEvent
|
||||
except ImportError:
|
||||
logger.info("emane 0.9.1+ not found")
|
||||
|
||||
try:
|
||||
import emaneeventservice
|
||||
import emaneeventlocation
|
||||
except ImportError:
|
||||
"""
|
||||
Don't require all CORE users to have EMANE libeventservice and its
|
||||
Python bindings installed.
|
||||
"""
|
||||
logger.error("error loading emaneeventservice and emaneeventlocation")
|
||||
logger.info("emane < 0.9.1 not found")
|
||||
|
||||
|
||||
class EmaneNet(PyCoreNet):
|
||||
|
|
Loading…
Reference in a new issue