Moved Docker stuff to "Docker" folder
Created k8s folder for k8s stuff Added early-stage service.yaml for K8s deployment
This commit is contained in:
26
Docker/src/python/tHome/eagle/parse.py
Normal file
26
Docker/src/python/tHome/eagle/parse.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#===========================================================================
|
||||
#
|
||||
# Parse XML messages into an object.
|
||||
#
|
||||
#===========================================================================
|
||||
import xml.etree.ElementTree as ET
|
||||
from . import messages
|
||||
|
||||
#==========================================================================
|
||||
|
||||
# <rainForest ...>
|
||||
# <[Message]>...</[Message]>
|
||||
# </rainForest>
|
||||
def parse( xmlText ):
|
||||
root = ET.fromstring( xmlText )
|
||||
assert( root.tag == "rainforest" )
|
||||
|
||||
child = root[0]
|
||||
|
||||
msgClass = messages.tagMap.get( child.tag, None )
|
||||
if not msgClass:
|
||||
return None
|
||||
|
||||
return msgClass( child )
|
||||
|
||||
#==========================================================================
|
||||
Reference in New Issue
Block a user