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.misc.ipaddress import MacAddress
|
||||||
from core.xml import xmlutils
|
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:
|
try:
|
||||||
import emaneeventservice
|
import emaneeventservice
|
||||||
import emaneeventlocation
|
import emaneeventlocation
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.error("error importing emaneeventservice and emaneeventlocation")
|
logger.info("emane < 0.9.1 not found")
|
||||||
|
|
||||||
# EMANE 0.9.1+
|
|
||||||
try:
|
|
||||||
from emanesh.events import EventService
|
|
||||||
from emanesh.events import LocationEvent
|
|
||||||
except ImportError:
|
|
||||||
logger.error("error importing emanesh")
|
|
||||||
|
|
||||||
EMANE_MODELS = [
|
EMANE_MODELS = [
|
||||||
EmaneRfPipeModel,
|
EmaneRfPipeModel,
|
||||||
|
|
|
@ -14,19 +14,18 @@ from core.enumerations import NodeTypes
|
||||||
from core.enumerations import RegisterTlvs
|
from core.enumerations import RegisterTlvs
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from emanesh.events import LocationEvent
|
from emane.events import LocationEvent
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.error("error loading emanesh")
|
try:
|
||||||
|
from emanesh.events import LocationEvent
|
||||||
|
except ImportError:
|
||||||
|
logger.info("emane 0.9.1+ not found")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import emaneeventservice
|
import emaneeventservice
|
||||||
import emaneeventlocation
|
import emaneeventlocation
|
||||||
except ImportError:
|
except ImportError:
|
||||||
"""
|
logger.info("emane < 0.9.1 not found")
|
||||||
Don't require all CORE users to have EMANE libeventservice and its
|
|
||||||
Python bindings installed.
|
|
||||||
"""
|
|
||||||
logger.error("error loading emaneeventservice and emaneeventlocation")
|
|
||||||
|
|
||||||
|
|
||||||
class EmaneNet(PyCoreNet):
|
class EmaneNet(PyCoreNet):
|
||||||
|
|
Loading…
Add table
Reference in a new issue