summaryrefslogtreecommitdiff
path: root/maximus/python/lib
diff options
context:
space:
mode:
authorronciere2007-10-30 14:23:34 +0000
committerronciere2007-10-30 14:23:34 +0000
commitb3a1c46dcfdd924c34fa81551227dd04f4aa45c4 (patch)
treea14ddceb8c71bae5d3cf238759f66f2fb3397527 /maximus/python/lib
parenta6187f25ccf745b3579365140cc10e223b1c5203 (diff)
mmeScript.py update
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@912 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'maximus/python/lib')
-rw-r--r--maximus/python/lib/mmeScript.py31
1 files changed, 26 insertions, 5 deletions
diff --git a/maximus/python/lib/mmeScript.py b/maximus/python/lib/mmeScript.py
index 110de8a18b..849fc77cf3 100644
--- a/maximus/python/lib/mmeScript.py
+++ b/maximus/python/lib/mmeScript.py
@@ -11,6 +11,8 @@ import startup
import unittest
from interface import *
from maximus import *
+from maximus.mme import *
+from maximus.mme.mme import *
from mmentryMethod import *
#from mmentryFields import *
#from fidMethod import *
@@ -25,10 +27,29 @@ argc = len(sys.argv)+1
maximus.init(argc,argv)
# Create a stations.
-stationA = maximus.create_sta()
-stationA.remove()
+myStaA = maximus.create_sta()
+
# Create mmentry
-#mmentryMethod = MmentryMethod()
-#mmentryMethod.createCC_CCO_APPOINT_REQ_MMENTRY(myReqType=0, myMacAddress=0x000102030405)
-#print mmentryMethod.mmentry.CC_CCO_APPOINT_REQ \ No newline at end of file
+mmentryMethod = MmentryMethod()
+mmentryMethod.createCC_CCO_APPOINT_REQ_MMENTRY(myReqType=0, myMacAddress=0x414243444546)
+print mmentryMethod.mmentryFields.macAddress
+print mmentryMethod.mmentryFields.reqType
+print mmentryMethod.mmentry.CC_CCO_APPOINT_REQ
+
+
+mme = MME()
+myStaAAddress = 0x41617453796D
+mme.mmheader.oda=myStaAAddress
+mme.mmheader.osa=maxAddress
+mme.mmheader.vlantag=0
+mme.mmheader.mmtype=CC_CCO_APPOINT_REQ
+mme.mmheader.fmi=0
+
+print pack('Q',mme.mmheader.oda)[0:6]
+print pack('Q',mme.mmheader.osa)[0:6]
+
+mme.send()
+mme.recv()
+
+myStaA.remove() \ No newline at end of file