mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
whitespace
This commit is contained in:
parent
2f227d6ae1
commit
c79433f59b
329 changed files with 2181 additions and 2190 deletions
|
@ -21,7 +21,7 @@ Install
|
||||||
Requirements
|
Requirements
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
- Python 2.7 or later
|
- Python 2.7 or later
|
||||||
- pip install numpy shapely
|
- pip install numpy shapely
|
||||||
|
|
||||||
From Github
|
From Github
|
||||||
|
@ -57,7 +57,7 @@ A short script to request available grid names from an EDEX server::
|
||||||
# Init data request
|
# Init data request
|
||||||
request = DataAccessLayer.newDataRequest()
|
request = DataAccessLayer.newDataRequest()
|
||||||
|
|
||||||
# Set datatype
|
# Set datatype
|
||||||
request.setDatatype("grid")
|
request.setDatatype("grid")
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -65,7 +65,7 @@ A short script to request available grid names from an EDEX server::
|
||||||
#
|
#
|
||||||
# LocationNames mean different things to different plugins beware...radar is icao,
|
# LocationNames mean different things to different plugins beware...radar is icao,
|
||||||
# satellite is sector, etc
|
# satellite is sector, etc
|
||||||
#
|
#
|
||||||
available_grids = DataAccessLayer.getAvailableLocationNames(request)
|
available_grids = DataAccessLayer.getAvailableLocationNames(request)
|
||||||
for grid in available_grids:
|
for grid in available_grids:
|
||||||
print grid
|
print grid
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -23,31 +23,30 @@
|
||||||
# Pure python logging mechanism for logging to AlertViz from
|
# Pure python logging mechanism for logging to AlertViz from
|
||||||
# pure python (ie not JEP). DO NOT USE IN PYTHON CALLED
|
# pure python (ie not JEP). DO NOT USE IN PYTHON CALLED
|
||||||
# FROM JAVA.
|
# FROM JAVA.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/18/10 njensen Initial Creation.
|
# 08/18/10 njensen Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import NotificationMessage
|
import NotificationMessage
|
||||||
|
|
||||||
class AlertVizHandler(logging.Handler):
|
class AlertVizHandler(logging.Handler):
|
||||||
|
|
||||||
def __init__(self, host='localhost', port=61999, category='LOCAL', source='ANNOUNCER', level=logging.NOTSET):
|
def __init__(self, host='localhost', port=61999, category='LOCAL', source='ANNOUNCER', level=logging.NOTSET):
|
||||||
logging.Handler.__init__(self, level)
|
logging.Handler.__init__(self, level)
|
||||||
self._category = category
|
self._category = category
|
||||||
self._host = host
|
self._host = host
|
||||||
self._port = port
|
self._port = port
|
||||||
self._source = source
|
self._source = source
|
||||||
|
|
||||||
|
def emit(self, record):
|
||||||
def emit(self, record):
|
|
||||||
"Implements logging.Handler's interface. Record argument is a logging.LogRecord."
|
"Implements logging.Handler's interface. Record argument is a logging.LogRecord."
|
||||||
priority = None
|
priority = None
|
||||||
if record.levelno >= 50:
|
if record.levelno >= 50:
|
||||||
|
@ -62,9 +61,9 @@ class AlertVizHandler(logging.Handler):
|
||||||
priority = 'EVENTB'
|
priority = 'EVENTB'
|
||||||
else:
|
else:
|
||||||
priority = 'VERBOSE'
|
priority = 'VERBOSE'
|
||||||
|
|
||||||
msg = self.format(record)
|
msg = self.format(record)
|
||||||
|
|
||||||
notify = NotificationMessage.NotificationMessage(self._host, self._port, msg, priority, self._category, self._source)
|
notify = NotificationMessage.NotificationMessage(self._host, self._port, msg, priority, self._category, self._source)
|
||||||
notify.send()
|
notify.send()
|
||||||
|
|
||||||
|
|
|
@ -1,41 +1,40 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
# A set of utility functions for dealing with configuration files.
|
# A set of utility functions for dealing with configuration files.
|
||||||
#
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/27/10 dgilling Initial Creation.
|
# 09/27/10 dgilling Initial Creation.
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
def parseKeyValueFile(fileName):
|
def parseKeyValueFile(fileName):
|
||||||
propDict= dict()
|
propDict= dict()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
propFile= open(fileName, "rU")
|
propFile= open(fileName, "rU")
|
||||||
for propLine in propFile:
|
for propLine in propFile:
|
||||||
|
@ -53,4 +52,4 @@ def parseKeyValueFile(fileName):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return propDict
|
return propDict
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
|
@ -26,19 +26,19 @@ import socket
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
import ThriftClient
|
import ThriftClient
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.alertviz import AlertVizRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.alertviz import AlertVizRequest
|
||||||
from dynamicserialize import DynamicSerializationManager
|
from dynamicserialize import DynamicSerializationManager
|
||||||
|
|
||||||
#
|
#
|
||||||
# Provides a capability of constructing notification messages and sending
|
# Provides a capability of constructing notification messages and sending
|
||||||
# them to a STOMP data source.
|
# them to a STOMP data source.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/30/08 chammack Initial Creation.
|
# 09/30/08 chammack Initial Creation.
|
||||||
|
@ -49,8 +49,8 @@ from dynamicserialize import DynamicSerializationManager
|
||||||
# value
|
# value
|
||||||
#
|
#
|
||||||
class NotificationMessage:
|
class NotificationMessage:
|
||||||
|
|
||||||
priorityMap = {
|
priorityMap = {
|
||||||
0: 'CRITICAL',
|
0: 'CRITICAL',
|
||||||
1: 'SIGNIFICANT',
|
1: 'SIGNIFICANT',
|
||||||
2: 'PROBLEM',
|
2: 'PROBLEM',
|
||||||
|
@ -64,7 +64,7 @@ class NotificationMessage:
|
||||||
self.message = message
|
self.message = message
|
||||||
self.audioFile = audioFile
|
self.audioFile = audioFile
|
||||||
self.source = source
|
self.source = source
|
||||||
self.category = category
|
self.category = category
|
||||||
|
|
||||||
priorityInt = None
|
priorityInt = None
|
||||||
|
|
||||||
|
@ -86,12 +86,12 @@ class NotificationMessage:
|
||||||
elif priority == 'EVENTB':
|
elif priority == 'EVENTB':
|
||||||
priorityInt = int(4)
|
priorityInt = int(4)
|
||||||
elif priority == 'VERBOSE' or priority == 'DEBUG':
|
elif priority == 'VERBOSE' or priority == 'DEBUG':
|
||||||
priorityInt = int(5)
|
priorityInt = int(5)
|
||||||
|
|
||||||
if (priorityInt < 0 or priorityInt > 5):
|
if (priorityInt < 0 or priorityInt > 5):
|
||||||
print "Error occurred, supplied an invalid Priority value: " + str(priorityInt)
|
print "Error occurred, supplied an invalid Priority value: " + str(priorityInt)
|
||||||
print "Priority values are 0, 1, 2, 3, 4 and 5."
|
print "Priority values are 0, 1, 2, 3, 4 and 5."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if priorityInt is not None:
|
if priorityInt is not None:
|
||||||
self.priority = self.priorityMap[priorityInt]
|
self.priority = self.priorityMap[priorityInt]
|
||||||
|
@ -110,7 +110,7 @@ class NotificationMessage:
|
||||||
|
|
||||||
def send(self):
|
def send(self):
|
||||||
# depending on the value of the port number indicates the distribution
|
# depending on the value of the port number indicates the distribution
|
||||||
# of the message to AlertViz
|
# of the message to AlertViz
|
||||||
# 9581 is global distribution thru ThriftClient to Edex
|
# 9581 is global distribution thru ThriftClient to Edex
|
||||||
# 61999 is local distribution
|
# 61999 is local distribution
|
||||||
if (self.port == 61999):
|
if (self.port == 61999):
|
||||||
|
@ -136,7 +136,7 @@ class NotificationMessage:
|
||||||
msg.text = self.message
|
msg.text = self.message
|
||||||
details = ET.SubElement(sm, "details")
|
details = ET.SubElement(sm, "details")
|
||||||
msg = ET.tostring(sm, "UTF-8")
|
msg = ET.tostring(sm, "UTF-8")
|
||||||
|
|
||||||
try :
|
try :
|
||||||
conn.send(msg, destination='/queue/messages')
|
conn.send(msg, destination='/queue/messages')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
@ -146,33 +146,33 @@ class NotificationMessage:
|
||||||
# use ThriftClient
|
# use ThriftClient
|
||||||
alertVizRequest = createRequest(self.message, self.priority, self.source, self.category, self.audioFile)
|
alertVizRequest = createRequest(self.message, self.priority, self.source, self.category, self.audioFile)
|
||||||
thriftClient = ThriftClient.ThriftClient(self.host, self.port, "/services")
|
thriftClient = ThriftClient.ThriftClient(self.host, self.port, "/services")
|
||||||
|
|
||||||
serverResponse = None
|
serverResponse = None
|
||||||
try:
|
try:
|
||||||
serverResponse = thriftClient.sendRequest(alertVizRequest)
|
serverResponse = thriftClient.sendRequest(alertVizRequest)
|
||||||
except Exception, ex:
|
except Exception, ex:
|
||||||
print "Caught exception submitting AlertVizRequest: ", str(ex)
|
print "Caught exception submitting AlertVizRequest: ", str(ex)
|
||||||
|
|
||||||
if (serverResponse != "None"):
|
if (serverResponse != "None"):
|
||||||
print "Error occurred submitting Notification Message to AlertViz receiver: ", serverResponse
|
print "Error occurred submitting Notification Message to AlertViz receiver: ", serverResponse
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print "Response: " + str(serverResponse)
|
print "Response: " + str(serverResponse)
|
||||||
|
|
||||||
def createRequest(message, priority, source, category, audioFile):
|
def createRequest(message, priority, source, category, audioFile):
|
||||||
obj = AlertVizRequest()
|
obj = AlertVizRequest()
|
||||||
|
|
||||||
obj.setMachine(socket.gethostname())
|
obj.setMachine(socket.gethostname())
|
||||||
obj.setPriority(priority)
|
obj.setPriority(priority)
|
||||||
obj.setCategory(category)
|
obj.setCategory(category)
|
||||||
obj.setSourceKey(source)
|
obj.setSourceKey(source)
|
||||||
obj.setMessage(message)
|
obj.setMessage(message)
|
||||||
if (audioFile is not None):
|
if (audioFile is not None):
|
||||||
obj.setAudioFile(audioFile)
|
obj.setAudioFile(audioFile)
|
||||||
else:
|
else:
|
||||||
obj.setAudioFile('\0')
|
obj.setAudioFile('\0')
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
# Provides a Python-based interface for subscribing to qpid queues and topics.
|
# Provides a Python-based interface for subscribing to qpid queues and topics.
|
||||||
#
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 11/17/10 njensen Initial Creation.
|
# 11/17/10 njensen Initial Creation.
|
||||||
# 08/15/13 2169 bkowal Optionally gzip decompress any data that is read.
|
# 08/15/13 2169 bkowal Optionally gzip decompress any data that is read.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import qpid
|
import qpid
|
||||||
|
@ -39,7 +39,7 @@ from Queue import Empty
|
||||||
from qpid.exceptions import Closed
|
from qpid.exceptions import Closed
|
||||||
|
|
||||||
class QpidSubscriber:
|
class QpidSubscriber:
|
||||||
|
|
||||||
def __init__(self, host='127.0.0.1', port=5672, decompress=False):
|
def __init__(self, host='127.0.0.1', port=5672, decompress=False):
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
|
@ -49,26 +49,26 @@ class QpidSubscriber:
|
||||||
self.__connection.start()
|
self.__connection.start()
|
||||||
self.__session = self.__connection.session(str(qpid.datatypes.uuid4()))
|
self.__session = self.__connection.session(str(qpid.datatypes.uuid4()))
|
||||||
self.subscribed = True
|
self.subscribed = True
|
||||||
|
|
||||||
def topicSubscribe(self, topicName, callback):
|
def topicSubscribe(self, topicName, callback):
|
||||||
# if the queue is edex.alerts, set decompress to true always for now to
|
# if the queue is edex.alerts, set decompress to true always for now to
|
||||||
# maintain compatibility with existing python scripts.
|
# maintain compatibility with existing python scripts.
|
||||||
if (topicName == 'edex.alerts'):
|
if (topicName == 'edex.alerts'):
|
||||||
self.decompress = True
|
self.decompress = True
|
||||||
|
|
||||||
print "Establishing connection to broker on", self.host
|
print "Establishing connection to broker on", self.host
|
||||||
queueName = topicName + self.__session.name
|
queueName = topicName + self.__session.name
|
||||||
self.__session.queue_declare(queue=queueName, exclusive=True, auto_delete=True, arguments={'qpid.max_count':100, 'qpid.policy_type':'ring'})
|
self.__session.queue_declare(queue=queueName, exclusive=True, auto_delete=True, arguments={'qpid.max_count':100, 'qpid.policy_type':'ring'})
|
||||||
self.__session.exchange_bind(exchange='amq.topic', queue=queueName, binding_key=topicName)
|
self.__session.exchange_bind(exchange='amq.topic', queue=queueName, binding_key=topicName)
|
||||||
self.__innerSubscribe(queueName, callback)
|
self.__innerSubscribe(queueName, callback)
|
||||||
|
|
||||||
def __innerSubscribe(self, serverQueueName, callback):
|
def __innerSubscribe(self, serverQueueName, callback):
|
||||||
local_queue_name = 'local_queue_' + serverQueueName
|
local_queue_name = 'local_queue_' + serverQueueName
|
||||||
queue = self.__session.incoming(local_queue_name)
|
queue = self.__session.incoming(local_queue_name)
|
||||||
self.__session.message_subscribe(serverQueueName, destination=local_queue_name)
|
self.__session.message_subscribe(serverQueueName, destination=local_queue_name)
|
||||||
queue.start()
|
queue.start()
|
||||||
print "Connection complete to broker on", self.host
|
print "Connection complete to broker on", self.host
|
||||||
|
|
||||||
while self.subscribed:
|
while self.subscribed:
|
||||||
try:
|
try:
|
||||||
message = queue.get(timeout=10)
|
message = queue.get(timeout=10)
|
||||||
|
@ -82,7 +82,7 @@ class QpidSubscriber:
|
||||||
content = d.decompress(content)
|
content = d.decompress(content)
|
||||||
except:
|
except:
|
||||||
# decompression failed, return the original content
|
# decompression failed, return the original content
|
||||||
pass
|
pass
|
||||||
callback(content)
|
callback(content)
|
||||||
except Empty:
|
except Empty:
|
||||||
pass
|
pass
|
||||||
|
@ -95,6 +95,3 @@ class QpidSubscriber:
|
||||||
self.__session.close(timeout=10)
|
self.__session.close(timeout=10)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
#
|
#
|
||||||
# Common methods for the a2gtrad and a2advrad scripts.
|
# Common methods for the a2gtrad and a2advrad scripts.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/13/2014 3393 nabowle Initial creation to contain common
|
# 08/13/2014 3393 nabowle Initial creation to contain common
|
||||||
|
@ -91,7 +91,7 @@ def get_header(record, format, xLen, yLen, azdat, description):
|
||||||
msg = str(xLen) + " " + str(yLen) + " " + mytime + " " + \
|
msg = str(xLen) + " " + str(yLen) + " " + mytime + " " + \
|
||||||
dattyp + " " + description + " " + \
|
dattyp + " " + description + " " + \
|
||||||
str(record.getTrueElevationAngle()) + " " + \
|
str(record.getTrueElevationAngle()) + " " + \
|
||||||
str(record.getVolumeCoveragePattern()) + "\n"
|
str(record.getVolumeCoveragePattern()) + "\n"
|
||||||
|
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -25,29 +25,28 @@ from dynamicserialize.dstypes.com.raytheon.uf.common.serialization import Serial
|
||||||
|
|
||||||
#
|
#
|
||||||
# Provides a Python-based interface for executing Thrift requests.
|
# Provides a Python-based interface for executing Thrift requests.
|
||||||
#
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/20/10 dgilling Initial Creation.
|
# 09/20/10 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
class ThriftClient:
|
class ThriftClient:
|
||||||
|
|
||||||
# How to call this constructor:
|
# How to call this constructor:
|
||||||
# 1. Pass in all arguments separately (e.g.,
|
# 1. Pass in all arguments separately (e.g.,
|
||||||
# ThriftClient.ThriftClient("localhost", 9581, "/services"))
|
# ThriftClient.ThriftClient("localhost", 9581, "/services"))
|
||||||
# will return a Thrift client pointed at http://localhost:9581/services.
|
# will return a Thrift client pointed at http://localhost:9581/services.
|
||||||
# 2. Pass in all arguments through the host string (e.g.,
|
# 2. Pass in all arguments through the host string (e.g.,
|
||||||
# ThriftClient.ThriftClient("localhost:9581/services"))
|
# ThriftClient.ThriftClient("localhost:9581/services"))
|
||||||
# will return a Thrift client pointed at http://localhost:9581/services.
|
# will return a Thrift client pointed at http://localhost:9581/services.
|
||||||
# 3. Pass in host/port arguments through the host string (e.g.,
|
# 3. Pass in host/port arguments through the host string (e.g.,
|
||||||
# ThriftClient.ThriftClient("localhost:9581", "/services"))
|
# ThriftClient.ThriftClient("localhost:9581", "/services"))
|
||||||
# will return a Thrift client pointed at http://localhost:9581/services.
|
# will return a Thrift client pointed at http://localhost:9581/services.
|
||||||
def __init__(self, host, port=9581, uri="/services"):
|
def __init__(self, host, port=9581, uri="/services"):
|
||||||
|
@ -61,42 +60,42 @@ class ThriftClient:
|
||||||
self.__httpConn = httplib.HTTPConnection(host)
|
self.__httpConn = httplib.HTTPConnection(host)
|
||||||
else:
|
else:
|
||||||
self.__httpConn = httplib.HTTPConnection(host, port)
|
self.__httpConn = httplib.HTTPConnection(host, port)
|
||||||
|
|
||||||
self.__uri = uri
|
self.__uri = uri
|
||||||
|
|
||||||
self.__dsm = DynamicSerializationManager.DynamicSerializationManager()
|
self.__dsm = DynamicSerializationManager.DynamicSerializationManager()
|
||||||
|
|
||||||
def sendRequest(self, request, uri="/thrift"):
|
def sendRequest(self, request, uri="/thrift"):
|
||||||
message = self.__dsm.serializeObject(request)
|
message = self.__dsm.serializeObject(request)
|
||||||
|
|
||||||
self.__httpConn.connect()
|
self.__httpConn.connect()
|
||||||
self.__httpConn.request("POST", self.__uri + uri, message)
|
self.__httpConn.request("POST", self.__uri + uri, message)
|
||||||
|
|
||||||
response = self.__httpConn.getresponse()
|
response = self.__httpConn.getresponse()
|
||||||
if (response.status != 200):
|
if (response.status != 200):
|
||||||
raise ThriftRequestException("Unable to post request to server")
|
raise ThriftRequestException("Unable to post request to server")
|
||||||
|
|
||||||
rval = self.__dsm.deserializeBytes(response.read())
|
rval = self.__dsm.deserializeBytes(response.read())
|
||||||
self.__httpConn.close()
|
self.__httpConn.close()
|
||||||
|
|
||||||
# let's verify we have an instance of ServerErrorResponse
|
# let's verify we have an instance of ServerErrorResponse
|
||||||
# IF we do, through an exception up to the caller along
|
# IF we do, through an exception up to the caller along
|
||||||
# with the original Java stack trace
|
# with the original Java stack trace
|
||||||
# ELSE: we have a valid response and pass it back
|
# ELSE: we have a valid response and pass it back
|
||||||
try:
|
try:
|
||||||
forceError = rval.getException()
|
forceError = rval.getException()
|
||||||
raise ThriftRequestException(forceError)
|
raise ThriftRequestException(forceError)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return rval
|
return rval
|
||||||
|
|
||||||
|
|
||||||
class ThriftRequestException(Exception):
|
class ThriftRequestException(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
self.parameter = value
|
self.parameter = value
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self.parameter)
|
return repr(self.parameter)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -39,7 +39,7 @@ import time
|
||||||
# negative for time in the past.
|
# negative for time in the past.
|
||||||
#
|
#
|
||||||
# May still want it to be normalized to the most recent midnight.
|
# May still want it to be normalized to the most recent midnight.
|
||||||
#
|
#
|
||||||
# NOTES about synchronizing:
|
# NOTES about synchronizing:
|
||||||
# --With synchronizing on, the "current time" for all processes started
|
# --With synchronizing on, the "current time" for all processes started
|
||||||
# within a given hour will be the same.
|
# within a given hour will be the same.
|
||||||
|
@ -52,7 +52,7 @@ import time
|
||||||
# For example, if someone starts the GFE at 12:59 and someone
|
# For example, if someone starts the GFE at 12:59 and someone
|
||||||
# else starts it at 1:01, they will have different offsets and
|
# else starts it at 1:01, they will have different offsets and
|
||||||
# current times.
|
# current times.
|
||||||
# --With synchronizing off, when the process starts, the current time
|
# --With synchronizing off, when the process starts, the current time
|
||||||
# matches the drtTime in the command line. However, with synchronizing
|
# matches the drtTime in the command line. However, with synchronizing
|
||||||
# on, the current time will be offset by the fraction of the hour at
|
# on, the current time will be offset by the fraction of the hour at
|
||||||
# which the process was started. Examples:
|
# which the process was started. Examples:
|
||||||
|
@ -81,7 +81,7 @@ def determineDrtOffset(timeStr):
|
||||||
#print "input", year, month, day, hour, minute
|
#print "input", year, month, day, hour, minute
|
||||||
gm = time.gmtime()
|
gm = time.gmtime()
|
||||||
cur_t = time.mktime(gm)
|
cur_t = time.mktime(gm)
|
||||||
|
|
||||||
# Synchronize to most recent hour
|
# Synchronize to most recent hour
|
||||||
# i.e. "truncate" cur_t to most recent hour.
|
# i.e. "truncate" cur_t to most recent hour.
|
||||||
#print "gmtime", gm
|
#print "gmtime", gm
|
||||||
|
@ -90,9 +90,9 @@ def determineDrtOffset(timeStr):
|
||||||
curStr = '%4s%2s%2s_%2s00\n' % (`gm[0]`,`gm[1]`,`gm[2]`,`gm[3]`)
|
curStr = '%4s%2s%2s_%2s00\n' % (`gm[0]`,`gm[1]`,`gm[2]`,`gm[3]`)
|
||||||
curStr = curStr.replace(' ','0')
|
curStr = curStr.replace(' ','0')
|
||||||
launchStr = timeStr + "," + curStr
|
launchStr = timeStr + "," + curStr
|
||||||
|
|
||||||
#print "drt, cur", drt_t, cur_t
|
#print "drt, cur", drt_t, cur_t
|
||||||
offset = drt_t - cur_t
|
offset = drt_t - cur_t
|
||||||
#print "offset", offset, offset/3600, launchStr
|
#print "offset", offset, offset/3600, launchStr
|
||||||
return int(offset), launchStr
|
return int(offset), launchStr
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,17 +21,17 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# __init__.py for awips package
|
# __init__.py for awips package
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/21/10 dgilling Initial Creation.
|
# 09/21/10 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# #
|
# #
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
# #
|
# #
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Published interface for awips.dataaccess package
|
# Published interface for awips.dataaccess package
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 12/10/12 njensen Initial Creation.
|
# 12/10/12 njensen Initial Creation.
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
# 03/03/14 2673 bsteffen Add ability to query only ref times.
|
# 03/03/14 2673 bsteffen Add ability to query only ref times.
|
||||||
# 07/22/14 3185 njensen Added optional/default args to newDataRequest
|
# 07/22/14 3185 njensen Added optional/default args to newDataRequest
|
||||||
# 07/30/14 3185 njensen Renamed valid identifiers to optional
|
# 07/30/14 3185 njensen Renamed valid identifiers to optional
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,19 +56,19 @@ else:
|
||||||
from awips.dataaccess import ThriftClientRouter
|
from awips.dataaccess import ThriftClientRouter
|
||||||
router = ThriftClientRouter.ThriftClientRouter(THRIFT_HOST)
|
router = ThriftClientRouter.ThriftClientRouter(THRIFT_HOST)
|
||||||
USING_NATIVE_THRIFT = True
|
USING_NATIVE_THRIFT = True
|
||||||
|
|
||||||
|
|
||||||
def getAvailableTimes(request, refTimeOnly=False):
|
def getAvailableTimes(request, refTimeOnly=False):
|
||||||
"""
|
"""
|
||||||
Get the times of available data to the request.
|
Get the times of available data to the request.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
request: the IDataRequest to get data for
|
request: the IDataRequest to get data for
|
||||||
refTimeOnly: optional, use True if only unique refTimes should be
|
refTimeOnly: optional, use True if only unique refTimes should be
|
||||||
returned (without a forecastHr)
|
returned (without a forecastHr)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of DataTimes
|
a list of DataTimes
|
||||||
"""
|
"""
|
||||||
return router.getAvailableTimes(request, refTimeOnly)
|
return router.getAvailableTimes(request, refTimeOnly)
|
||||||
|
|
||||||
|
@ -77,12 +77,12 @@ def getGridData(request, times=[]):
|
||||||
Gets the grid data that matches the request at the specified times. Each
|
Gets the grid data that matches the request at the specified times. Each
|
||||||
combination of parameter, level, and dataTime will be returned as a
|
combination of parameter, level, and dataTime will be returned as a
|
||||||
separate IGridData.
|
separate IGridData.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
request: the IDataRequest to get data for
|
request: the IDataRequest to get data for
|
||||||
times: a list of DataTimes, a TimeRange, or None if the data is time
|
times: a list of DataTimes, a TimeRange, or None if the data is time
|
||||||
agnostic
|
agnostic
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of IGridData
|
a list of IGridData
|
||||||
"""
|
"""
|
||||||
|
@ -91,14 +91,14 @@ def getGridData(request, times=[]):
|
||||||
def getGeometryData(request, times=[]):
|
def getGeometryData(request, times=[]):
|
||||||
"""
|
"""
|
||||||
Gets the geometry data that matches the request at the specified times.
|
Gets the geometry data that matches the request at the specified times.
|
||||||
Each combination of geometry, level, and dataTime will be returned as a
|
Each combination of geometry, level, and dataTime will be returned as a
|
||||||
separate IGeometryData.
|
separate IGeometryData.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
request: the IDataRequest to get data for
|
request: the IDataRequest to get data for
|
||||||
times: a list of DataTimes, a TimeRange, or None if the data is time
|
times: a list of DataTimes, a TimeRange, or None if the data is time
|
||||||
agnostic
|
agnostic
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of IGeometryData
|
a list of IGeometryData
|
||||||
"""
|
"""
|
||||||
|
@ -108,10 +108,10 @@ def getAvailableLocationNames(request):
|
||||||
"""
|
"""
|
||||||
Gets the available location names that match the request without actually
|
Gets the available location names that match the request without actually
|
||||||
requesting the data.
|
requesting the data.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
request: the request to find matching location names for
|
request: the request to find matching location names for
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of available location names.
|
a list of strings of available location names.
|
||||||
"""
|
"""
|
||||||
|
@ -121,10 +121,10 @@ def getAvailableParameters(request):
|
||||||
"""
|
"""
|
||||||
Gets the available parameters names that match the request without actually
|
Gets the available parameters names that match the request without actually
|
||||||
requesting the data.
|
requesting the data.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
request: the request to find matching parameter names for
|
request: the request to find matching parameter names for
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of available parameter names.
|
a list of strings of available parameter names.
|
||||||
"""
|
"""
|
||||||
|
@ -134,10 +134,10 @@ def getAvailableLevels(request):
|
||||||
"""
|
"""
|
||||||
Gets the available levels that match the request without actually
|
Gets the available levels that match the request without actually
|
||||||
requesting the data.
|
requesting the data.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
request: the request to find matching levels for
|
request: the request to find matching levels for
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of available levels.
|
a list of strings of available levels.
|
||||||
"""
|
"""
|
||||||
|
@ -147,10 +147,10 @@ def getRequiredIdentifiers(datatype):
|
||||||
"""
|
"""
|
||||||
Gets the required identifiers for this datatype. These identifiers
|
Gets the required identifiers for this datatype. These identifiers
|
||||||
must be set on a request for the request of this datatype to succeed.
|
must be set on a request for the request of this datatype to succeed.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
datatype: the datatype to find required identifiers for
|
datatype: the datatype to find required identifiers for
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of required identifiers
|
a list of strings of required identifiers
|
||||||
"""
|
"""
|
||||||
|
@ -159,10 +159,10 @@ def getRequiredIdentifiers(datatype):
|
||||||
def getOptionalIdentifiers(datatype):
|
def getOptionalIdentifiers(datatype):
|
||||||
"""
|
"""
|
||||||
Gets the optional identifiers for this datatype.
|
Gets the optional identifiers for this datatype.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
datatype: the datatype to find optional identifiers for
|
datatype: the datatype to find optional identifiers for
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of optional identifiers
|
a list of strings of optional identifiers
|
||||||
"""
|
"""
|
||||||
|
@ -172,7 +172,7 @@ def newDataRequest(datatype=None, **kwargs):
|
||||||
""""
|
""""
|
||||||
Creates a new instance of IDataRequest suitable for the runtime environment.
|
Creates a new instance of IDataRequest suitable for the runtime environment.
|
||||||
All args are optional and exist solely for convenience.
|
All args are optional and exist solely for convenience.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
datatype: the datatype to create a request for
|
datatype: the datatype to create a request for
|
||||||
parameters: a list of parameters to set on the request
|
parameters: a list of parameters to set on the request
|
||||||
|
@ -180,28 +180,28 @@ def newDataRequest(datatype=None, **kwargs):
|
||||||
locationNames: a list of locationNames to set on the request
|
locationNames: a list of locationNames to set on the request
|
||||||
envelope: an envelope to limit the request
|
envelope: an envelope to limit the request
|
||||||
**kwargs: any leftover kwargs will be set as identifiers
|
**kwargs: any leftover kwargs will be set as identifiers
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a new IDataRequest
|
a new IDataRequest
|
||||||
"""
|
"""
|
||||||
return router.newDataRequest(datatype, **kwargs)
|
return router.newDataRequest(datatype, **kwargs)
|
||||||
|
|
||||||
def getSupportedDatatypes():
|
def getSupportedDatatypes():
|
||||||
"""
|
"""
|
||||||
Gets the datatypes that are supported by the framework
|
Gets the datatypes that are supported by the framework
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of supported datatypes
|
a list of strings of supported datatypes
|
||||||
"""
|
"""
|
||||||
return router.getSupportedDatatypes()
|
return router.getSupportedDatatypes()
|
||||||
|
|
||||||
|
|
||||||
def changeEDEXHost(newHostName):
|
def changeEDEXHost(newHostName):
|
||||||
"""
|
"""
|
||||||
Changes the EDEX host the Data Access Framework is communicating with. Only
|
Changes the EDEX host the Data Access Framework is communicating with. Only
|
||||||
works if using the native Python client implementation, otherwise, this
|
works if using the native Python client implementation, otherwise, this
|
||||||
method will throw a TypeError.
|
method will throw a TypeError.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
newHostHame: the EDEX host to connect to
|
newHostHame: the EDEX host to connect to
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,20 +21,20 @@
|
||||||
#
|
#
|
||||||
# Implements IData for use by native Python clients to the Data Access
|
# Implements IData for use by native Python clients to the Data Access
|
||||||
# Framework.
|
# Framework.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 06/03/13 dgilling Initial Creation.
|
# 06/03/13 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from awips.dataaccess import IData
|
from awips.dataaccess import IData
|
||||||
|
|
||||||
class PyData(IData):
|
class PyData(IData):
|
||||||
|
|
||||||
def __init__(self, dataRecord):
|
def __init__(self, dataRecord):
|
||||||
self.__time = dataRecord.getTime()
|
self.__time = dataRecord.getTime()
|
||||||
self.__level = dataRecord.getLevel()
|
self.__level = dataRecord.getLevel()
|
||||||
|
@ -43,15 +43,15 @@ class PyData(IData):
|
||||||
|
|
||||||
def getAttribute(self, key):
|
def getAttribute(self, key):
|
||||||
return self.__attributes[key]
|
return self.__attributes[key]
|
||||||
|
|
||||||
def getAttributes(self):
|
def getAttributes(self):
|
||||||
return self.__attributes.keys()
|
return self.__attributes.keys()
|
||||||
|
|
||||||
def getDataTime(self):
|
def getDataTime(self):
|
||||||
return self.__time
|
return self.__time
|
||||||
|
|
||||||
def getLevel(self):
|
def getLevel(self):
|
||||||
return self.__level
|
return self.__level
|
||||||
|
|
||||||
def getLocationName(self):
|
def getLocationName(self):
|
||||||
return self.__locationName
|
return self.__locationName
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,25 +21,25 @@
|
||||||
#
|
#
|
||||||
# Implements IGeometryData for use by native Python clients to the Data Access
|
# Implements IGeometryData for use by native Python clients to the Data Access
|
||||||
# Framework.
|
# Framework.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 06/03/13 dgilling Initial Creation.
|
# 06/03/13 dgilling Initial Creation.
|
||||||
# 01/06/14 #2537 bsteffen Share geometry WKT.
|
# 01/06/14 #2537 bsteffen Share geometry WKT.
|
||||||
# 03/19/14 #2882 dgilling Raise an exception when getNumber()
|
# 03/19/14 #2882 dgilling Raise an exception when getNumber()
|
||||||
# is called for data that is not a
|
# is called for data that is not a
|
||||||
# numeric Type.
|
# numeric Type.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from awips.dataaccess import IGeometryData
|
from awips.dataaccess import IGeometryData
|
||||||
from awips.dataaccess import PyData
|
from awips.dataaccess import PyData
|
||||||
|
|
||||||
class PyGeometryData(IGeometryData, PyData.PyData):
|
class PyGeometryData(IGeometryData, PyData.PyData):
|
||||||
|
|
||||||
def __init__(self, geoDataRecord, geometry):
|
def __init__(self, geoDataRecord, geometry):
|
||||||
PyData.PyData.__init__(self, geoDataRecord)
|
PyData.PyData.__init__(self, geoDataRecord)
|
||||||
self.__geometry = geometry
|
self.__geometry = geometry
|
||||||
|
@ -50,18 +50,18 @@ class PyGeometryData(IGeometryData, PyData.PyData):
|
||||||
|
|
||||||
def getGeometry(self):
|
def getGeometry(self):
|
||||||
return self.__geometry
|
return self.__geometry
|
||||||
|
|
||||||
def getParameters(self):
|
def getParameters(self):
|
||||||
return self.__dataMap.keys()
|
return self.__dataMap.keys()
|
||||||
|
|
||||||
def getString(self, param):
|
def getString(self, param):
|
||||||
value = self.__dataMap[param][0]
|
value = self.__dataMap[param][0]
|
||||||
return str(value)
|
return str(value)
|
||||||
|
|
||||||
def getNumber(self, param):
|
def getNumber(self, param):
|
||||||
value = self.__dataMap[param][0]
|
value = self.__dataMap[param][0]
|
||||||
t = self.getType(param)
|
t = self.getType(param)
|
||||||
if t == 'INT':
|
if t == 'INT':
|
||||||
return int(value)
|
return int(value)
|
||||||
elif t == 'LONG':
|
elif t == 'LONG':
|
||||||
return long(value)
|
return long(value)
|
||||||
|
@ -71,9 +71,9 @@ class PyGeometryData(IGeometryData, PyData.PyData):
|
||||||
return float(value)
|
return float(value)
|
||||||
else:
|
else:
|
||||||
raise TypeError("Data for parameter " + param + " is not a numeric type.")
|
raise TypeError("Data for parameter " + param + " is not a numeric type.")
|
||||||
|
|
||||||
def getUnit(self, param):
|
def getUnit(self, param):
|
||||||
return self.__dataMap[param][2]
|
return self.__dataMap[param][2]
|
||||||
|
|
||||||
def getType(self, param):
|
def getType(self, param):
|
||||||
return self.__dataMap[param][1]
|
return self.__dataMap[param][1]
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# #
|
# #
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
# #
|
# #
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
#
|
#
|
||||||
# Implements IGridData for use by native Python clients to the Data Access
|
# Implements IGridData for use by native Python clients to the Data Access
|
||||||
# Framework.
|
# Framework.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 06/03/13 #2023 dgilling Initial Creation.
|
# 06/03/13 #2023 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ The ability to unit convert grid data is not currently available in this version
|
||||||
|
|
||||||
|
|
||||||
class PyGridData(IGridData, PyData.PyData):
|
class PyGridData(IGridData, PyData.PyData):
|
||||||
|
|
||||||
def __init__(self, gridDataRecord, nx, ny, latLonGrid):
|
def __init__(self, gridDataRecord, nx, ny, latLonGrid):
|
||||||
PyData.PyData.__init__(self, gridDataRecord)
|
PyData.PyData.__init__(self, gridDataRecord)
|
||||||
nx = nx
|
nx = nx
|
||||||
|
@ -53,13 +53,13 @@ class PyGridData(IGridData, PyData.PyData):
|
||||||
self.__unit = gridDataRecord.getUnit()
|
self.__unit = gridDataRecord.getUnit()
|
||||||
self.__gridData = numpy.reshape(numpy.array(gridDataRecord.getGridData()), (nx, ny))
|
self.__gridData = numpy.reshape(numpy.array(gridDataRecord.getGridData()), (nx, ny))
|
||||||
self.__latLonGrid = latLonGrid
|
self.__latLonGrid = latLonGrid
|
||||||
|
|
||||||
def getParameter(self):
|
def getParameter(self):
|
||||||
return self.__parameter
|
return self.__parameter
|
||||||
|
|
||||||
def getUnit(self):
|
def getUnit(self):
|
||||||
return self.__unit
|
return self.__unit
|
||||||
|
|
||||||
def getRawData(self, unit=None):
|
def getRawData(self, unit=None):
|
||||||
# TODO: Find a proper python library that deals will with numpy and
|
# TODO: Find a proper python library that deals will with numpy and
|
||||||
# javax.measure style unit strings and hook it in to this method to
|
# javax.measure style unit strings and hook it in to this method to
|
||||||
|
@ -67,6 +67,6 @@ class PyGridData(IGridData, PyData.PyData):
|
||||||
if unit is not None:
|
if unit is not None:
|
||||||
warnings.warn(NO_UNIT_CONVERT_WARNING, stacklevel=2)
|
warnings.warn(NO_UNIT_CONVERT_WARNING, stacklevel=2)
|
||||||
return self.__gridData
|
return self.__gridData
|
||||||
|
|
||||||
def getLatLonCoords(self):
|
def getLatLonCoords(self):
|
||||||
return self.__latLonGrid
|
return self.__latLonGrid
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# #
|
# #
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
# #
|
# #
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
#
|
#
|
||||||
# Routes requests to the Data Access Framework through Python Thrift.
|
# Routes requests to the Data Access Framework through Python Thrift.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 05/21/13 #2023 dgilling Initial Creation.
|
# 05/21/13 #2023 dgilling Initial Creation.
|
||||||
|
@ -56,18 +56,18 @@ from awips.dataaccess import PyGridData
|
||||||
|
|
||||||
|
|
||||||
class ThriftClientRouter(object):
|
class ThriftClientRouter(object):
|
||||||
|
|
||||||
def __init__(self, host='localhost'):
|
def __init__(self, host='localhost'):
|
||||||
self._client = ThriftClient.ThriftClient(host)
|
self._client = ThriftClient.ThriftClient(host)
|
||||||
|
|
||||||
def getAvailableTimes(self, request, refTimeOnly):
|
def getAvailableTimes(self, request, refTimeOnly):
|
||||||
timesRequest = GetAvailableTimesRequest()
|
timesRequest = GetAvailableTimesRequest()
|
||||||
timesRequest.setRequestParameters(request)
|
timesRequest.setRequestParameters(request)
|
||||||
timesRequest.setRefTimeOnly(refTimeOnly)
|
timesRequest.setRefTimeOnly(refTimeOnly)
|
||||||
response = self._client.sendRequest(timesRequest)
|
response = self._client.sendRequest(timesRequest)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def getGridData(self, request, times):
|
def getGridData(self, request, times):
|
||||||
gridDataRequest = GetGridDataRequest()
|
gridDataRequest = GetGridDataRequest()
|
||||||
gridDataRequest.setRequestParameters(request)
|
gridDataRequest.setRequestParameters(request)
|
||||||
# if we have an iterable times instance, then the user must have asked
|
# if we have an iterable times instance, then the user must have asked
|
||||||
|
@ -80,7 +80,7 @@ class ThriftClientRouter(object):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
gridDataRequest.setRequestedPeriod(times)
|
gridDataRequest.setRequestedPeriod(times)
|
||||||
response = self._client.sendRequest(gridDataRequest)
|
response = self._client.sendRequest(gridDataRequest)
|
||||||
|
|
||||||
locSpecificData = {}
|
locSpecificData = {}
|
||||||
locNames = response.getSiteNxValues().keys()
|
locNames = response.getSiteNxValues().keys()
|
||||||
for location in locNames:
|
for location in locNames:
|
||||||
|
@ -89,14 +89,14 @@ class ThriftClientRouter(object):
|
||||||
latData = numpy.reshape(numpy.array(response.getSiteLatGrids()[location]), (nx, ny))
|
latData = numpy.reshape(numpy.array(response.getSiteLatGrids()[location]), (nx, ny))
|
||||||
lonData = numpy.reshape(numpy.array(response.getSiteLonGrids()[location]), (nx, ny))
|
lonData = numpy.reshape(numpy.array(response.getSiteLonGrids()[location]), (nx, ny))
|
||||||
locSpecificData[location] = (nx, ny, (lonData, latData))
|
locSpecificData[location] = (nx, ny, (lonData, latData))
|
||||||
|
|
||||||
retVal = []
|
retVal = []
|
||||||
for gridDataRecord in response.getGridData():
|
for gridDataRecord in response.getGridData():
|
||||||
locationName = gridDataRecord.getLocationName()
|
locationName = gridDataRecord.getLocationName()
|
||||||
locData = locSpecificData[locationName]
|
locData = locSpecificData[locationName]
|
||||||
retVal.append(PyGridData.PyGridData(gridDataRecord, locData[0], locData[1], locData[2]))
|
retVal.append(PyGridData.PyGridData(gridDataRecord, locData[0], locData[1], locData[2]))
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def getGeometryData(self, request, times):
|
def getGeometryData(self, request, times):
|
||||||
geoDataRequest = GetGeometryDataRequest()
|
geoDataRequest = GetGeometryDataRequest()
|
||||||
geoDataRequest.setRequestParameters(request)
|
geoDataRequest.setRequestParameters(request)
|
||||||
|
@ -113,7 +113,7 @@ class ThriftClientRouter(object):
|
||||||
geometries = []
|
geometries = []
|
||||||
for wkt in response.getGeometryWKTs():
|
for wkt in response.getGeometryWKTs():
|
||||||
geometries.append(shapely.wkt.loads(wkt))
|
geometries.append(shapely.wkt.loads(wkt))
|
||||||
|
|
||||||
retVal = []
|
retVal = []
|
||||||
for geoDataRecord in response.getGeoData():
|
for geoDataRecord in response.getGeoData():
|
||||||
geom = geometries[geoDataRecord.getGeometryWKTindex()]
|
geom = geometries[geoDataRecord.getGeometryWKTindex()]
|
||||||
|
@ -125,48 +125,48 @@ class ThriftClientRouter(object):
|
||||||
locNamesRequest.setRequestParameters(request)
|
locNamesRequest.setRequestParameters(request)
|
||||||
response = self._client.sendRequest(locNamesRequest)
|
response = self._client.sendRequest(locNamesRequest)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def getAvailableParameters(self, request):
|
def getAvailableParameters(self, request):
|
||||||
paramReq = GetAvailableParametersRequest()
|
paramReq = GetAvailableParametersRequest()
|
||||||
paramReq.setRequestParameters(request)
|
paramReq.setRequestParameters(request)
|
||||||
response = self._client.sendRequest(paramReq)
|
response = self._client.sendRequest(paramReq)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def getAvailableLevels(self, request):
|
def getAvailableLevels(self, request):
|
||||||
levelReq = GetAvailableLevelsRequest()
|
levelReq = GetAvailableLevelsRequest()
|
||||||
levelReq.setRequestParameters(request)
|
levelReq.setRequestParameters(request)
|
||||||
response = self._client.sendRequest(levelReq)
|
response = self._client.sendRequest(levelReq)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def getRequiredIdentifiers(self, datatype):
|
def getRequiredIdentifiers(self, datatype):
|
||||||
idReq = GetRequiredIdentifiersRequest()
|
idReq = GetRequiredIdentifiersRequest()
|
||||||
idReq.setDatatype(datatype)
|
idReq.setDatatype(datatype)
|
||||||
response = self._client.sendRequest(idReq)
|
response = self._client.sendRequest(idReq)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def getOptionalIdentifiers(self, datatype):
|
def getOptionalIdentifiers(self, datatype):
|
||||||
idReq = GetOptionalIdentifiersRequest()
|
idReq = GetOptionalIdentifiersRequest()
|
||||||
idReq.setDatatype(datatype)
|
idReq.setDatatype(datatype)
|
||||||
response = self._client.sendRequest(idReq)
|
response = self._client.sendRequest(idReq)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def newDataRequest(self, datatype, parameters=[], levels=[], locationNames = [], envelope=None, **kwargs):
|
def newDataRequest(self, datatype, parameters=[], levels=[], locationNames = [], envelope=None, **kwargs):
|
||||||
req = DefaultDataRequest()
|
req = DefaultDataRequest()
|
||||||
if datatype:
|
if datatype:
|
||||||
req.setDatatype(datatype)
|
req.setDatatype(datatype)
|
||||||
if parameters:
|
if parameters:
|
||||||
req.setParameters(*parameters)
|
req.setParameters(*parameters)
|
||||||
if levels:
|
if levels:
|
||||||
req.setLevels(*levels)
|
req.setLevels(*levels)
|
||||||
if locationNames:
|
if locationNames:
|
||||||
req.setLocationNames(*locationNames)
|
req.setLocationNames(*locationNames)
|
||||||
if envelope:
|
if envelope:
|
||||||
req.setEnvelope(envelope)
|
req.setEnvelope(envelope)
|
||||||
if kwargs:
|
if kwargs:
|
||||||
# any args leftover are assumed to be identifiers
|
# any args leftover are assumed to be identifiers
|
||||||
req.identifiers = kwargs
|
req.identifiers = kwargs
|
||||||
return req
|
return req
|
||||||
|
|
||||||
def getSupportedDatatypes(self):
|
def getSupportedDatatypes(self):
|
||||||
response = self._client.sendRequest(GetSupportedDatatypesRequest())
|
response = self._client.sendRequest(GetSupportedDatatypesRequest())
|
||||||
return response
|
return response
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# __init__.py for awips.dataaccess package
|
# __init__.py for awips.dataaccess package
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 12/10/12 njensen Initial Creation.
|
# 12/10/12 njensen Initial Creation.
|
||||||
|
@ -33,11 +33,11 @@
|
||||||
# Apr 09, 2013 1871 njensen Add doc strings
|
# Apr 09, 2013 1871 njensen Add doc strings
|
||||||
# Jun 03, 2013 2023 dgilling Add getAttributes to IData, add
|
# Jun 03, 2013 2023 dgilling Add getAttributes to IData, add
|
||||||
# getLatLonGrids() to IGridData.
|
# getLatLonGrids() to IGridData.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
@ -47,119 +47,119 @@ class IDataRequest(object):
|
||||||
An IDataRequest to be submitted to the DataAccessLayer to retrieve data.
|
An IDataRequest to be submitted to the DataAccessLayer to retrieve data.
|
||||||
"""
|
"""
|
||||||
__metaclass__ = abc.ABCMeta
|
__metaclass__ = abc.ABCMeta
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def setDatatype(self, datatype):
|
def setDatatype(self, datatype):
|
||||||
"""
|
"""
|
||||||
Sets the datatype of the request.
|
Sets the datatype of the request.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
datatype: A string of the datatype, such as "grid", "radar", "gfe", "obs"
|
datatype: A string of the datatype, such as "grid", "radar", "gfe", "obs"
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def addIdentifier(self, key, value):
|
def addIdentifier(self, key, value):
|
||||||
"""
|
"""
|
||||||
Adds an identifier to the request. Identifiers are specific to the
|
Adds an identifier to the request. Identifiers are specific to the
|
||||||
datatype being requested.
|
datatype being requested.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
key: the string key of the identifier
|
key: the string key of the identifier
|
||||||
value: the value of the identifier
|
value: the value of the identifier
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def setParameters(self, params):
|
def setParameters(self, params):
|
||||||
"""
|
"""
|
||||||
Sets the parameters of data to request.
|
Sets the parameters of data to request.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
params: a list of strings of parameters to request
|
params: a list of strings of parameters to request
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def setLevels(self, levels):
|
def setLevels(self, levels):
|
||||||
"""
|
"""
|
||||||
Sets the levels of data to request. Not all datatypes support levels.
|
Sets the levels of data to request. Not all datatypes support levels.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
levels: a list of strings of level abbreviations to request
|
levels: a list of strings of level abbreviations to request
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def setEnvelope(self, env):
|
def setEnvelope(self, env):
|
||||||
"""
|
"""
|
||||||
Sets the envelope of the request. If supported by the datatype factory,
|
Sets the envelope of the request. If supported by the datatype factory,
|
||||||
the data returned for the request will be constrained to only the data
|
the data returned for the request will be constrained to only the data
|
||||||
within the envelope.
|
within the envelope.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
env: a shapely geometry
|
env: a shapely geometry
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def setLocationNames(self, locationNames):
|
def setLocationNames(self, locationNames):
|
||||||
"""
|
"""
|
||||||
Sets the location names of the request.
|
Sets the location names of the request.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
locationNames: a list of strings of location names to request
|
locationNames: a list of strings of location names to request
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getDatatype(self):
|
def getDatatype(self):
|
||||||
"""
|
"""
|
||||||
Gets the datatype of the request
|
Gets the datatype of the request
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the datatype set on the request
|
the datatype set on the request
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getIdentifiers(self):
|
def getIdentifiers(self):
|
||||||
"""
|
"""
|
||||||
Gets the identifiers on the request
|
Gets the identifiers on the request
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a dictionary of the identifiers
|
a dictionary of the identifiers
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getLevels(self):
|
def getLevels(self):
|
||||||
"""
|
"""
|
||||||
Gets the levels on the request
|
Gets the levels on the request
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of the levels
|
a list of strings of the levels
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getLocationNames(self):
|
def getLocationNames(self):
|
||||||
"""
|
"""
|
||||||
Gets the location names on the request
|
Gets the location names on the request
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of the location names
|
a list of strings of the location names
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getEnvelope(self):
|
def getEnvelope(self):
|
||||||
"""
|
"""
|
||||||
Gets the envelope on the request
|
Gets the envelope on the request
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a rectangular shapely geometry
|
a rectangular shapely geometry
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,55 +169,55 @@ class IData(object):
|
||||||
An IData representing data returned from the DataAccessLayer.
|
An IData representing data returned from the DataAccessLayer.
|
||||||
"""
|
"""
|
||||||
__metaclass__ = abc.ABCMeta
|
__metaclass__ = abc.ABCMeta
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getAttribute(self, key):
|
def getAttribute(self, key):
|
||||||
"""
|
"""
|
||||||
Gets an attribute of the data.
|
Gets an attribute of the data.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
key: the key of the attribute
|
key: the key of the attribute
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the value of the attribute
|
the value of the attribute
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getAttributes(self):
|
def getAttributes(self):
|
||||||
"""
|
"""
|
||||||
Gets the valid attributes for the data.
|
Gets the valid attributes for the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of the attribute names
|
a list of strings of the attribute names
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getDataTime(self):
|
def getDataTime(self):
|
||||||
"""
|
"""
|
||||||
Gets the data time of the data.
|
Gets the data time of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the data time of the data, or None if no time is associated
|
the data time of the data, or None if no time is associated
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getLevel(self):
|
def getLevel(self):
|
||||||
"""
|
"""
|
||||||
Gets the level of the data.
|
Gets the level of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the level of the data, or None if no level is associated
|
the level of the data, or None if no level is associated
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getLocationName(self, param):
|
def getLocationName(self, param):
|
||||||
"""
|
"""
|
||||||
Gets the location name of the data.
|
Gets the location name of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the location name of the data, or None if no location name is
|
the location name of the data, or None if no location name is
|
||||||
associated
|
associated
|
||||||
|
@ -230,44 +230,44 @@ class IGridData(IData):
|
||||||
"""
|
"""
|
||||||
An IData representing grid data that is returned by the DataAccessLayer.
|
An IData representing grid data that is returned by the DataAccessLayer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getParameter(self):
|
def getParameter(self):
|
||||||
"""
|
"""
|
||||||
Gets the parameter of the data.
|
Gets the parameter of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the parameter of the data
|
the parameter of the data
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getUnit(self):
|
def getUnit(self):
|
||||||
"""
|
"""
|
||||||
Gets the unit of the data.
|
Gets the unit of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the string abbreviation of the unit, or None if no unit is associated
|
the string abbreviation of the unit, or None if no unit is associated
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getRawData(self):
|
def getRawData(self):
|
||||||
"""
|
"""
|
||||||
Gets the grid data as a numpy array.
|
Gets the grid data as a numpy array.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a numpy array of the data
|
a numpy array of the data
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getLatLonCoords(self):
|
def getLatLonCoords(self):
|
||||||
"""
|
"""
|
||||||
Gets the lat/lon coordinates of the grid data.
|
Gets the lat/lon coordinates of the grid data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a tuple where the first element is a numpy array of lons, and the
|
a tuple where the first element is a numpy array of lons, and the
|
||||||
second element is a numpy array of lats
|
second element is a numpy array of lats
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
@ -278,73 +278,73 @@ class IGeometryData(IData):
|
||||||
"""
|
"""
|
||||||
An IData representing geometry data that is returned by the DataAccessLayer.
|
An IData representing geometry data that is returned by the DataAccessLayer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getGeometry(self):
|
def getGeometry(self):
|
||||||
"""
|
"""
|
||||||
Gets the geometry of the data.
|
Gets the geometry of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a shapely geometry
|
a shapely geometry
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getParameters(self):
|
def getParameters(self):
|
||||||
"""Gets the parameters of the data.
|
"""Gets the parameters of the data.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of the parameter names
|
a list of strings of the parameter names
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getString(self, param):
|
def getString(self, param):
|
||||||
"""
|
"""
|
||||||
Gets the string value of the specified param.
|
Gets the string value of the specified param.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
param: the string name of the param
|
param: the string name of the param
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the string value of the param
|
the string value of the param
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getNumber(self, param):
|
def getNumber(self, param):
|
||||||
"""
|
"""
|
||||||
Gets the number value of the specified param.
|
Gets the number value of the specified param.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
param: the string name of the param
|
param: the string name of the param
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the number value of the param
|
the number value of the param
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getUnit(self, param):
|
def getUnit(self, param):
|
||||||
"""
|
"""
|
||||||
Gets the unit of the specified param.
|
Gets the unit of the specified param.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
param: the string name of the param
|
param: the string name of the param
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
the string abbreviation of the unit of the param
|
the string abbreviation of the unit of the param
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def getType(self, param):
|
def getType(self, param):
|
||||||
"""
|
"""
|
||||||
Gets the type of the param.
|
Gets the type of the param.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
param: the string name of the param
|
param: the string name of the param
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a string of the type of the parameter, such as
|
a string of the type of the parameter, such as
|
||||||
"STRING", "INT", "LONG", "FLOAT", or "DOUBLE"
|
"STRING", "INT", "LONG", "FLOAT", or "DOUBLE"
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -34,16 +34,16 @@ from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.server.messa
|
||||||
|
|
||||||
#
|
#
|
||||||
# Provides a Python-based interface for executing GFE requests.
|
# Provides a Python-based interface for executing GFE requests.
|
||||||
#
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 07/26/12 dgilling Initial Creation.
|
# 07/26/12 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,14 +57,14 @@ class IFPClient(object):
|
||||||
if len(sr.getPayload()) > 0:
|
if len(sr.getPayload()) > 0:
|
||||||
site = sr.getPayload()[0]
|
site = sr.getPayload()[0]
|
||||||
self.__siteId = site
|
self.__siteId = site
|
||||||
|
|
||||||
def commitGrid(self, request):
|
def commitGrid(self, request):
|
||||||
if type(request) is CommitGridRequest:
|
if type(request) is CommitGridRequest:
|
||||||
return self.__commitGrid([request])
|
return self.__commitGrid([request])
|
||||||
elif self.__isHomogenousIterable(request, CommitGridRequest):
|
elif self.__isHomogenousIterable(request, CommitGridRequest):
|
||||||
return self.__commitGrid([cgr for cgr in request])
|
return self.__commitGrid([cgr for cgr in request])
|
||||||
raise TypeError("Invalid type: " + str(type(request)) + " specified to commitGrid(). Only accepts CommitGridRequest or lists of CommitGridRequest.")
|
raise TypeError("Invalid type: " + str(type(request)) + " specified to commitGrid(). Only accepts CommitGridRequest or lists of CommitGridRequest.")
|
||||||
|
|
||||||
def __commitGrid(self, requests):
|
def __commitGrid(self, requests):
|
||||||
ssr = ServerResponse()
|
ssr = ServerResponse()
|
||||||
request = CommitGridsRequest()
|
request = CommitGridsRequest()
|
||||||
|
@ -72,15 +72,15 @@ class IFPClient(object):
|
||||||
sr = self.__makeRequest(request)
|
sr = self.__makeRequest(request)
|
||||||
ssr.setMessages(sr.getMessages())
|
ssr.setMessages(sr.getMessages())
|
||||||
return ssr
|
return ssr
|
||||||
|
|
||||||
def getParmList(self, id):
|
def getParmList(self, id):
|
||||||
argType = type(id)
|
argType = type(id)
|
||||||
if argType is DatabaseID:
|
if argType is DatabaseID:
|
||||||
return self.__getParmList([id])
|
return self.__getParmList([id])
|
||||||
elif self.__isHomogenousIterable(id, DatabaseID):
|
elif self.__isHomogenousIterable(id, DatabaseID):
|
||||||
return self.__getParmList([dbid for dbid in id])
|
return self.__getParmList([dbid for dbid in id])
|
||||||
raise TypeError("Invalid type: " + str(argType) + " specified to getParmList(). Only accepts DatabaseID or lists of DatabaseID.")
|
raise TypeError("Invalid type: " + str(argType) + " specified to getParmList(). Only accepts DatabaseID or lists of DatabaseID.")
|
||||||
|
|
||||||
def __getParmList(self, ids):
|
def __getParmList(self, ids):
|
||||||
ssr = ServerResponse()
|
ssr = ServerResponse()
|
||||||
request = GetParmListRequest()
|
request = GetParmListRequest()
|
||||||
|
@ -90,7 +90,7 @@ class IFPClient(object):
|
||||||
list = sr.getPayload() if sr.getPayload() is not None else []
|
list = sr.getPayload() if sr.getPayload() is not None else []
|
||||||
ssr.setPayload(list)
|
ssr.setPayload(list)
|
||||||
return ssr
|
return ssr
|
||||||
|
|
||||||
def __isHomogenousIterable(self, iterable, classType):
|
def __isHomogenousIterable(self, iterable, classType):
|
||||||
try:
|
try:
|
||||||
iterator = iter(iterable)
|
iterator = iter(iterable)
|
||||||
|
@ -100,7 +100,7 @@ class IFPClient(object):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def getGridInventory(self, parmID):
|
def getGridInventory(self, parmID):
|
||||||
if type(parmID) is ParmID:
|
if type(parmID) is ParmID:
|
||||||
sr = self.__getGridInventory([parmID])
|
sr = self.__getGridInventory([parmID])
|
||||||
|
@ -115,7 +115,7 @@ class IFPClient(object):
|
||||||
elif self.__isHomogenousIterable(parmID, ParmID):
|
elif self.__isHomogenousIterable(parmID, ParmID):
|
||||||
return self.__getGridInventory([id for id in parmID])
|
return self.__getGridInventory([id for id in parmID])
|
||||||
raise TypeError("Invalid type: " + str(type(parmID)) + " specified to getGridInventory(). Only accepts ParmID or lists of ParmID.")
|
raise TypeError("Invalid type: " + str(type(parmID)) + " specified to getGridInventory(). Only accepts ParmID or lists of ParmID.")
|
||||||
|
|
||||||
def __getGridInventory(self, parmIDs):
|
def __getGridInventory(self, parmIDs):
|
||||||
ssr = ServerResponse()
|
ssr = ServerResponse()
|
||||||
request = GetGridInventoryRequest()
|
request = GetGridInventoryRequest()
|
||||||
|
@ -125,7 +125,7 @@ class IFPClient(object):
|
||||||
trs = sr.getPayload() if sr.getPayload() is not None else {}
|
trs = sr.getPayload() if sr.getPayload() is not None else {}
|
||||||
ssr.setPayload(trs)
|
ssr.setPayload(trs)
|
||||||
return ssr
|
return ssr
|
||||||
|
|
||||||
def getSelectTR(self, name):
|
def getSelectTR(self, name):
|
||||||
request = GetSelectTimeRangeRequest()
|
request = GetSelectTimeRangeRequest()
|
||||||
request.setName(name)
|
request.setName(name)
|
||||||
|
@ -134,7 +134,7 @@ class IFPClient(object):
|
||||||
ssr.setMessages(sr.getMessages())
|
ssr.setMessages(sr.getMessages())
|
||||||
ssr.setPayload(sr.getPayload())
|
ssr.setPayload(sr.getPayload())
|
||||||
return ssr
|
return ssr
|
||||||
|
|
||||||
def getSiteID(self):
|
def getSiteID(self):
|
||||||
ssr = ServerResponse()
|
ssr = ServerResponse()
|
||||||
request = GetActiveSitesRequest()
|
request = GetActiveSitesRequest()
|
||||||
|
@ -143,7 +143,7 @@ class IFPClient(object):
|
||||||
ids = sr.getPayload() if sr.getPayload() is not None else []
|
ids = sr.getPayload() if sr.getPayload() is not None else []
|
||||||
sr.setPayload(ids)
|
sr.setPayload(ids)
|
||||||
return sr
|
return sr
|
||||||
|
|
||||||
def __makeRequest(self, request):
|
def __makeRequest(self, request):
|
||||||
try:
|
try:
|
||||||
request.setSiteID(self.__siteId)
|
request.setSiteID(self.__siteId)
|
||||||
|
@ -153,7 +153,7 @@ class IFPClient(object):
|
||||||
request.setWorkstationID(self.__wsId)
|
request.setWorkstationID(self.__wsId)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
sr = ServerResponse()
|
sr = ServerResponse()
|
||||||
response = None
|
response = None
|
||||||
try:
|
try:
|
||||||
|
@ -169,5 +169,5 @@ class IFPClient(object):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# not a server response, nothing else to do
|
# not a server response, nothing else to do
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return sr
|
return sr
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,17 +21,17 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# __init__.py for awips.gfe package
|
# __init__.py for awips.gfe package
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 07/26/12 dgilling Initial Creation.
|
# 07/26/12 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
]
|
]
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
# 06/13/2013 DR 16242 D. Friedman Add Qpid authentication info
|
# 06/13/2013 DR 16242 D. Friedman Add Qpid authentication info
|
||||||
# 03/06/2014 DR 17907 D. Friedman Workaround for issue QPID-5569
|
# 03/06/2014 DR 17907 D. Friedman Workaround for issue QPID-5569
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
import qpid
|
import qpid
|
||||||
from qpid.util import connect
|
from qpid.util import connect
|
||||||
|
@ -77,7 +77,7 @@ class IngestViaQPID:
|
||||||
@param host: string hostname of computer running EDEX and QPID (default localhost)
|
@param host: string hostname of computer running EDEX and QPID (default localhost)
|
||||||
@param port: integer port used to connect to QPID (default 5672)
|
@param port: integer port used to connect to QPID (default 5672)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
#
|
#
|
||||||
self.socket = connect(host, port)
|
self.socket = connect(host, port)
|
||||||
|
@ -88,7 +88,7 @@ class IngestViaQPID:
|
||||||
print 'Connected to Qpid'
|
print 'Connected to Qpid'
|
||||||
except:
|
except:
|
||||||
print 'Unable to connect to Qpid'
|
print 'Unable to connect to Qpid'
|
||||||
|
|
||||||
def sendmessage(self, filepath, header):
|
def sendmessage(self, filepath, header):
|
||||||
'''
|
'''
|
||||||
This function sends a message to the external.dropbox queue providing the path
|
This function sends a message to the external.dropbox queue providing the path
|
||||||
|
@ -101,11 +101,11 @@ class IngestViaQPID:
|
||||||
head = self.session.message_properties(application_headers={'header':header},
|
head = self.session.message_properties(application_headers={'header':header},
|
||||||
user_id=QPID_USERNAME) # For issue QPID-5569. Fixed in Qpid 0.27
|
user_id=QPID_USERNAME) # For issue QPID-5569. Fixed in Qpid 0.27
|
||||||
self.session.message_transfer(destination='amq.direct', message=Message(props, head, filepath))
|
self.session.message_transfer(destination='amq.direct', message=Message(props, head, filepath))
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
'''
|
'''
|
||||||
After all messages are sent call this function to close connection and make sure
|
After all messages are sent call this function to close connection and make sure
|
||||||
there are no threads left open
|
there are no threads left open
|
||||||
'''
|
'''
|
||||||
self.session.close(timeout=10)
|
self.session.close(timeout=10)
|
||||||
print 'Connection to Qpid closed'
|
print 'Connection to Qpid closed'
|
||||||
|
|
138
awips/stomp.py
138
awips/stomp.py
|
@ -2,19 +2,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -23,14 +23,14 @@
|
||||||
This provides basic connectivity to a message broker supporting the 'stomp' protocol.
|
This provides basic connectivity to a message broker supporting the 'stomp' protocol.
|
||||||
At the moment ACK, SEND, SUBSCRIBE, UNSUBSCRIBE, BEGIN, ABORT, COMMIT, CONNECT and DISCONNECT operations
|
At the moment ACK, SEND, SUBSCRIBE, UNSUBSCRIBE, BEGIN, ABORT, COMMIT, CONNECT and DISCONNECT operations
|
||||||
are supported.
|
are supported.
|
||||||
|
|
||||||
This changes the previous version which required a listener per subscription -- now a listener object
|
This changes the previous version which required a listener per subscription -- now a listener object
|
||||||
just calls the 'addlistener' method and will receive all messages sent in response to all/any subscriptions.
|
just calls the 'addlistener' method and will receive all messages sent in response to all/any subscriptions.
|
||||||
(The reason for the change is that the handling of an 'ack' becomes problematic unless the listener mechanism
|
(The reason for the change is that the handling of an 'ack' becomes problematic unless the listener mechanism
|
||||||
is decoupled from subscriptions).
|
is decoupled from subscriptions).
|
||||||
|
|
||||||
Note that you must 'start' an instance of Connection to begin receiving messages. For example:
|
Note that you must 'start' an instance of Connection to begin receiving messages. For example:
|
||||||
|
|
||||||
conn = stomp.Connection([('localhost', 62003)], 'myuser', 'mypass')
|
conn = stomp.Connection([('localhost', 62003)], 'myuser', 'mypass')
|
||||||
conn.start()
|
conn.start()
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
License: http://www.apache.org/licenses/LICENSE-2.0
|
License: http://www.apache.org/licenses/LICENSE-2.0
|
||||||
Start Date: 2005/12/01
|
Start Date: 2005/12/01
|
||||||
Last Revision Date: $Date: 2008/09/11 00:16 $
|
Last Revision Date: $Date: 2008/09/11 00:16 $
|
||||||
|
|
||||||
Notes/Attribution
|
Notes/Attribution
|
||||||
-----------------
|
-----------------
|
||||||
* uuid method courtesy of Carl Free Jr:
|
* uuid method courtesy of Carl Free Jr:
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
* patches from Julian Scheid of Rising Sun Pictures (http://open.rsp.com.au)
|
* patches from Julian Scheid of Rising Sun Pictures (http://open.rsp.com.au)
|
||||||
* patch from Fernando
|
* patch from Fernando
|
||||||
* patches from Eugene Strulyov
|
* patches from Eugene Strulyov
|
||||||
|
|
||||||
Updates
|
Updates
|
||||||
-------
|
-------
|
||||||
* 2007/03/31 : (Andreas Schobel) patch to fix newlines problem in ActiveMQ 4.1
|
* 2007/03/31 : (Andreas Schobel) patch to fix newlines problem in ActiveMQ 4.1
|
||||||
|
@ -57,18 +57,18 @@
|
||||||
* 2007/09/05 : (Julian Scheid) patch to allow sending custom headers
|
* 2007/09/05 : (Julian Scheid) patch to allow sending custom headers
|
||||||
* 2007/09/18 : (JRB) changed code to use logging instead of just print. added logger for jython to work
|
* 2007/09/18 : (JRB) changed code to use logging instead of just print. added logger for jython to work
|
||||||
* 2007/09/18 : (Julian Scheid) various updates, including:
|
* 2007/09/18 : (Julian Scheid) various updates, including:
|
||||||
- change incoming message handling so that callbacks are invoked on the listener not only for MESSAGE, but also for
|
- change incoming message handling so that callbacks are invoked on the listener not only for MESSAGE, but also for
|
||||||
CONNECTED, RECEIPT and ERROR frames.
|
CONNECTED, RECEIPT and ERROR frames.
|
||||||
- callbacks now get not only the payload but any headers specified by the server
|
- callbacks now get not only the payload but any headers specified by the server
|
||||||
- all outgoing messages now sent via a single method
|
- all outgoing messages now sent via a single method
|
||||||
- only one connection used
|
- only one connection used
|
||||||
- change to use thread instead of threading
|
- change to use thread instead of threading
|
||||||
- sends performed on the calling thread
|
- sends performed on the calling thread
|
||||||
- receiver loop now deals with multiple messages in one received chunk of data
|
- receiver loop now deals with multiple messages in one received chunk of data
|
||||||
- added reconnection attempts and connection fail-over
|
- added reconnection attempts and connection fail-over
|
||||||
- changed defaults for "user" and "passcode" to None instead of empty string (fixed transmission of those values)
|
- changed defaults for "user" and "passcode" to None instead of empty string (fixed transmission of those values)
|
||||||
- added readline support
|
- added readline support
|
||||||
* 2008/03/26 : (Fernando) added cStringIO for faster performance on large messages
|
* 2008/03/26 : (Fernando) added cStringIO for faster performance on large messages
|
||||||
* 2008/09/10 : (Eugene) remove lower() on headers to support case-sensitive header names
|
* 2008/09/10 : (Eugene) remove lower() on headers to support case-sensitive header names
|
||||||
* 2008/09/11 : (JRB) fix incompatibilities with RabbitMQ, add wait for socket-connect
|
* 2008/09/11 : (JRB) fix incompatibilities with RabbitMQ, add wait for socket-connect
|
||||||
* 2008/10/28 : (Eugene) add jms map (from stomp1.1 ideas)
|
* 2008/10/28 : (Eugene) add jms map (from stomp1.1 ideas)
|
||||||
|
@ -105,10 +105,10 @@ def _uuid( *args ):
|
||||||
uuid courtesy of Carl Free Jr:
|
uuid courtesy of Carl Free Jr:
|
||||||
(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213761)
|
(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213761)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
t = long( time.time() * 1000 )
|
t = long( time.time() * 1000 )
|
||||||
r = long( random.random() * 100000000000000000L )
|
r = long( random.random() * 100000000000000000L )
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a = socket.gethostbyname( socket.gethostname() )
|
a = socket.gethostbyname( socket.gethostname() )
|
||||||
except:
|
except:
|
||||||
|
@ -119,7 +119,7 @@ def _uuid( *args ):
|
||||||
md5.update(data)
|
md5.update(data)
|
||||||
data = md5.hexdigest()
|
data = md5.hexdigest()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
class DevNullLogger(object):
|
class DevNullLogger(object):
|
||||||
"""
|
"""
|
||||||
|
@ -127,17 +127,17 @@ class DevNullLogger(object):
|
||||||
"""
|
"""
|
||||||
def log(self, msg):
|
def log(self, msg):
|
||||||
print msg
|
print msg
|
||||||
|
|
||||||
def devnull(self, msg):
|
def devnull(self, msg):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
debug = devnull
|
debug = devnull
|
||||||
info = devnull
|
info = devnull
|
||||||
warning = log
|
warning = log
|
||||||
error = log
|
error = log
|
||||||
critical = log
|
critical = log
|
||||||
exception = log
|
exception = log
|
||||||
|
|
||||||
def isEnabledFor(self, lvl):
|
def isEnabledFor(self, lvl):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ try:
|
||||||
except:
|
except:
|
||||||
log = DevNullLogger()
|
log = DevNullLogger()
|
||||||
|
|
||||||
|
|
||||||
class ConnectionClosedException(Exception):
|
class ConnectionClosedException(Exception):
|
||||||
"""
|
"""
|
||||||
Raised in the receiver thread when the connection has been closed
|
Raised in the receiver thread when the connection has been closed
|
||||||
|
@ -255,8 +255,8 @@ class Connection(object):
|
||||||
Represents a STOMP client connection.
|
Represents a STOMP client connection.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
host_and_ports = [ ('localhost', 61613) ],
|
host_and_ports = [ ('localhost', 61613) ],
|
||||||
user = None,
|
user = None,
|
||||||
passcode = None,
|
passcode = None,
|
||||||
prefer_localhost = True,
|
prefer_localhost = True,
|
||||||
|
@ -268,25 +268,25 @@ class Connection(object):
|
||||||
"""
|
"""
|
||||||
Initialize and start this connection.
|
Initialize and start this connection.
|
||||||
|
|
||||||
\param host_and_ports
|
\param host_and_ports
|
||||||
a list of (host, port) tuples.
|
a list of (host, port) tuples.
|
||||||
|
|
||||||
\param prefer_localhost
|
\param prefer_localhost
|
||||||
if True and the local host is mentioned in the (host,
|
if True and the local host is mentioned in the (host,
|
||||||
port) tuples, try to connect to this first
|
port) tuples, try to connect to this first
|
||||||
|
|
||||||
\param try_loopback_connect
|
\param try_loopback_connect
|
||||||
if True and the local host is found in the host
|
if True and the local host is found in the host
|
||||||
tuples, try connecting to it using loopback interface
|
tuples, try connecting to it using loopback interface
|
||||||
(127.0.0.1)
|
(127.0.0.1)
|
||||||
|
|
||||||
\param reconnect_sleep_initial
|
\param reconnect_sleep_initial
|
||||||
|
|
||||||
initial delay in seconds to wait before reattempting
|
initial delay in seconds to wait before reattempting
|
||||||
to establish a connection if connection to any of the
|
to establish a connection if connection to any of the
|
||||||
hosts fails.
|
hosts fails.
|
||||||
|
|
||||||
\param reconnect_sleep_increase
|
\param reconnect_sleep_increase
|
||||||
|
|
||||||
factor by which the sleep delay is increased after
|
factor by which the sleep delay is increased after
|
||||||
each connection attempt. For example, 0.5 means
|
each connection attempt. For example, 0.5 means
|
||||||
|
@ -318,7 +318,7 @@ class Connection(object):
|
||||||
def is_local_host(host):
|
def is_local_host(host):
|
||||||
return host in Connection.__localhost_names
|
return host in Connection.__localhost_names
|
||||||
|
|
||||||
sorted_host_and_ports.sort(lambda x, y: (int(is_local_host(y[0]))
|
sorted_host_and_ports.sort(lambda x, y: (int(is_local_host(y[0]))
|
||||||
- int(is_local_host(x[0]))))
|
- int(is_local_host(x[0]))))
|
||||||
|
|
||||||
# If the user wishes to attempt connecting to local ports
|
# If the user wishes to attempt connecting to local ports
|
||||||
|
@ -330,7 +330,7 @@ class Connection(object):
|
||||||
for host_and_port in sorted_host_and_ports:
|
for host_and_port in sorted_host_and_ports:
|
||||||
if is_local_host(host_and_port[0]):
|
if is_local_host(host_and_port[0]):
|
||||||
port = host_and_port[1]
|
port = host_and_port[1]
|
||||||
if (not ("127.0.0.1", port) in sorted_host_and_ports
|
if (not ("127.0.0.1", port) in sorted_host_and_ports
|
||||||
and not ("localhost", port) in sorted_host_and_ports):
|
and not ("localhost", port) in sorted_host_and_ports):
|
||||||
loopback_host_and_ports.append(("127.0.0.1", port))
|
loopback_host_and_ports.append(("127.0.0.1", port))
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ class Connection(object):
|
||||||
self.__reconnect_sleep_increase = reconnect_sleep_increase
|
self.__reconnect_sleep_increase = reconnect_sleep_increase
|
||||||
self.__reconnect_sleep_jitter = reconnect_sleep_jitter
|
self.__reconnect_sleep_jitter = reconnect_sleep_jitter
|
||||||
self.__reconnect_sleep_max = reconnect_sleep_max
|
self.__reconnect_sleep_max = reconnect_sleep_max
|
||||||
|
|
||||||
self.__connect_headers = {}
|
self.__connect_headers = {}
|
||||||
if user is not None and passcode is not None:
|
if user is not None and passcode is not None:
|
||||||
self.__connect_headers['login'] = user
|
self.__connect_headers['login'] = user
|
||||||
|
@ -393,20 +393,20 @@ class Connection(object):
|
||||||
connection.
|
connection.
|
||||||
"""
|
"""
|
||||||
return self.__current_host_and_port
|
return self.__current_host_and_port
|
||||||
|
|
||||||
def is_connected(self):
|
def is_connected(self):
|
||||||
try:
|
try:
|
||||||
return self.__socket is not None and self.__socket.getsockname()[1] != 0
|
return self.__socket is not None and self.__socket.getsockname()[1] != 0
|
||||||
except socket.error:
|
except socket.error:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
#
|
#
|
||||||
# Manage objects listening to incoming frames
|
# Manage objects listening to incoming frames
|
||||||
#
|
#
|
||||||
|
|
||||||
def add_listener(self, listener):
|
def add_listener(self, listener):
|
||||||
self.__listeners.append(listener)
|
self.__listeners.append(listener)
|
||||||
|
|
||||||
def remove_listener(self, listener):
|
def remove_listener(self, listener):
|
||||||
self.__listeners.remove(listener)
|
self.__listeners.remove(listener)
|
||||||
|
|
||||||
|
@ -419,29 +419,29 @@ class Connection(object):
|
||||||
|
|
||||||
def unsubscribe(self, headers={}, **keyword_headers):
|
def unsubscribe(self, headers={}, **keyword_headers):
|
||||||
self.__send_frame_helper('UNSUBSCRIBE', '', self.__merge_headers([headers, keyword_headers]), [ ('destination', 'id') ])
|
self.__send_frame_helper('UNSUBSCRIBE', '', self.__merge_headers([headers, keyword_headers]), [ ('destination', 'id') ])
|
||||||
|
|
||||||
def send(self, message='', headers={}, **keyword_headers):
|
def send(self, message='', headers={}, **keyword_headers):
|
||||||
if '\x00' in message:
|
if '\x00' in message:
|
||||||
content_length_headers = {'content-length': len(message)}
|
content_length_headers = {'content-length': len(message)}
|
||||||
else:
|
else:
|
||||||
content_length_headers = {}
|
content_length_headers = {}
|
||||||
self.__send_frame_helper('SEND', message, self.__merge_headers([headers,
|
self.__send_frame_helper('SEND', message, self.__merge_headers([headers,
|
||||||
keyword_headers,
|
keyword_headers,
|
||||||
content_length_headers]), [ 'destination' ])
|
content_length_headers]), [ 'destination' ])
|
||||||
|
|
||||||
def ack(self, headers={}, **keyword_headers):
|
def ack(self, headers={}, **keyword_headers):
|
||||||
self.__send_frame_helper('ACK', '', self.__merge_headers([headers, keyword_headers]), [ 'message-id' ])
|
self.__send_frame_helper('ACK', '', self.__merge_headers([headers, keyword_headers]), [ 'message-id' ])
|
||||||
|
|
||||||
def begin(self, headers={}, **keyword_headers):
|
def begin(self, headers={}, **keyword_headers):
|
||||||
use_headers = self.__merge_headers([headers, keyword_headers])
|
use_headers = self.__merge_headers([headers, keyword_headers])
|
||||||
if not 'transaction' in use_headers.keys():
|
if not 'transaction' in use_headers.keys():
|
||||||
use_headers['transaction'] = _uuid()
|
use_headers['transaction'] = _uuid()
|
||||||
self.__send_frame_helper('BEGIN', '', use_headers, [ 'transaction' ])
|
self.__send_frame_helper('BEGIN', '', use_headers, [ 'transaction' ])
|
||||||
return use_headers['transaction']
|
return use_headers['transaction']
|
||||||
|
|
||||||
def abort(self, headers={}, **keyword_headers):
|
def abort(self, headers={}, **keyword_headers):
|
||||||
self.__send_frame_helper('ABORT', '', self.__merge_headers([headers, keyword_headers]), [ 'transaction' ])
|
self.__send_frame_helper('ABORT', '', self.__merge_headers([headers, keyword_headers]), [ 'transaction' ])
|
||||||
|
|
||||||
def commit(self, headers={}, **keyword_headers):
|
def commit(self, headers={}, **keyword_headers):
|
||||||
self.__send_frame_helper('COMMIT', '', self.__merge_headers([headers, keyword_headers]), [ 'transaction' ])
|
self.__send_frame_helper('COMMIT', '', self.__merge_headers([headers, keyword_headers]), [ 'transaction' ])
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ class Connection(object):
|
||||||
while not self.is_connected(): time.sleep(0.1)
|
while not self.is_connected(): time.sleep(0.1)
|
||||||
del keyword_headers['wait']
|
del keyword_headers['wait']
|
||||||
self.__send_frame_helper('CONNECT', '', self.__merge_headers([self.__connect_headers, headers, keyword_headers]), [ ])
|
self.__send_frame_helper('CONNECT', '', self.__merge_headers([self.__connect_headers, headers, keyword_headers]), [ ])
|
||||||
|
|
||||||
def disconnect(self, headers={}, **keyword_headers):
|
def disconnect(self, headers={}, **keyword_headers):
|
||||||
self.__send_frame_helper('DISCONNECT', '', self.__merge_headers([self.__connect_headers, headers, keyword_headers]), [ ])
|
self.__send_frame_helper('DISCONNECT', '', self.__merge_headers([self.__connect_headers, headers, keyword_headers]), [ ])
|
||||||
self.__running = False
|
self.__running = False
|
||||||
|
@ -475,7 +475,7 @@ class Connection(object):
|
||||||
#
|
#
|
||||||
# Used to parse STOMP header lines in the format "key:value",
|
# Used to parse STOMP header lines in the format "key:value",
|
||||||
#
|
#
|
||||||
__header_line_re = re.compile('(?P<key>[^:]+)[:](?P<value>.*)')
|
__header_line_re = re.compile('(?P<key>[^:]+)[:](?P<value>.*)')
|
||||||
|
|
||||||
#
|
#
|
||||||
# Used to parse the STOMP "content-length" header lines,
|
# Used to parse the STOMP "content-length" header lines,
|
||||||
|
@ -493,7 +493,7 @@ class Connection(object):
|
||||||
for header_key in header_map.keys():
|
for header_key in header_map.keys():
|
||||||
headers[header_key] = header_map[header_key]
|
headers[header_key] = header_map[header_key]
|
||||||
return headers
|
return headers
|
||||||
|
|
||||||
def __convert_dict(self, payload):
|
def __convert_dict(self, payload):
|
||||||
"""
|
"""
|
||||||
Encode python dictionary as <map>...</map> structure.
|
Encode python dictionary as <map>...</map> structure.
|
||||||
|
@ -546,12 +546,12 @@ class Connection(object):
|
||||||
"""
|
"""
|
||||||
if type(payload) == dict:
|
if type(payload) == dict:
|
||||||
headers["transformation"] = "jms-map-xml"
|
headers["transformation"] = "jms-map-xml"
|
||||||
payload = self.__convert_dict(payload)
|
payload = self.__convert_dict(payload)
|
||||||
|
|
||||||
if self.__socket is not None:
|
if self.__socket is not None:
|
||||||
frame = '%s\n%s\n%s\x00' % (command,
|
frame = '%s\n%s\n%s\x00' % (command,
|
||||||
reduce(lambda accu, key: accu + ('%s:%s\n' % (key, headers[key])), headers.keys(), ''),
|
reduce(lambda accu, key: accu + ('%s:%s\n' % (key, headers[key])), headers.keys(), ''),
|
||||||
payload)
|
payload)
|
||||||
self.__socket.sendall(frame)
|
self.__socket.sendall(frame)
|
||||||
log.debug("Sent frame: type=%s, headers=%r, body=%r" % (command, headers, payload))
|
log.debug("Sent frame: type=%s, headers=%r, body=%r" % (command, headers, payload))
|
||||||
else:
|
else:
|
||||||
|
@ -575,23 +575,23 @@ class Connection(object):
|
||||||
for listener in self.__listeners:
|
for listener in self.__listeners:
|
||||||
if hasattr(listener, 'on_connecting'):
|
if hasattr(listener, 'on_connecting'):
|
||||||
listener.on_connecting(self.__current_host_and_port)
|
listener.on_connecting(self.__current_host_and_port)
|
||||||
|
|
||||||
while self.__running:
|
while self.__running:
|
||||||
frames = self.__read()
|
frames = self.__read()
|
||||||
|
|
||||||
for frame in frames:
|
for frame in frames:
|
||||||
(frame_type, headers, body) = self.__parse_frame(frame)
|
(frame_type, headers, body) = self.__parse_frame(frame)
|
||||||
log.debug("Received frame: result=%r, headers=%r, body=%r" % (frame_type, headers, body))
|
log.debug("Received frame: result=%r, headers=%r, body=%r" % (frame_type, headers, body))
|
||||||
frame_type = frame_type.lower()
|
frame_type = frame_type.lower()
|
||||||
if frame_type in [ 'connected',
|
if frame_type in [ 'connected',
|
||||||
'message',
|
'message',
|
||||||
'receipt',
|
'receipt',
|
||||||
'error' ]:
|
'error' ]:
|
||||||
for listener in self.__listeners:
|
for listener in self.__listeners:
|
||||||
if hasattr(listener, 'on_%s' % frame_type):
|
if hasattr(listener, 'on_%s' % frame_type):
|
||||||
eval('listener.on_%s(headers, body)' % frame_type)
|
eval('listener.on_%s(headers, body)' % frame_type)
|
||||||
else:
|
else:
|
||||||
log.debug('listener %s has no such method on_%s' % (listener, frame_type))
|
log.debug('listener %s has no such method on_%s' % (listener, frame_type))
|
||||||
else:
|
else:
|
||||||
log.warning('Unknown response frame type: "%s" (frame length was %d)' % (frame_type, len(frame)))
|
log.warning('Unknown response frame type: "%s" (frame length was %d)' % (frame_type, len(frame)))
|
||||||
finally:
|
finally:
|
||||||
|
@ -638,9 +638,9 @@ class Connection(object):
|
||||||
if '\x00' in c:
|
if '\x00' in c:
|
||||||
break
|
break
|
||||||
self.__recvbuf += fastbuf.getvalue()
|
self.__recvbuf += fastbuf.getvalue()
|
||||||
fastbuf.close()
|
fastbuf.close()
|
||||||
result = []
|
result = []
|
||||||
|
|
||||||
if len(self.__recvbuf) > 0 and self.__running:
|
if len(self.__recvbuf) > 0 and self.__running:
|
||||||
while True:
|
while True:
|
||||||
pos = self.__recvbuf.find('\x00')
|
pos = self.__recvbuf.find('\x00')
|
||||||
|
@ -669,7 +669,7 @@ class Connection(object):
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def __transform(self, body, transType):
|
def __transform(self, body, transType):
|
||||||
"""
|
"""
|
||||||
|
@ -677,7 +677,7 @@ class Connection(object):
|
||||||
'jms-map-xml', which converts a map into python dictionary. This can be extended
|
'jms-map-xml', which converts a map into python dictionary. This can be extended
|
||||||
to support other transformation types.
|
to support other transformation types.
|
||||||
|
|
||||||
The body has the following format:
|
The body has the following format:
|
||||||
<map>
|
<map>
|
||||||
<entry>
|
<entry>
|
||||||
<string>name</string>
|
<string>name</string>
|
||||||
|
@ -710,7 +710,7 @@ class Connection(object):
|
||||||
except Exception, ex:
|
except Exception, ex:
|
||||||
# unable to parse message. return original
|
# unable to parse message. return original
|
||||||
return body
|
return body
|
||||||
|
|
||||||
|
|
||||||
def __parse_frame(self, frame):
|
def __parse_frame(self, frame):
|
||||||
"""
|
"""
|
||||||
|
@ -769,8 +769,8 @@ class Connection(object):
|
||||||
log.warning("Could not connect to host %s, port %s: %s" % (host_and_port[0], host_and_port[1], exc))
|
log.warning("Could not connect to host %s, port %s: %s" % (host_and_port[0], host_and_port[1], exc))
|
||||||
|
|
||||||
if self.__socket is None:
|
if self.__socket is None:
|
||||||
sleep_duration = (min(self.__reconnect_sleep_max,
|
sleep_duration = (min(self.__reconnect_sleep_max,
|
||||||
((self.__reconnect_sleep_initial / (1.0 + self.__reconnect_sleep_increase))
|
((self.__reconnect_sleep_initial / (1.0 + self.__reconnect_sleep_increase))
|
||||||
* math.pow(1.0 + self.__reconnect_sleep_increase, sleep_exp)))
|
* math.pow(1.0 + self.__reconnect_sleep_increase, sleep_exp)))
|
||||||
* (1.0 + random.random() * self.__reconnect_sleep_jitter))
|
* (1.0 + random.random() * self.__reconnect_sleep_jitter))
|
||||||
sleep_end = time.time() + sleep_duration
|
sleep_end = time.time() + sleep_duration
|
||||||
|
@ -790,9 +790,9 @@ if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
import readline
|
import readline
|
||||||
def stomp_completer(text, state):
|
def stomp_completer(text, state):
|
||||||
commands = [ 'subscribe', 'unsubscribe',
|
commands = [ 'subscribe', 'unsubscribe',
|
||||||
'send', 'ack',
|
'send', 'ack',
|
||||||
'begin', 'abort', 'commit',
|
'begin', 'abort', 'commit',
|
||||||
'connect', 'disconnect'
|
'connect', 'disconnect'
|
||||||
]
|
]
|
||||||
for command in commands[state:]:
|
for command in commands[state:]:
|
||||||
|
@ -839,44 +839,44 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
def on_connected(self, headers, body):
|
def on_connected(self, headers, body):
|
||||||
self.__print_async("CONNECTED", headers, body)
|
self.__print_async("CONNECTED", headers, body)
|
||||||
|
|
||||||
def ack(self, args):
|
def ack(self, args):
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
self.c.ack(message_id=args[1])
|
self.c.ack(message_id=args[1])
|
||||||
else:
|
else:
|
||||||
self.c.ack(message_id=args[1], transaction=args[2])
|
self.c.ack(message_id=args[1], transaction=args[2])
|
||||||
|
|
||||||
def abort(self, args):
|
def abort(self, args):
|
||||||
self.c.abort(transaction=args[1])
|
self.c.abort(transaction=args[1])
|
||||||
|
|
||||||
def begin(self, args):
|
def begin(self, args):
|
||||||
print 'transaction id: %s' % self.c.begin()
|
print 'transaction id: %s' % self.c.begin()
|
||||||
|
|
||||||
def commit(self, args):
|
def commit(self, args):
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print 'expecting: commit <transid>'
|
print 'expecting: commit <transid>'
|
||||||
else:
|
else:
|
||||||
print 'committing %s' % args[1]
|
print 'committing %s' % args[1]
|
||||||
self.c.commit(transaction=args[1])
|
self.c.commit(transaction=args[1])
|
||||||
|
|
||||||
def disconnect(self, args):
|
def disconnect(self, args):
|
||||||
try:
|
try:
|
||||||
self.c.disconnect()
|
self.c.disconnect()
|
||||||
except NotConnectedException:
|
except NotConnectedException:
|
||||||
pass # ignore if no longer connected
|
pass # ignore if no longer connected
|
||||||
|
|
||||||
def send(self, args):
|
def send(self, args):
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
print 'expecting: send <destination> <message>'
|
print 'expecting: send <destination> <message>'
|
||||||
else:
|
else:
|
||||||
self.c.send(destination=args[1], message=' '.join(args[2:]))
|
self.c.send(destination=args[1], message=' '.join(args[2:]))
|
||||||
|
|
||||||
def sendtrans(self, args):
|
def sendtrans(self, args):
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
print 'expecting: sendtrans <destination> <transid> <message>'
|
print 'expecting: sendtrans <destination> <transid> <message>'
|
||||||
else:
|
else:
|
||||||
self.c.send(destination=args[1], message="%s\n" % ' '.join(args[3:]), transaction=args[2])
|
self.c.send(destination=args[1], message="%s\n" % ' '.join(args[3:]), transaction=args[2])
|
||||||
|
|
||||||
def subscribe(self, args):
|
def subscribe(self, args):
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print 'expecting: subscribe <destination> [ack]'
|
print 'expecting: subscribe <destination> [ack]'
|
||||||
|
@ -886,7 +886,7 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
print 'subscribing to "%s" with auto acknowledge' % args[1]
|
print 'subscribing to "%s" with auto acknowledge' % args[1]
|
||||||
self.c.subscribe(destination=args[1], ack='auto')
|
self.c.subscribe(destination=args[1], ack='auto')
|
||||||
|
|
||||||
def unsubscribe(self, args):
|
def unsubscribe(self, args):
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print 'expecting: unsubscribe <destination>'
|
print 'expecting: unsubscribe <destination>'
|
||||||
|
@ -906,14 +906,14 @@ if __name__ == '__main__':
|
||||||
port = int(sys.argv[2])
|
port = int(sys.argv[2])
|
||||||
else:
|
else:
|
||||||
port = 61613
|
port = 61613
|
||||||
|
|
||||||
if len(sys.argv) >= 5:
|
if len(sys.argv) >= 5:
|
||||||
user = sys.argv[3]
|
user = sys.argv[3]
|
||||||
passcode = sys.argv[4]
|
passcode = sys.argv[4]
|
||||||
else:
|
else:
|
||||||
user = None
|
user = None
|
||||||
passcode = None
|
passcode = None
|
||||||
|
|
||||||
st = StompTester(host, port, user, passcode)
|
st = StompTester(host, port, user, passcode)
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -23,15 +23,15 @@
|
||||||
# Pure python logging mechanism for logging to AlertViz from
|
# Pure python logging mechanism for logging to AlertViz from
|
||||||
# pure python (ie not JEP). DO NOT USE IN PYTHON CALLED
|
# pure python (ie not JEP). DO NOT USE IN PYTHON CALLED
|
||||||
# FROM JAVA.
|
# FROM JAVA.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 11/03/10 5849 cjeanbap Initial Creation.
|
# 11/03/10 5849 cjeanbap Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -43,6 +43,6 @@ class Record():
|
||||||
self.message=msg
|
self.message=msg
|
||||||
self.exc_info=sys.exc_info()
|
self.exc_info=sys.exc_info()
|
||||||
self.exc_text="TEST"
|
self.exc_text="TEST"
|
||||||
|
|
||||||
def getMessage(self):
|
def getMessage(self):
|
||||||
return self.message
|
return self.message
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -23,15 +23,15 @@
|
||||||
# Pure python logging mechanism for logging to AlertViz from
|
# Pure python logging mechanism for logging to AlertViz from
|
||||||
# pure python (ie not JEP). DO NOT USE IN PYTHON CALLED
|
# pure python (ie not JEP). DO NOT USE IN PYTHON CALLED
|
||||||
# FROM JAVA.
|
# FROM JAVA.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 11/03/10 5849 cjeanbap Initial Creation.
|
# 11/03/10 5849 cjeanbap Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
## to execute type python Test
|
## to execute type python Test
|
||||||
|
@ -45,4 +45,4 @@ import Record
|
||||||
avh = AlertVizHandler.AlertVizHandler(host=os.getenv("BROKER_ADDR","localhost"), port=9581, category='LOCAL', source='ANNOUNCER', level=logging.NOTSET)
|
avh = AlertVizHandler.AlertVizHandler(host=os.getenv("BROKER_ADDR","localhost"), port=9581, category='LOCAL', source='ANNOUNCER', level=logging.NOTSET)
|
||||||
record = Record.Record(10)
|
record = Record.Record(10)
|
||||||
avh.emit(record)
|
avh.emit(record)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# __init__.py for awips package
|
# __init__.py for awips package
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 11/03/10 5489 cjeanbap Initial Creation.
|
# 11/03/10 5489 cjeanbap Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 03/09/11 njensen Initial Creation.
|
# 03/09/11 njensen Initial Creation.
|
||||||
# 08/15/13 2169 bkowal Decompress data read from the queue
|
# 08/15/13 2169 bkowal Decompress data read from the queue
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import time, sys
|
import time, sys
|
||||||
|
@ -50,12 +50,12 @@ class ListenThread(threading.Thread):
|
||||||
self.waitSecond = 0
|
self.waitSecond = 0
|
||||||
self.stopped = False
|
self.stopped = False
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
from awips import QpidSubscriber
|
from awips import QpidSubscriber
|
||||||
self.qs = QpidSubscriber.QpidSubscriber(self.hostname, self.portNumber, True)
|
self.qs = QpidSubscriber.QpidSubscriber(self.hostname, self.portNumber, True)
|
||||||
self.qs.topicSubscribe(self.topicName, self.receivedMessage)
|
self.qs.topicSubscribe(self.topicName, self.receivedMessage)
|
||||||
|
|
||||||
def receivedMessage(self, msg):
|
def receivedMessage(self, msg):
|
||||||
print "Received message"
|
print "Received message"
|
||||||
self.nMessagesReceived += 1
|
self.nMessagesReceived += 1
|
||||||
|
@ -63,29 +63,28 @@ class ListenThread(threading.Thread):
|
||||||
fmsg = open('/tmp/rawMessage', 'w')
|
fmsg = open('/tmp/rawMessage', 'w')
|
||||||
fmsg.write(msg)
|
fmsg.write(msg)
|
||||||
fmsg.close()
|
fmsg.close()
|
||||||
|
|
||||||
while self.waitSecond < TIME_TO_SLEEP and not self.stopped:
|
while self.waitSecond < TIME_TO_SLEEP and not self.stopped:
|
||||||
if self.waitSecond % 60 == 0:
|
if self.waitSecond % 60 == 0:
|
||||||
print time.strftime('%H:%M:%S'), "Sleeping and stuck in not so infinite while loop"
|
print time.strftime('%H:%M:%S'), "Sleeping and stuck in not so infinite while loop"
|
||||||
self.waitSecond += 1
|
self.waitSecond += 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
print time.strftime('%H:%M:%S'), "Received", self.nMessagesReceived, "messages"
|
print time.strftime('%H:%M:%S'), "Received", self.nMessagesReceived, "messages"
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
print "Stopping"
|
print "Stopping"
|
||||||
self.stopped = True
|
self.stopped = True
|
||||||
self.qs.close()
|
self.qs.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print "Starting up at", time.strftime('%H:%M:%S')
|
print "Starting up at", time.strftime('%H:%M:%S')
|
||||||
|
|
||||||
topic = 'edex.alerts'
|
topic = 'edex.alerts'
|
||||||
host = 'localhost'
|
host = 'localhost'
|
||||||
port = 5672
|
port = 5672
|
||||||
|
|
||||||
thread = ListenThread(host, port, topic)
|
thread = ListenThread(host, port, topic)
|
||||||
try:
|
try:
|
||||||
thread.start()
|
thread.start()
|
||||||
|
@ -95,10 +94,6 @@ def main():
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
thread.stop()
|
thread.stop()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||||
|
|
||||||
<bean id="obsDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
|
<bean id="obsDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
|
||||||
|
|
||||||
<bean factory-bean="obsDataAccessFactory" factory-method="register2D">
|
<bean factory-bean="obsDataAccessFactory" factory-method="register2D">
|
||||||
<!-- There is no counter field. -->
|
<!-- There is no counter field. -->
|
||||||
<constructor-arg ><null /></constructor-arg>
|
<constructor-arg ><null /></constructor-arg>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
</list>
|
</list>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean factory-bean="obsDataAccessFactory" factory-method="register2D">
|
<bean factory-bean="obsDataAccessFactory" factory-method="register2D">
|
||||||
<!-- There are no counter or layer fields. -->
|
<!-- There are no counter or layer fields. -->
|
||||||
<constructor-arg><null /></constructor-arg>
|
<constructor-arg><null /></constructor-arg>
|
||||||
|
@ -30,10 +30,10 @@
|
||||||
</list>
|
</list>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean factory-bean="dataAccessRegistry" factory-method="register">
|
<bean factory-bean="dataAccessRegistry" factory-method="register">
|
||||||
<constructor-arg value="obs"/>
|
<constructor-arg value="obs"/>
|
||||||
<constructor-arg ref="obsDataAccessFactory"/>
|
<constructor-arg ref="obsDataAccessFactory"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|
|
@ -71,13 +71,12 @@ shapely 1.5.9 awips2-python-shapely
|
||||||
matplotlib 1.5.1 awips2-python-matplotlib
|
matplotlib 1.5.1 awips2-python-matplotlib
|
||||||
cython 0.23.4 awips2-python-cython
|
cython 0.23.4 awips2-python-cython
|
||||||
pil 1.1.6 awips2-python-pil
|
pil 1.1.6 awips2-python-pil
|
||||||
thrift 20080411p1 awips2-python-thrift
|
thrift 20080411p1 **awips2-python-awips**
|
||||||
cartopy 0.13.0 awips2-python-cartopy
|
cartopy 0.13.0 awips2-python-cartopy
|
||||||
nose 0.11.1 awips2-python-nose
|
nose 0.11.1 awips2-python-nose
|
||||||
pmw 1.3.2 awips2-python-pmw
|
pmw 1.3.2 awips2-python-pmw
|
||||||
h5py 1.3.0 awips2-python-h5py
|
h5py 1.3.0 awips2-python-h5py
|
||||||
tables 2.1.2 awips2-python-tables
|
tables 2.1.2 awips2-python-tables
|
||||||
dynamicserialize 15.1.2 awips2-python-dynamicserialize
|
|
||||||
qpid 0.32 awips2-python-qpid
|
qpid 0.32 awips2-python-qpid
|
||||||
====================== ============== ==============================
|
====================== ============== ==============================
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ An example of the spring xml for a satellite factory is provided below:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
<bean id="satelliteFactory"
|
<bean id="satelliteFactory"
|
||||||
class="com.raytheon.uf.common.dataplugin.satellite.SatelliteFactory" />
|
class="com.raytheon.uf.common.dataplugin.satellite.SatelliteFactory" />
|
||||||
|
|
||||||
<bean id="satelliteFactoryRegistered" factory-bean="dataFactoryRegistry" factory-method="register">
|
<bean id="satelliteFactoryRegistered" factory-bean="dataFactoryRegistry" factory-method="register">
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
=====
|
==================================
|
||||||
Python AWIPS Data Access Framework
|
Python AWIPS Data Access Framework
|
||||||
=====
|
==================================
|
||||||
|
|
||||||
.. raw:: html
|
|
||||||
|
|
||||||
The `python-awips <https://github.com/Unidata/python-awips>`_ package provides a Data Access Framework (DAF) for requesting data from a remote AWIPS II EDEX server.
|
The `python-awips <https://github.com/Unidata/python-awips>`_ package provides a Data Access Framework (DAF) for requesting data from a remote AWIPS II EDEX server.
|
||||||
|
|
||||||
The `AWIPS II Python Stack <about.html#awips-ii-python-stack>`_ installed via RPM contains the DAF, matplotlib, numpy, scipy, basemap, pint, shapely, and other packages.
|
The `AWIPS II Python Stack <about.html#awips-ii-python-stack>`_ installed via RPM contains the DAF, matplotlib, numpy, scipy, basemap, pint, shapely, and other packages.
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
Documentation
|
Documentation
|
||||||
|
|
|
@ -6,7 +6,7 @@ Install python-awips
|
||||||
Requirements
|
Requirements
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
- Python 2.7 or later
|
- Python 2.7 or later
|
||||||
- pip install numpy shapely
|
- pip install numpy shapely
|
||||||
|
|
||||||
From Github
|
From Github
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -24,46 +24,46 @@
|
||||||
# DynamicSerialize binary data.
|
# DynamicSerialize binary data.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 06/09/10 njensen Initial Creation.
|
# 06/09/10 njensen Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from thrift.transport import TTransport
|
from thrift.transport import TTransport
|
||||||
import SelfDescribingBinaryProtocol, ThriftSerializationContext
|
import SelfDescribingBinaryProtocol, ThriftSerializationContext
|
||||||
|
|
||||||
class DynamicSerializationManager:
|
class DynamicSerializationManager:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.transport = None
|
self.transport = None
|
||||||
|
|
||||||
def _deserialize(self, ctx):
|
def _deserialize(self, ctx):
|
||||||
return ctx.deserializeMessage()
|
return ctx.deserializeMessage()
|
||||||
|
|
||||||
def deserializeBytes(self, bytes):
|
def deserializeBytes(self, bytes):
|
||||||
ctx = self._buildSerializationContext(bytes)
|
ctx = self._buildSerializationContext(bytes)
|
||||||
ctx.readMessageStart()
|
ctx.readMessageStart()
|
||||||
obj = self._deserialize(ctx)
|
obj = self._deserialize(ctx)
|
||||||
ctx.readMessageEnd()
|
ctx.readMessageEnd()
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def _buildSerializationContext(self, bytes=None):
|
def _buildSerializationContext(self, bytes=None):
|
||||||
self.transport = TTransport.TMemoryBuffer(bytes)
|
self.transport = TTransport.TMemoryBuffer(bytes)
|
||||||
protocol = SelfDescribingBinaryProtocol.SelfDescribingBinaryProtocol(self.transport)
|
protocol = SelfDescribingBinaryProtocol.SelfDescribingBinaryProtocol(self.transport)
|
||||||
return ThriftSerializationContext.ThriftSerializationContext(self, protocol)
|
return ThriftSerializationContext.ThriftSerializationContext(self, protocol)
|
||||||
|
|
||||||
def serializeObject(self, obj):
|
def serializeObject(self, obj):
|
||||||
ctx = self._buildSerializationContext()
|
ctx = self._buildSerializationContext()
|
||||||
ctx.writeMessageStart("dynamicSerialize")
|
ctx.writeMessageStart("dynamicSerialize")
|
||||||
self._serialize(ctx, obj)
|
self._serialize(ctx, obj)
|
||||||
ctx.writeMessageEnd()
|
ctx.writeMessageEnd()
|
||||||
return self.transport.getvalue()
|
return self.transport.getvalue()
|
||||||
|
|
||||||
def _serialize(self, ctx, obj):
|
def _serialize(self, ctx, obj):
|
||||||
ctx.serializeMessage(obj)
|
ctx.serializeMessage(obj)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
|
@ -32,15 +32,15 @@ from struct import pack, unpack
|
||||||
# <LI> Custom Serializers
|
# <LI> Custom Serializers
|
||||||
# <LI> Inheritance
|
# <LI> Inheritance
|
||||||
# </UL>
|
# </UL>
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 11/11/09 chammack Initial Creation.
|
# 11/11/09 chammack Initial Creation.
|
||||||
# 06/09/10 njensen Added float, list methods
|
# 06/09/10 njensen Added float, list methods
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import struct, numpy
|
import struct, numpy
|
||||||
|
@ -49,12 +49,12 @@ FLOAT = 64
|
||||||
|
|
||||||
intList = numpy.dtype(numpy.int32).newbyteorder('>')
|
intList = numpy.dtype(numpy.int32).newbyteorder('>')
|
||||||
floatList = numpy.dtype(numpy.float32).newbyteorder('>')
|
floatList = numpy.dtype(numpy.float32).newbyteorder('>')
|
||||||
longList = numpy.dtype(numpy.int64).newbyteorder('>')
|
longList = numpy.dtype(numpy.int64).newbyteorder('>')
|
||||||
shortList = numpy.dtype(numpy.int16).newbyteorder('>')
|
shortList = numpy.dtype(numpy.int16).newbyteorder('>')
|
||||||
byteList = numpy.dtype(numpy.int8).newbyteorder('>')
|
byteList = numpy.dtype(numpy.int8).newbyteorder('>')
|
||||||
|
|
||||||
class SelfDescribingBinaryProtocol(TBinaryProtocol):
|
class SelfDescribingBinaryProtocol(TBinaryProtocol):
|
||||||
|
|
||||||
def readFieldBegin(self):
|
def readFieldBegin(self):
|
||||||
type = self.readByte()
|
type = self.readByte()
|
||||||
if type == TType.STOP:
|
if type == TType.STOP:
|
||||||
|
@ -64,7 +64,7 @@ class SelfDescribingBinaryProtocol(TBinaryProtocol):
|
||||||
return (name, type, id)
|
return (name, type, id)
|
||||||
|
|
||||||
def readStructBegin(self):
|
def readStructBegin(self):
|
||||||
return self.readString()
|
return self.readString()
|
||||||
|
|
||||||
def writeStructBegin(self, name):
|
def writeStructBegin(self, name):
|
||||||
self.writeString(name)
|
self.writeString(name)
|
||||||
|
@ -84,49 +84,49 @@ class SelfDescribingBinaryProtocol(TBinaryProtocol):
|
||||||
dAsBytes = struct.pack('f', f)
|
dAsBytes = struct.pack('f', f)
|
||||||
i = struct.unpack('i', dAsBytes)
|
i = struct.unpack('i', dAsBytes)
|
||||||
self.writeI32(i[0])
|
self.writeI32(i[0])
|
||||||
|
|
||||||
def readI32List(self, sz):
|
def readI32List(self, sz):
|
||||||
buff = self.trans.readAll(4*sz)
|
buff = self.trans.readAll(4*sz)
|
||||||
val = numpy.frombuffer(buff, dtype=intList, count=sz)
|
val = numpy.frombuffer(buff, dtype=intList, count=sz)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def readF32List(self, sz):
|
def readF32List(self, sz):
|
||||||
buff = self.trans.readAll(4*sz)
|
buff = self.trans.readAll(4*sz)
|
||||||
val = numpy.frombuffer(buff, dtype=floatList, count=sz)
|
val = numpy.frombuffer(buff, dtype=floatList, count=sz)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def readI64List(self, sz):
|
def readI64List(self, sz):
|
||||||
buff = self.trans.readAll(8*sz)
|
buff = self.trans.readAll(8*sz)
|
||||||
val = numpy.frombuffer(buff, dtype=longList, count=sz)
|
val = numpy.frombuffer(buff, dtype=longList, count=sz)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def readI16List(self, sz):
|
def readI16List(self, sz):
|
||||||
buff = self.trans.readAll(2*sz)
|
buff = self.trans.readAll(2*sz)
|
||||||
val = numpy.frombuffer(buff, dtype=shortList, count=sz)
|
val = numpy.frombuffer(buff, dtype=shortList, count=sz)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def readI8List(self, sz):
|
def readI8List(self, sz):
|
||||||
buff = self.trans.readAll(sz)
|
buff = self.trans.readAll(sz)
|
||||||
val = numpy.frombuffer(buff, dtype=byteList, count=sz)
|
val = numpy.frombuffer(buff, dtype=byteList, count=sz)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def writeI32List(self, buff):
|
def writeI32List(self, buff):
|
||||||
b = numpy.asarray(buff, intList)
|
b = numpy.asarray(buff, intList)
|
||||||
self.trans.write(numpy.getbuffer(b))
|
self.trans.write(numpy.getbuffer(b))
|
||||||
|
|
||||||
def writeF32List(self, buff):
|
def writeF32List(self, buff):
|
||||||
b = numpy.asarray(buff, floatList)
|
b = numpy.asarray(buff, floatList)
|
||||||
self.trans.write(numpy.getbuffer(b))
|
self.trans.write(numpy.getbuffer(b))
|
||||||
|
|
||||||
def writeI64List(self, buff):
|
def writeI64List(self, buff):
|
||||||
b = numpy.asarray(buff, longList)
|
b = numpy.asarray(buff, longList)
|
||||||
self.trans.write(numpy.getbuffer(b))
|
self.trans.write(numpy.getbuffer(b))
|
||||||
|
|
||||||
def writeI16List(self, buff):
|
def writeI16List(self, buff):
|
||||||
b = numpy.asarray(buff, shortList)
|
b = numpy.asarray(buff, shortList)
|
||||||
self.trans.write(numpy.getbuffer(b))
|
self.trans.write(numpy.getbuffer(b))
|
||||||
|
|
||||||
def writeI8List(self, buff):
|
def writeI8List(self, buff):
|
||||||
b = numpy.asarray(buff, byteList)
|
b = numpy.asarray(buff, byteList)
|
||||||
self.trans.write(numpy.getbuffer(b))
|
self.trans.write(numpy.getbuffer(b))
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -27,10 +27,10 @@
|
||||||
# languages, it is instead all based on inspecting the types of the objects
|
# languages, it is instead all based on inspecting the types of the objects
|
||||||
# passed to it. Therefore, ensure the types of python objects and primitives
|
# passed to it. Therefore, ensure the types of python objects and primitives
|
||||||
# match what they should be in the destination language.
|
# match what they should be in the destination language.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 06/09/10 njensen Initial Creation.
|
# 06/09/10 njensen Initial Creation.
|
||||||
|
@ -47,18 +47,18 @@ import SelfDescribingBinaryProtocol
|
||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
dsObjTypes = {}
|
dsObjTypes = {}
|
||||||
|
|
||||||
def buildObjMap(module):
|
def buildObjMap(module):
|
||||||
if module.__dict__.has_key('__all__'):
|
if module.__dict__.has_key('__all__'):
|
||||||
for i in module.__all__:
|
for i in module.__all__:
|
||||||
name = module.__name__ + '.' + i
|
name = module.__name__ + '.' + i
|
||||||
__import__(name)
|
__import__(name)
|
||||||
buildObjMap(sys.modules[name])
|
buildObjMap(sys.modules[name])
|
||||||
else:
|
else:
|
||||||
clzName = module.__name__[module.__name__.rfind('.') + 1:]
|
clzName = module.__name__[module.__name__.rfind('.') + 1:]
|
||||||
clz = module.__dict__[clzName]
|
clz = module.__dict__[clzName]
|
||||||
tname = module.__name__
|
tname = module.__name__
|
||||||
tname = tname.replace('dynamicserialize.dstypes.', '')
|
tname = tname.replace('dynamicserialize.dstypes.', '')
|
||||||
dsObjTypes[tname] = clz
|
dsObjTypes[tname] = clz
|
||||||
|
|
||||||
buildObjMap(dstypes)
|
buildObjMap(dstypes)
|
||||||
|
@ -89,7 +89,7 @@ pythonToThriftMap = {
|
||||||
primitiveSupport = (TType.BYTE, TType.I16, TType.I32, TType.I64, SelfDescribingBinaryProtocol.FLOAT)
|
primitiveSupport = (TType.BYTE, TType.I16, TType.I32, TType.I64, SelfDescribingBinaryProtocol.FLOAT)
|
||||||
|
|
||||||
class ThriftSerializationContext(object):
|
class ThriftSerializationContext(object):
|
||||||
|
|
||||||
def __init__(self, serializationManager, selfDescribingBinaryProtocol):
|
def __init__(self, serializationManager, selfDescribingBinaryProtocol):
|
||||||
self.serializationManager = serializationManager
|
self.serializationManager = serializationManager
|
||||||
self.protocol = selfDescribingBinaryProtocol
|
self.protocol = selfDescribingBinaryProtocol
|
||||||
|
@ -107,7 +107,7 @@ class ThriftSerializationContext(object):
|
||||||
TType.BOOL: self.protocol.readBool,
|
TType.BOOL: self.protocol.readBool,
|
||||||
TType.STRUCT: self.deserializeMessage,
|
TType.STRUCT: self.deserializeMessage,
|
||||||
TType.VOID: lambda: None
|
TType.VOID: lambda: None
|
||||||
}
|
}
|
||||||
self.typeSerializationMethod = {
|
self.typeSerializationMethod = {
|
||||||
TType.STRING: self.protocol.writeString,
|
TType.STRING: self.protocol.writeString,
|
||||||
TType.I16: self.protocol.writeI16,
|
TType.I16: self.protocol.writeI16,
|
||||||
|
@ -137,15 +137,15 @@ class ThriftSerializationContext(object):
|
||||||
TType.I64: self.protocol.writeI64List,
|
TType.I64: self.protocol.writeI64List,
|
||||||
SelfDescribingBinaryProtocol.FLOAT: self.protocol.writeF32List
|
SelfDescribingBinaryProtocol.FLOAT: self.protocol.writeF32List
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def readMessageStart(self):
|
def readMessageStart(self):
|
||||||
msg = self.protocol.readMessageBegin()
|
msg = self.protocol.readMessageBegin()
|
||||||
return msg[0]
|
return msg[0]
|
||||||
|
|
||||||
def readMessageEnd(self):
|
def readMessageEnd(self):
|
||||||
self.protocol.readMessageEnd()
|
self.protocol.readMessageEnd()
|
||||||
|
|
||||||
def deserializeMessage(self):
|
def deserializeMessage(self):
|
||||||
name = self.protocol.readStructBegin()
|
name = self.protocol.readStructBegin()
|
||||||
name = name.replace('_', '.')
|
name = name.replace('_', '.')
|
||||||
|
@ -156,29 +156,29 @@ class ThriftSerializationContext(object):
|
||||||
return adapters.classAdapterRegistry[name].deserialize(self)
|
return adapters.classAdapterRegistry[name].deserialize(self)
|
||||||
elif name.find('$') > -1:
|
elif name.find('$') > -1:
|
||||||
# it's an inner class, we're going to hope it's an enum, treat it special
|
# it's an inner class, we're going to hope it's an enum, treat it special
|
||||||
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
||||||
if fieldName != '__enumValue__':
|
if fieldName != '__enumValue__':
|
||||||
raise dynamiceserialize.SerializationException("Expected to find enum payload. Found: " + fieldName)
|
raise dynamiceserialize.SerializationException("Expected to find enum payload. Found: " + fieldName)
|
||||||
obj = self.protocol.readString()
|
obj = self.protocol.readString()
|
||||||
self.protocol.readFieldEnd()
|
self.protocol.readFieldEnd()
|
||||||
return obj
|
return obj
|
||||||
else:
|
else:
|
||||||
clz = dsObjTypes[name]
|
clz = dsObjTypes[name]
|
||||||
obj = clz()
|
obj = clz()
|
||||||
|
|
||||||
while self._deserializeField(name, obj):
|
while self._deserializeField(name, obj):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.protocol.readStructEnd()
|
self.protocol.readStructEnd()
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def _deserializeType(self, b):
|
def _deserializeType(self, b):
|
||||||
if self.typeDeserializationMethod.has_key(b):
|
if self.typeDeserializationMethod.has_key(b):
|
||||||
return self.typeDeserializationMethod[b]()
|
return self.typeDeserializationMethod[b]()
|
||||||
else:
|
else:
|
||||||
raise dynamicserialize.SerializationException("Unsupported type value " + str(b))
|
raise dynamicserialize.SerializationException("Unsupported type value " + str(b))
|
||||||
|
|
||||||
|
|
||||||
def _deserializeField(self, structname, obj):
|
def _deserializeField(self, structname, obj):
|
||||||
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
fieldName, fieldType, fieldId = self.protocol.readFieldBegin()
|
||||||
if fieldType == TType.STOP:
|
if fieldType == TType.STOP:
|
||||||
|
@ -199,11 +199,11 @@ class ThriftSerializationContext(object):
|
||||||
raise dynamicserialize.SerializationException("Couldn't find setter method " + lookingFor)
|
raise dynamicserialize.SerializationException("Couldn't find setter method " + lookingFor)
|
||||||
except:
|
except:
|
||||||
raise dynamicserialize.SerializationException("Couldn't find setter method " + lookingFor)
|
raise dynamicserialize.SerializationException("Couldn't find setter method " + lookingFor)
|
||||||
|
|
||||||
self.protocol.readFieldEnd()
|
self.protocol.readFieldEnd()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def _deserializeArray(self):
|
def _deserializeArray(self):
|
||||||
listType, size = self.protocol.readListBegin()
|
listType, size = self.protocol.readListBegin()
|
||||||
result = []
|
result = []
|
||||||
|
@ -215,39 +215,39 @@ class ThriftSerializationContext(object):
|
||||||
result = self.listDeserializationMethod[listType](size)
|
result = self.listDeserializationMethod[listType](size)
|
||||||
self.protocol.readListEnd()
|
self.protocol.readListEnd()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _deserializeMap(self):
|
def _deserializeMap(self):
|
||||||
keyType, valueType, size = self.protocol.readMapBegin()
|
keyType, valueType, size = self.protocol.readMapBegin()
|
||||||
result = {}
|
result = {}
|
||||||
for n in xrange(size):
|
for n in xrange(size):
|
||||||
# can't go off the type, due to java generics limitations dynamic serialize is
|
# can't go off the type, due to java generics limitations dynamic serialize is
|
||||||
# serializing keys and values as void
|
# serializing keys and values as void
|
||||||
key = self.typeDeserializationMethod[TType.STRUCT]()
|
key = self.typeDeserializationMethod[TType.STRUCT]()
|
||||||
value = self.typeDeserializationMethod[TType.STRUCT]()
|
value = self.typeDeserializationMethod[TType.STRUCT]()
|
||||||
result[key] = value
|
result[key] = value
|
||||||
self.protocol.readMapEnd()
|
self.protocol.readMapEnd()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _deserializeSet(self):
|
def _deserializeSet(self):
|
||||||
setType, setSize = self.protocol.readSetBegin()
|
setType, setSize = self.protocol.readSetBegin()
|
||||||
result = set([])
|
result = set([])
|
||||||
for n in xrange(setSize):
|
for n in xrange(setSize):
|
||||||
result.add(self.typeDeserializationMethod[TType.STRUCT]())
|
result.add(self.typeDeserializationMethod[TType.STRUCT]())
|
||||||
self.protocol.readSetEnd()
|
self.protocol.readSetEnd()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _lookupType(self, obj):
|
def _lookupType(self, obj):
|
||||||
pyt = type(obj)
|
pyt = type(obj)
|
||||||
if pythonToThriftMap.has_key(pyt):
|
if pythonToThriftMap.has_key(pyt):
|
||||||
return pythonToThriftMap[pyt]
|
return pythonToThriftMap[pyt]
|
||||||
elif pyt.__module__.startswith('dynamicserialize.dstypes'):
|
elif pyt.__module__.startswith('dynamicserialize.dstypes'):
|
||||||
return pythonToThriftMap[types.InstanceType]
|
return pythonToThriftMap[types.InstanceType]
|
||||||
else:
|
else:
|
||||||
raise dynamicserialize.SerializationException("Don't know how to serialize object of type: " + str(pyt))
|
raise dynamicserialize.SerializationException("Don't know how to serialize object of type: " + str(pyt))
|
||||||
|
|
||||||
def serializeMessage(self, obj):
|
def serializeMessage(self, obj):
|
||||||
tt = self._lookupType(obj)
|
tt = self._lookupType(obj)
|
||||||
|
|
||||||
if tt == TType.STRUCT:
|
if tt == TType.STRUCT:
|
||||||
fqn = obj.__module__.replace('dynamicserialize.dstypes.', '')
|
fqn = obj.__module__.replace('dynamicserialize.dstypes.', '')
|
||||||
if adapters.classAdapterRegistry.has_key(fqn):
|
if adapters.classAdapterRegistry.has_key(fqn):
|
||||||
|
@ -261,7 +261,7 @@ class ThriftSerializationContext(object):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
self.protocol.writeStructBegin(fqn)
|
self.protocol.writeStructBegin(fqn)
|
||||||
methods = inspect.getmembers(obj, inspect.ismethod)
|
methods = inspect.getmembers(obj, inspect.ismethod)
|
||||||
fid = 1
|
fid = 1
|
||||||
for m in methods:
|
for m in methods:
|
||||||
methodName = m[0]
|
methodName = m[0]
|
||||||
|
@ -276,25 +276,25 @@ class ThriftSerializationContext(object):
|
||||||
self._serializeField(fieldname, ft, fid, val)
|
self._serializeField(fieldname, ft, fid, val)
|
||||||
fid += 1
|
fid += 1
|
||||||
self.protocol.writeFieldStop()
|
self.protocol.writeFieldStop()
|
||||||
|
|
||||||
self.protocol.writeStructEnd()
|
self.protocol.writeStructEnd()
|
||||||
else:
|
else:
|
||||||
# basic types
|
# basic types
|
||||||
self.protocol.writeStructBegin(str(tt))
|
self.protocol.writeStructBegin(str(tt))
|
||||||
self._serializeType(obj, tt)
|
self._serializeType(obj, tt)
|
||||||
self.protocol.writeStructEnd()
|
self.protocol.writeStructEnd()
|
||||||
|
|
||||||
def _serializeField(self, fieldName, fieldType, fieldId, fieldValue):
|
def _serializeField(self, fieldName, fieldType, fieldId, fieldValue):
|
||||||
self.protocol.writeFieldBegin(fieldName, fieldType, fieldId)
|
self.protocol.writeFieldBegin(fieldName, fieldType, fieldId)
|
||||||
self._serializeType(fieldValue, fieldType)
|
self._serializeType(fieldValue, fieldType)
|
||||||
self.protocol.writeFieldEnd()
|
self.protocol.writeFieldEnd()
|
||||||
|
|
||||||
def _serializeType(self, fieldValue, fieldType):
|
def _serializeType(self, fieldValue, fieldType):
|
||||||
if self.typeSerializationMethod.has_key(fieldType):
|
if self.typeSerializationMethod.has_key(fieldType):
|
||||||
return self.typeSerializationMethod[fieldType](fieldValue)
|
return self.typeSerializationMethod[fieldType](fieldValue)
|
||||||
else:
|
else:
|
||||||
raise dynamicserialize.SerializationException("Unsupported type value " + str(fieldType))
|
raise dynamicserialize.SerializationException("Unsupported type value " + str(fieldType))
|
||||||
|
|
||||||
def _serializeArray(self, obj):
|
def _serializeArray(self, obj):
|
||||||
size = len(obj)
|
size = len(obj)
|
||||||
if size:
|
if size:
|
||||||
|
@ -304,21 +304,21 @@ class ThriftSerializationContext(object):
|
||||||
else:
|
else:
|
||||||
t = self._lookupType(obj[0])
|
t = self._lookupType(obj[0])
|
||||||
else:
|
else:
|
||||||
t = TType.STRUCT
|
t = TType.STRUCT
|
||||||
self.protocol.writeListBegin(t, size)
|
self.protocol.writeListBegin(t, size)
|
||||||
if t == TType.STRING:
|
if t == TType.STRING:
|
||||||
if type(obj) is numpy.ndarray:
|
if type(obj) is numpy.ndarray:
|
||||||
if len(obj.shape) == 1:
|
if len(obj.shape) == 1:
|
||||||
for x in obj:
|
for x in obj:
|
||||||
s = str(x).strip()
|
s = str(x).strip()
|
||||||
self.typeSerializationMethod[t](s)
|
self.typeSerializationMethod[t](s)
|
||||||
else:
|
else:
|
||||||
for x in obj:
|
for x in obj:
|
||||||
for y in x:
|
for y in x:
|
||||||
s = str(y).strip()
|
s = str(y).strip()
|
||||||
self.typeSerializationMethod[t](s)
|
self.typeSerializationMethod[t](s)
|
||||||
else:
|
else:
|
||||||
for x in obj:
|
for x in obj:
|
||||||
s = str(x)
|
s = str(x)
|
||||||
self.typeSerializationMethod[t](s)
|
self.typeSerializationMethod[t](s)
|
||||||
elif t not in primitiveSupport:
|
elif t not in primitiveSupport:
|
||||||
|
@ -327,8 +327,8 @@ class ThriftSerializationContext(object):
|
||||||
else:
|
else:
|
||||||
self.listSerializationMethod[t](obj)
|
self.listSerializationMethod[t](obj)
|
||||||
self.protocol.writeListEnd()
|
self.protocol.writeListEnd()
|
||||||
|
|
||||||
|
|
||||||
def _serializeMap(self, obj):
|
def _serializeMap(self, obj):
|
||||||
size = len(obj)
|
size = len(obj)
|
||||||
self.protocol.writeMapBegin(TType.VOID, TType.VOID, size)
|
self.protocol.writeMapBegin(TType.VOID, TType.VOID, size)
|
||||||
|
@ -336,83 +336,83 @@ class ThriftSerializationContext(object):
|
||||||
self.typeSerializationMethod[TType.STRUCT](k)
|
self.typeSerializationMethod[TType.STRUCT](k)
|
||||||
self.typeSerializationMethod[TType.STRUCT](obj[k])
|
self.typeSerializationMethod[TType.STRUCT](obj[k])
|
||||||
self.protocol.writeMapEnd()
|
self.protocol.writeMapEnd()
|
||||||
|
|
||||||
def _serializeSet(self, obj):
|
def _serializeSet(self, obj):
|
||||||
size = len(obj)
|
size = len(obj)
|
||||||
self.protocol.writeSetBegin(TType.VOID, size)
|
self.protocol.writeSetBegin(TType.VOID, size)
|
||||||
for x in obj:
|
for x in obj:
|
||||||
self.typeSerializationMethod[TType.STRUCT](x)
|
self.typeSerializationMethod[TType.STRUCT](x)
|
||||||
self.protocol.writeSetEnd()
|
self.protocol.writeSetEnd()
|
||||||
|
|
||||||
def writeMessageStart(self, name):
|
def writeMessageStart(self, name):
|
||||||
self.protocol.writeMessageBegin(name, TType.VOID, 0)
|
self.protocol.writeMessageBegin(name, TType.VOID, 0)
|
||||||
|
|
||||||
def writeMessageEnd(self):
|
def writeMessageEnd(self):
|
||||||
self.protocol.writeMessageEnd()
|
self.protocol.writeMessageEnd()
|
||||||
|
|
||||||
def readBool(self):
|
def readBool(self):
|
||||||
return self.protocol.readBool()
|
return self.protocol.readBool()
|
||||||
|
|
||||||
def writeBool(self, b):
|
def writeBool(self, b):
|
||||||
self.protocol.writeBool(b)
|
self.protocol.writeBool(b)
|
||||||
|
|
||||||
def readByte(self):
|
def readByte(self):
|
||||||
return self.protocol.readByte()
|
return self.protocol.readByte()
|
||||||
|
|
||||||
def writeByte(self, b):
|
def writeByte(self, b):
|
||||||
self.protocol.writeByte(b)
|
self.protocol.writeByte(b)
|
||||||
|
|
||||||
def readDouble(self):
|
def readDouble(self):
|
||||||
return self.protocol.readDouble()
|
return self.protocol.readDouble()
|
||||||
|
|
||||||
def writeDouble(self, d):
|
def writeDouble(self, d):
|
||||||
self.protocol.writeDouble(d)
|
self.protocol.writeDouble(d)
|
||||||
|
|
||||||
def readFloat(self):
|
def readFloat(self):
|
||||||
return self.protocol.readFloat()
|
return self.protocol.readFloat()
|
||||||
|
|
||||||
def writeFloat(self, f):
|
def writeFloat(self, f):
|
||||||
self.protocol.writeFloat(f)
|
self.protocol.writeFloat(f)
|
||||||
|
|
||||||
def readI16(self):
|
def readI16(self):
|
||||||
return self.protocol.readI16()
|
return self.protocol.readI16()
|
||||||
|
|
||||||
def writeI16(self, i):
|
def writeI16(self, i):
|
||||||
self.protocol.writeI16(i)
|
self.protocol.writeI16(i)
|
||||||
|
|
||||||
def readI32(self):
|
def readI32(self):
|
||||||
return self.protocol.readI32()
|
return self.protocol.readI32()
|
||||||
|
|
||||||
def writeI32(self, i):
|
def writeI32(self, i):
|
||||||
self.protocol.writeI32(i)
|
self.protocol.writeI32(i)
|
||||||
|
|
||||||
def readI64(self):
|
def readI64(self):
|
||||||
return self.protocol.readI64()
|
return self.protocol.readI64()
|
||||||
|
|
||||||
def writeI64(self, i):
|
def writeI64(self, i):
|
||||||
self.protocol.writeI64(i)
|
self.protocol.writeI64(i)
|
||||||
|
|
||||||
def readString(self):
|
def readString(self):
|
||||||
return self.protocol.readString()
|
return self.protocol.readString()
|
||||||
|
|
||||||
def writeString(self, s):
|
def writeString(self, s):
|
||||||
self.protocol.writeString(s)
|
self.protocol.writeString(s)
|
||||||
|
|
||||||
def readBinary(self):
|
def readBinary(self):
|
||||||
numBytes = self.protocol.readI32()
|
numBytes = self.protocol.readI32()
|
||||||
return self.protocol.readI8List(numBytes)
|
return self.protocol.readI8List(numBytes)
|
||||||
|
|
||||||
def readFloatArray(self):
|
def readFloatArray(self):
|
||||||
size = self.protocol.readI32()
|
size = self.protocol.readI32()
|
||||||
return self.protocol.readF32List(size)
|
return self.protocol.readF32List(size)
|
||||||
|
|
||||||
def writeFloatArray(self, floats):
|
def writeFloatArray(self, floats):
|
||||||
self.protocol.writeI32(len(floats))
|
self.protocol.writeI32(len(floats))
|
||||||
self.protocol.writeF32List(floats)
|
self.protocol.writeF32List(floats)
|
||||||
|
|
||||||
def readObject(self):
|
def readObject(self):
|
||||||
return self.deserializeMessage()
|
return self.deserializeMessage()
|
||||||
|
|
||||||
def writeObject(self, obj):
|
def writeObject(self, obj):
|
||||||
self.serializeMessage(obj)
|
self.serializeMessage(obj)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# TODO
|
# TODO
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/20/10 njensen Initial Creation.
|
# 08/20/10 njensen Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -39,20 +39,20 @@ import dstypes, adapters
|
||||||
import DynamicSerializationManager
|
import DynamicSerializationManager
|
||||||
|
|
||||||
class SerializationException(Exception):
|
class SerializationException(Exception):
|
||||||
|
|
||||||
def __init__(self, message=None):
|
def __init__(self, message=None):
|
||||||
self.message = message
|
self.message = message
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self.message:
|
if self.message:
|
||||||
return self.message
|
return self.message
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def serialize(obj):
|
def serialize(obj):
|
||||||
dsm = DynamicSerializationManager.DynamicSerializationManager()
|
dsm = DynamicSerializationManager.DynamicSerializationManager()
|
||||||
return dsm.serializeObject(obj)
|
return dsm.serializeObject(obj)
|
||||||
|
|
||||||
def deserialize(bytes):
|
def deserialize(bytes):
|
||||||
dsm = DynamicSerializationManager.DynamicSerializationManager()
|
dsm = DynamicSerializationManager.DynamicSerializationManager()
|
||||||
return dsm.deserializeBytes(bytes)
|
return dsm.deserializeBytes(bytes)
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.activetable.ActiveTableMode
|
# Adapter for com.raytheon.uf.common.activetable.ActiveTableMode
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/29/10 wldougher Initial Creation.
|
# 09/29/10 wldougher Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from thrift.Thrift import TType
|
from thrift.Thrift import TType
|
||||||
|
@ -40,7 +40,7 @@ ClassAdapter = 'com.raytheon.uf.common.activetable.ActiveTableMode'
|
||||||
def serialize(context, mode):
|
def serialize(context, mode):
|
||||||
context.protocol.writeFieldBegin('__enumValue__', TType.STRING, 0)
|
context.protocol.writeFieldBegin('__enumValue__', TType.STRING, 0)
|
||||||
context.writeString(mode.value)
|
context.writeString(mode.value)
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = ActiveTableMode()
|
result = ActiveTableMode()
|
||||||
# Read the TType.STRING, "__enumValue__", and id.
|
# Read the TType.STRING, "__enumValue__", and id.
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,19 +21,18 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.nio.ByteBuffer
|
# Adapter for java.nio.ByteBuffer
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/03/11 dgilling Initial Creation.
|
# 08/03/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
ClassAdapter = ['java.nio.ByteBuffer', 'java.nio.HeapByteBuffer']
|
ClassAdapter = ['java.nio.ByteBuffer', 'java.nio.HeapByteBuffer']
|
||||||
|
|
||||||
|
|
||||||
def serialize(context, set):
|
def serialize(context, set):
|
||||||
raise NotImplementedError("Serialization of ByteBuffers is not supported.")
|
raise NotImplementedError("Serialization of ByteBuffers is not supported.")
|
||||||
|
@ -41,6 +40,3 @@ def serialize(context, set):
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
byteBuf = context.readBinary()
|
byteBuf = context.readBinary()
|
||||||
return byteBuf
|
return byteBuf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.util.Calendar
|
# Adapter for java.util.Calendar
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/29/10 wldougher Initial Creation.
|
# 09/29/10 wldougher Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.java.util import Calendar
|
from dynamicserialize.dstypes.java.util import Calendar
|
||||||
|
@ -39,7 +39,7 @@ ClassAdapter = 'java.util.Calendar'
|
||||||
def serialize(context, calendar):
|
def serialize(context, calendar):
|
||||||
calTiM = calendar.getTimeInMillis()
|
calTiM = calendar.getTimeInMillis()
|
||||||
context.writeI64(calTiM)
|
context.writeI64(calTiM)
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = Calendar()
|
result = Calendar()
|
||||||
result.setTimeInMillis(context.readI64())
|
result.setTimeInMillis(context.readI64())
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.vividsolutions.jts.geom.Coordinate
|
# Adapter for com.vividsolutions.jts.geom.Coordinate
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 01/20/11 dgilling Initial Creation.
|
# 01/20/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Coordinate
|
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Coordinate
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID
|
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 03/29/11 dgilling Initial Creation.
|
# 03/29/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import DatabaseID
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import DatabaseID
|
||||||
|
@ -38,7 +38,7 @@ ClassAdapter = 'com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID'
|
||||||
|
|
||||||
def serialize(context, dbId):
|
def serialize(context, dbId):
|
||||||
context.writeString(str(dbId))
|
context.writeString(str(dbId))
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = DatabaseID(context.readString())
|
result = DatabaseID(context.readString())
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.util.Date
|
# Adapter for java.util.Date
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 12/06/10 dgilling Initial Creation.
|
# 12/06/10 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.java.util import Date
|
from dynamicserialize.dstypes.java.util import Date
|
||||||
|
@ -38,8 +38,8 @@ ClassAdapter = 'java.util.Date'
|
||||||
|
|
||||||
def serialize(context, date):
|
def serialize(context, date):
|
||||||
context.writeI64(date.getTime())
|
context.writeI64(date.getTime())
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = Date()
|
result = Date()
|
||||||
result.setTime(context.readI64())
|
result.setTime(context.readI64())
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,24 +21,23 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.util.EnumSet
|
# Adapter for java.util.EnumSet
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 07/28/11 dgilling Initial Creation.
|
# 07/28/11 dgilling Initial Creation.
|
||||||
# 12/02/13 2537 bsteffen Serialize empty enum sets.
|
# 12/02/13 2537 bsteffen Serialize empty enum sets.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from dynamicserialize.dstypes.java.util import EnumSet
|
from dynamicserialize.dstypes.java.util import EnumSet
|
||||||
|
|
||||||
ClassAdapter = ['java.util.EnumSet', 'java.util.RegularEnumSet']
|
ClassAdapter = ['java.util.EnumSet', 'java.util.RegularEnumSet']
|
||||||
|
|
||||||
|
|
||||||
def serialize(context, set):
|
def serialize(context, set):
|
||||||
setSize = len(set)
|
setSize = len(set)
|
||||||
|
@ -46,7 +45,6 @@ def serialize(context, set):
|
||||||
context.writeString(set.getEnumClass())
|
context.writeString(set.getEnumClass())
|
||||||
for val in set:
|
for val in set:
|
||||||
context.writeString(val)
|
context.writeString(val)
|
||||||
|
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
setSize = context.readI32()
|
setSize = context.readI32()
|
||||||
|
@ -54,4 +52,4 @@ def deserialize(context):
|
||||||
valList = []
|
valList = []
|
||||||
for i in xrange(setSize):
|
for i in xrange(setSize):
|
||||||
valList.append(context.readString())
|
valList.append(context.readString())
|
||||||
return EnumSet(enumClassName, valList)
|
return EnumSet(enumClassName, valList)
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,19 +21,18 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.nio.FloatBuffer
|
# Adapter for java.nio.FloatBuffer
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/01/11 dgilling Initial Creation.
|
# 08/01/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
ClassAdapter = ['java.nio.FloatBuffer', 'java.nio.HeapFloatBuffer']
|
ClassAdapter = ['java.nio.FloatBuffer', 'java.nio.HeapFloatBuffer']
|
||||||
|
|
||||||
|
|
||||||
def serialize(context, set):
|
def serialize(context, set):
|
||||||
raise NotImplementedError("Serialization of FloatBuffers is not supported.")
|
raise NotImplementedError("Serialization of FloatBuffers is not supported.")
|
||||||
|
@ -41,6 +40,3 @@ def serialize(context, set):
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
floatBuf = context.readFloatArray()
|
floatBuf = context.readFloatArray()
|
||||||
return floatBuf
|
return floatBuf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.vividsolutions.jts.geom.Polygon
|
# Adapter for com.vividsolutions.jts.geom.Polygon
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 01/20/11 dgilling Initial Creation.
|
# 01/20/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
# TODO: Implement serialization/make deserialization useful.
|
# TODO: Implement serialization/make deserialization useful.
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.util.Calendar
|
# Adapter for java.util.Calendar
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/29/10 wldougher Initial Creation.
|
# 09/29/10 wldougher Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.java.util import GregorianCalendar
|
from dynamicserialize.dstypes.java.util import GregorianCalendar
|
||||||
|
@ -39,7 +39,7 @@ ClassAdapter = 'java.util.GregorianCalendar'
|
||||||
def serialize(context, calendar):
|
def serialize(context, calendar):
|
||||||
calTiM = calendar.getTimeInMillis()
|
calTiM = calendar.getTimeInMillis()
|
||||||
context.writeI64(calTiM)
|
context.writeI64(calTiM)
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = GregorianCalendar()
|
result = GregorianCalendar()
|
||||||
result.setTimeInMillis(context.readI64())
|
result.setTimeInMillis(context.readI64())
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -24,15 +24,15 @@
|
||||||
#
|
#
|
||||||
# TODO: REWRITE THIS ADAPTER when serialization/deserialization of this
|
# TODO: REWRITE THIS ADAPTER when serialization/deserialization of this
|
||||||
# class has been finalized.
|
# class has been finalized.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 03/29/11 dgilling Initial Creation.
|
# 03/29/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe import GridDataHistory
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe import GridDataHistory
|
||||||
|
@ -41,7 +41,7 @@ ClassAdapter = 'com.raytheon.uf.common.dataplugin.gfe.GridDataHistory'
|
||||||
|
|
||||||
def serialize(context, history):
|
def serialize(context, history):
|
||||||
context.writeString(history.getCodedString())
|
context.writeString(history.getCodedString())
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = GridDataHistory(context.readString())
|
result = GridDataHistory(context.readString())
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.vividsolutions.jts.geom.Envelope
|
# Adapter for com.vividsolutions.jts.geom.Envelope
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 05/29/13 2023 dgilling Initial Creation.
|
# 05/29/13 2023 dgilling Initial Creation.
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.localization.LocalizationContext$LocalizationLevel
|
# Adapter for com.raytheon.uf.common.localization.LocalizationContext$LocalizationLevel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 01/11/11 dgilling Initial Creation.
|
# 01/11/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,5 +52,3 @@ def deserialize(context):
|
||||||
systemLevel = context.readBool()
|
systemLevel = context.readBool()
|
||||||
level = LocalizationLevel(text, order, systemLevel=systemLevel)
|
level = LocalizationLevel(text, order, systemLevel=systemLevel)
|
||||||
return level
|
return level
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.localization.LocalizationContext$LocalizationType
|
# Adapter for com.raytheon.uf.common.localization.LocalizationContext$LocalizationType
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 01/11/11 dgilling Initial Creation.
|
# 01/11/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable
|
# Adapter for com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 04/22/13 rjpeter Initial Creation.
|
# 04/22/13 rjpeter Initial Creation.
|
||||||
# 06/12/13 #2099 dgilling Use new Lock constructor.
|
# 06/12/13 #2099 dgilling Use new Lock constructor.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.server.lock import LockTable
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.server.lock import LockTable
|
||||||
|
@ -44,7 +44,7 @@ def serialize(context, lockTable):
|
||||||
lockWsIdIndex = []
|
lockWsIdIndex = []
|
||||||
for lock in locks:
|
for lock in locks:
|
||||||
wsIdString = lock.getWsId().toString()
|
wsIdString = lock.getWsId().toString()
|
||||||
|
|
||||||
if wsIds.has_key(wsIdString):
|
if wsIds.has_key(wsIdString):
|
||||||
lockWsIdIndex.append(wsIds[wsIdString])
|
lockWsIdIndex.append(wsIds[wsIdString])
|
||||||
else:
|
else:
|
||||||
|
@ -53,24 +53,24 @@ def serialize(context, lockTable):
|
||||||
index += 1
|
index += 1
|
||||||
|
|
||||||
context.writeObject(lockTable.getParmId())
|
context.writeObject(lockTable.getParmId())
|
||||||
|
|
||||||
context.writeI32(index)
|
context.writeI32(index)
|
||||||
for wsId in sorted(wsIds, key=wsIds.get):
|
for wsId in sorted(wsIds, key=wsIds.get):
|
||||||
context.writeObject(wsId)
|
context.writeObject(wsId)
|
||||||
|
|
||||||
context.writeI32(len(locks))
|
context.writeI32(len(locks))
|
||||||
for lock, wsIndex in zip(locks, lockWsIdIndex):
|
for lock, wsIndex in zip(locks, lockWsIdIndex):
|
||||||
serializer.writeI64(lock.getStartTime())
|
serializer.writeI64(lock.getStartTime())
|
||||||
serializer.writeI64(lock.getEndTime())
|
serializer.writeI64(lock.getEndTime())
|
||||||
serializer.writeI32(wsIndex)
|
serializer.writeI32(wsIndex)
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
parmId = context.readObject()
|
parmId = context.readObject()
|
||||||
numWsIds = context.readI32()
|
numWsIds = context.readI32()
|
||||||
wsIds = []
|
wsIds = []
|
||||||
for x in xrange(numWsIds):
|
for x in xrange(numWsIds):
|
||||||
wsIds.append(context.readObject())
|
wsIds.append(context.readObject())
|
||||||
|
|
||||||
numLocks = context.readI32()
|
numLocks = context.readI32()
|
||||||
locks = []
|
locks = []
|
||||||
for x in xrange(numLocks):
|
for x in xrange(numLocks):
|
||||||
|
@ -79,10 +79,10 @@ def deserialize(context):
|
||||||
wsId = wsIds[context.readI32()]
|
wsId = wsIds[context.readI32()]
|
||||||
lock = Lock(parmId, wsId, startTime, endTime)
|
lock = Lock(parmId, wsId, startTime, endTime)
|
||||||
locks.append(lock)
|
locks.append(lock)
|
||||||
|
|
||||||
lockTable = LockTable()
|
lockTable = LockTable()
|
||||||
lockTable.setParmId(parmId)
|
lockTable.setParmId(parmId)
|
||||||
lockTable.setWsId(wsIds[0])
|
lockTable.setWsId(wsIds[0])
|
||||||
lockTable.setLocks(locks)
|
lockTable.setLocks(locks)
|
||||||
|
|
||||||
return lockTable
|
return lockTable
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID
|
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 03/29/11 dgilling Initial Creation.
|
# 03/29/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import ParmID
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import ParmID
|
||||||
|
@ -38,7 +38,7 @@ ClassAdapter = 'com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID'
|
||||||
|
|
||||||
def serialize(context, parmId):
|
def serialize(context, parmId):
|
||||||
context.writeString(str(parmId))
|
context.writeString(str(parmId))
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = ParmID(context.readString())
|
result = ParmID(context.readString())
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.awt.Point
|
# Adapter for java.awt.Point
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/31/10 njensen Initial Creation.
|
# 08/31/10 njensen Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.java.awt import Point
|
from dynamicserialize.dstypes.java.awt import Point
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.lang.StackTraceElement[]
|
# Adapter for java.lang.StackTraceElement[]
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/21/10 njensen Initial Creation.
|
# 09/21/10 njensen Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import dynamicserialize
|
import dynamicserialize
|
||||||
|
@ -37,10 +37,9 @@ from dynamicserialize.dstypes.java.lang import StackTraceElement
|
||||||
|
|
||||||
ClassAdapter = 'java.lang.StackTraceElement'
|
ClassAdapter = 'java.lang.StackTraceElement'
|
||||||
|
|
||||||
|
|
||||||
def serialize(context, obj):
|
def serialize(context, obj):
|
||||||
raise dynamicserialize.SerializationException('Not implemented yet')
|
raise dynamicserialize.SerializationException('Not implemented yet')
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = StackTraceElement()
|
result = StackTraceElement()
|
||||||
result.setDeclaringClass(context.readString())
|
result.setDeclaringClass(context.readString())
|
||||||
|
@ -48,5 +47,3 @@ def deserialize(context):
|
||||||
result.setFileName(context.readString())
|
result.setFileName(context.readString())
|
||||||
result.setLineNumber(context.readI32())
|
result.setLineNumber(context.readI32())
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID
|
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 03/20/13 #1774 randerso Initial Creation.
|
# 03/20/13 #1774 randerso Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import TimeConstraints
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import TimeConstraints
|
||||||
|
@ -40,7 +40,7 @@ def serialize(context, timeConstraints):
|
||||||
context.writeI32(timeConstraints.getDuration());
|
context.writeI32(timeConstraints.getDuration());
|
||||||
context.writeI32(timeConstraints.getRepeatInterval());
|
context.writeI32(timeConstraints.getRepeatInterval());
|
||||||
context.writeI32(timeConstraints.getStartTime());
|
context.writeI32(timeConstraints.getStartTime());
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = TimeConstraints(context.readI32(), context.readI32(), context.readI32())
|
result = TimeConstraints(context.readI32(), context.readI32(), context.readI32())
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,17 +21,17 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.message.WsId
|
# Adapter for com.raytheon.uf.common.message.WsId
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/16/10 dgilling Initial Creation.
|
# 09/16/10 dgilling Initial Creation.
|
||||||
# 01/22/14 2667 bclement use method to get millis from time range
|
# 01/22/14 2667 bclement use method to get millis from time range
|
||||||
# 02/28/14 2667 bclement deserialize now converts millis to micros
|
# 02/28/14 2667 bclement deserialize now converts millis to micros
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ def serialize(context, timeRange):
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
startTime = context.readI64()
|
startTime = context.readI64()
|
||||||
endTime = context.readI64()
|
endTime = context.readI64()
|
||||||
|
|
||||||
timeRange = TimeRange()
|
timeRange = TimeRange()
|
||||||
# java uses milliseconds, python uses microseconds
|
# java uses milliseconds, python uses microseconds
|
||||||
startSeconds = startTime // MILLIS_IN_SECOND
|
startSeconds = startTime // MILLIS_IN_SECOND
|
||||||
|
@ -59,5 +59,5 @@ def deserialize(context):
|
||||||
endExtraMicros = (endTime % MILLIS_IN_SECOND) * MICROS_IN_MILLISECOND
|
endExtraMicros = (endTime % MILLIS_IN_SECOND) * MICROS_IN_MILLISECOND
|
||||||
timeRange.setStart(startSeconds, startExtraMicros)
|
timeRange.setStart(startSeconds, startExtraMicros)
|
||||||
timeRange.setEnd(endSeconds, endExtraMicros)
|
timeRange.setEnd(endSeconds, endExtraMicros)
|
||||||
|
|
||||||
return timeRange
|
return timeRange
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for java.sql.Timestamp
|
# Adapter for java.sql.Timestamp
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 06/30/11 dgilling Initial Creation.
|
# 06/30/11 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.java.sql import Timestamp
|
from dynamicserialize.dstypes.java.sql import Timestamp
|
||||||
|
@ -38,7 +38,7 @@ ClassAdapter = 'java.sql.Timestamp'
|
||||||
|
|
||||||
def serialize(context, timestamp):
|
def serialize(context, timestamp):
|
||||||
context.writeI64(timestamp.getTime())
|
context.writeI64(timestamp.getTime())
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
result = Timestamp(context.readI64())
|
result = Timestamp(context.readI64())
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,38 +21,34 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adapter for com.raytheon.uf.common.message.WsId
|
# Adapter for com.raytheon.uf.common.message.WsId
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 09/16/10 dgilling Initial Creation.
|
# 09/16/10 dgilling Initial Creation.
|
||||||
# 04/25/12 545 randerso Repurposed the lockKey field as threadId
|
# 04/25/12 545 randerso Repurposed the lockKey field as threadId
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.message import WsId
|
from dynamicserialize.dstypes.com.raytheon.uf.common.message import WsId
|
||||||
|
|
||||||
ClassAdapter = 'com.raytheon.uf.common.message.WsId'
|
ClassAdapter = 'com.raytheon.uf.common.message.WsId'
|
||||||
|
|
||||||
|
|
||||||
def serialize(context, wsId):
|
def serialize(context, wsId):
|
||||||
context.writeString(wsId.toString())
|
context.writeString(wsId.toString())
|
||||||
|
|
||||||
def deserialize(context):
|
def deserialize(context):
|
||||||
wsIdString = context.readString()
|
wsIdString = context.readString()
|
||||||
wsIdParts = wsIdString.split(":", 5)
|
wsIdParts = wsIdString.split(":", 5)
|
||||||
|
|
||||||
wsId = WsId()
|
wsId = WsId()
|
||||||
wsId.setNetworkId(wsIdParts[0])
|
wsId.setNetworkId(wsIdParts[0])
|
||||||
wsId.setUserName(wsIdParts[1])
|
wsId.setUserName(wsIdParts[1])
|
||||||
wsId.setProgName(wsIdParts[2])
|
wsId.setProgName(wsIdParts[2])
|
||||||
wsId.setPid(wsIdParts[3])
|
wsId.setPid(wsIdParts[3])
|
||||||
wsId.setThreadId(long(wsIdParts[4]))
|
wsId.setThreadId(long(wsIdParts[4]))
|
||||||
|
|
||||||
return wsId
|
|
||||||
|
|
||||||
|
return wsId
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# __init__.py for Dynamic Serialize adapters.
|
# __init__.py for Dynamic Serialize adapters.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 08/31/10 njensen Initial Creation.
|
# 08/31/10 njensen Initial Creation.
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
# 04/22/13 #1949 rjpeter Added LockTableAdapter
|
# 04/22/13 #1949 rjpeter Added LockTableAdapter
|
||||||
# 02/06/14 #2672 bsteffen Added JTSEnvelopeAdapter
|
# 02/06/14 #2672 bsteffen Added JTSEnvelopeAdapter
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -59,12 +59,12 @@ __all__ = [
|
||||||
'JTSEnvelopeAdapter'
|
'JTSEnvelopeAdapter'
|
||||||
# 'GridDataHistoryAdapter',
|
# 'GridDataHistoryAdapter',
|
||||||
]
|
]
|
||||||
|
|
||||||
classAdapterRegistry = {}
|
classAdapterRegistry = {}
|
||||||
|
|
||||||
|
|
||||||
def getAdapterRegistry():
|
def getAdapterRegistry():
|
||||||
import sys
|
import sys
|
||||||
for x in __all__:
|
for x in __all__:
|
||||||
exec 'import ' + x
|
exec 'import ' + x
|
||||||
m = sys.modules['dynamicserialize.adapters.' + x]
|
m = sys.modules['dynamicserialize.adapters.' + x]
|
||||||
|
@ -79,7 +79,6 @@ def getAdapterRegistry():
|
||||||
else:
|
else:
|
||||||
raise LookupError('Adapter class ' + x + ' has no ClassAdapter field ' + \
|
raise LookupError('Adapter class ' + x + ' has no ClassAdapter field ' + \
|
||||||
'and cannot be registered.')
|
'and cannot be registered.')
|
||||||
|
|
||||||
|
|
||||||
getAdapterRegistry()
|
getAdapterRegistry()
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -23,6 +23,6 @@
|
||||||
class ActiveTableMode(object):
|
class ActiveTableMode(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.value = None
|
self.value = None
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self.value)
|
return repr(self.value)
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -27,25 +27,24 @@ class DumpActiveTableResponse(object):
|
||||||
|
|
||||||
def getUnfilteredCount(self):
|
def getUnfilteredCount(self):
|
||||||
return self.unfilteredCount
|
return self.unfilteredCount
|
||||||
|
|
||||||
def getFilteredCount(self):
|
def getFilteredCount(self):
|
||||||
return self.filteredCount
|
return self.filteredCount
|
||||||
|
|
||||||
def getDump(self):
|
def getDump(self):
|
||||||
return self.dump
|
return self.dump
|
||||||
|
|
||||||
def getMessage(self):
|
def getMessage(self):
|
||||||
return self.message
|
return self.message
|
||||||
|
|
||||||
def setUnfilteredCount(self, unfilteredCount):
|
def setUnfilteredCount(self, unfilteredCount):
|
||||||
self.unfilteredCount = unfilteredCount
|
self.unfilteredCount = unfilteredCount
|
||||||
|
|
||||||
def setFilteredCount(self, filteredCount):
|
def setFilteredCount(self, filteredCount):
|
||||||
self.filteredCount = filteredCount
|
self.filteredCount = filteredCount
|
||||||
|
|
||||||
def setDump(self, dump):
|
def setDump(self, dump):
|
||||||
self.dump = dump
|
self.dump = dump
|
||||||
|
|
||||||
def setMessage(self, message):
|
def setMessage(self, message):
|
||||||
self.message = message
|
self.message = message
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -39,6 +39,6 @@ class GetActiveTableDictRequest(object):
|
||||||
|
|
||||||
def getWfos(self):
|
def getWfos(self):
|
||||||
return self.wfos
|
return self.wfos
|
||||||
|
|
||||||
def setWfos(self, wfos):
|
def setWfos(self, wfos):
|
||||||
self.wfos = wfos;
|
self.wfos = wfos;
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,12 +21,12 @@
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
|
|
||||||
class GetFourCharSitesRequest(object):
|
class GetFourCharSitesRequest(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.sites = None
|
self.sites = None
|
||||||
|
|
||||||
def getSites(self):
|
def getSites(self):
|
||||||
return self.sites
|
return self.sites
|
||||||
|
|
||||||
def setSites(self, sites):
|
def setSites(self, sites):
|
||||||
self.sites = sites
|
self.sites = sites
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -21,12 +21,12 @@
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
|
|
||||||
class GetFourCharSitesResponse(object):
|
class GetFourCharSitesResponse(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.sites = None
|
self.sites = None
|
||||||
|
|
||||||
def getSites(self):
|
def getSites(self):
|
||||||
return self.sites
|
return self.sites
|
||||||
|
|
||||||
def setSites(self, sites):
|
def setSites(self, sites):
|
||||||
self.sites = sites
|
self.sites = sites
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -24,21 +24,21 @@ class GetVtecAttributeRequest(object):
|
||||||
self.siteId = None
|
self.siteId = None
|
||||||
self.attribute = None
|
self.attribute = None
|
||||||
self.defaultValue = None
|
self.defaultValue = None
|
||||||
|
|
||||||
def getSiteId(self):
|
def getSiteId(self):
|
||||||
return self.siteId
|
return self.siteId
|
||||||
|
|
||||||
def setSiteId(self, site):
|
def setSiteId(self, site):
|
||||||
self.siteId = site
|
self.siteId = site
|
||||||
|
|
||||||
def getAttribute(self):
|
def getAttribute(self):
|
||||||
return self.attribute
|
return self.attribute
|
||||||
|
|
||||||
def setAttribute(self, attribute):
|
def setAttribute(self, attribute):
|
||||||
self.attribute = attribute
|
self.attribute = attribute
|
||||||
|
|
||||||
def getDefaultValue(self):
|
def getDefaultValue(self):
|
||||||
return self.defaultValue
|
return self.defaultValue
|
||||||
|
|
||||||
def setDefaultValue(self, default):
|
def setDefaultValue(self, default):
|
||||||
self.defaultValue = default
|
self.defaultValue = default
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -22,9 +22,9 @@ class GetVtecAttributeResponse(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.value = None
|
self.value = None
|
||||||
|
|
||||||
def getValue(self):
|
def getValue(self):
|
||||||
return self.value
|
return self.value
|
||||||
|
|
||||||
def setValue(self, value):
|
def setValue(self, value):
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
class MergeActiveTableRequest(object):
|
class MergeActiveTableRequest(object):
|
||||||
|
|
||||||
def __init__(self, incomingRecords=[], tableName='PRACTICE', site=None,
|
def __init__(self, incomingRecords=[], tableName='PRACTICE', site=None,
|
||||||
timeOffset=0.0, xmlSource=None, fromIngestAT=False,
|
timeOffset=0.0, xmlSource=None, fromIngestAT=False,
|
||||||
makeBackups=True):
|
makeBackups=True):
|
||||||
self.incomingRecords = incomingRecords
|
self.incomingRecords = incomingRecords
|
||||||
self.site = site
|
self.site = site
|
||||||
|
@ -32,18 +32,18 @@ class MergeActiveTableRequest(object):
|
||||||
self.xmlSource = xmlSource
|
self.xmlSource = xmlSource
|
||||||
self.fromIngestAT = bool(fromIngestAT)
|
self.fromIngestAT = bool(fromIngestAT)
|
||||||
self.makeBackups = bool(makeBackups)
|
self.makeBackups = bool(makeBackups)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
retVal = "MergeActiveTableRequest("
|
retVal = "MergeActiveTableRequest("
|
||||||
retVal += repr(self.incomingRecords) + ", "
|
retVal += repr(self.incomingRecords) + ", "
|
||||||
retVal += repr(self.tableName) + ", "
|
retVal += repr(self.tableName) + ", "
|
||||||
retVal += repr(self.site) + ", "
|
retVal += repr(self.site) + ", "
|
||||||
retVal += repr(self.timeOffset) + ", "
|
retVal += repr(self.timeOffset) + ", "
|
||||||
retVal += repr(self.xmlSource) + ", "
|
retVal += repr(self.xmlSource) + ", "
|
||||||
retVal += repr(self.fromIngestAT) + ", "
|
retVal += repr(self.fromIngestAT) + ", "
|
||||||
retVal += repr(self.makeBackups) + ")"
|
retVal += repr(self.makeBackups) + ")"
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.__repr__()
|
return self.__repr__()
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class MergeActiveTableRequest(object):
|
||||||
if value not in ['OPERATIONAL', 'PRACTICE']:
|
if value not in ['OPERATIONAL', 'PRACTICE']:
|
||||||
raise ValueError("Invalid value " + tableName + " specified for ActiveTableMode.")
|
raise ValueError("Invalid value " + tableName + " specified for ActiveTableMode.")
|
||||||
self.tableName = value
|
self.tableName = value
|
||||||
|
|
||||||
def getSite(self):
|
def getSite(self):
|
||||||
return self.site
|
return self.site
|
||||||
|
|
||||||
|
@ -79,13 +79,13 @@ class MergeActiveTableRequest(object):
|
||||||
|
|
||||||
def setXmlSource(self, xmlSource):
|
def setXmlSource(self, xmlSource):
|
||||||
self.xmlSource = xmlSource
|
self.xmlSource = xmlSource
|
||||||
|
|
||||||
def getFromIngestAT(self):
|
def getFromIngestAT(self):
|
||||||
return self.fromIngestAT
|
return self.fromIngestAT
|
||||||
|
|
||||||
def setFromIngestAT(self, fromIngestAT):
|
def setFromIngestAT(self, fromIngestAT):
|
||||||
self.fromIngestAT = bool(fromIngestAT)
|
self.fromIngestAT = bool(fromIngestAT)
|
||||||
|
|
||||||
def getMakeBackups(self):
|
def getMakeBackups(self):
|
||||||
return self.makeBackups
|
return self.makeBackups
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
class RetrieveRemoteActiveTableRequest(object):
|
class RetrieveRemoteActiveTableRequest(object):
|
||||||
|
|
||||||
def __init__(self, serverHost=None, serverPort=0, serverProtocol=None,
|
def __init__(self, serverHost=None, serverPort=0, serverProtocol=None,
|
||||||
mhsId=None, siteId=None, ancfAddress=None, bncfAddress=None,
|
mhsId=None, siteId=None, ancfAddress=None, bncfAddress=None,
|
||||||
transmitScript=None):
|
transmitScript=None):
|
||||||
self.serverHost = serverHost
|
self.serverHost = serverHost
|
||||||
self.serverPort = int(serverPort)
|
self.serverPort = int(serverPort)
|
||||||
|
@ -33,19 +33,19 @@ class RetrieveRemoteActiveTableRequest(object):
|
||||||
self.ancfAddress = ancfAddress
|
self.ancfAddress = ancfAddress
|
||||||
self.bncfAddress = bncfAddress
|
self.bncfAddress = bncfAddress
|
||||||
self.transmitScript = transmitScript
|
self.transmitScript = transmitScript
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
retVal = "RetrieveRemoteActiveTableRequest("
|
retVal = "RetrieveRemoteActiveTableRequest("
|
||||||
retVal += repr(self.serverHost) + ", "
|
retVal += repr(self.serverHost) + ", "
|
||||||
retVal += repr(self.serverPort) + ", "
|
retVal += repr(self.serverPort) + ", "
|
||||||
retVal += repr(self.serverProtocol) + ", "
|
retVal += repr(self.serverProtocol) + ", "
|
||||||
retVal += repr(self.mhsId) + ", "
|
retVal += repr(self.mhsId) + ", "
|
||||||
retVal += repr(self.siteId) + ", "
|
retVal += repr(self.siteId) + ", "
|
||||||
retVal += repr(self.ancfAddress) + ", "
|
retVal += repr(self.ancfAddress) + ", "
|
||||||
retVal += repr(self.bncfAddress) + ", "
|
retVal += repr(self.bncfAddress) + ", "
|
||||||
retVal += repr(self.transmitScript) + ")"
|
retVal += repr(self.transmitScript) + ")"
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.__repr__()
|
return self.__repr__()
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -22,16 +22,16 @@
|
||||||
|
|
||||||
class SendActiveTableRequest(object):
|
class SendActiveTableRequest(object):
|
||||||
|
|
||||||
def __init__(self, serverHost=None, serverPort=None, serverProtocol=None,
|
def __init__(self, serverHost=None, serverPort=None, serverProtocol=None,
|
||||||
serverSite=None, mhsId=None, sites=None, filterSites=None,
|
serverSite=None, mhsId=None, sites=None, filterSites=None,
|
||||||
mhsSites=None, issueTime=None, countDict=None, fileName=None,
|
mhsSites=None, issueTime=None, countDict=None, fileName=None,
|
||||||
xmlIncoming=None, transmitScript=None):
|
xmlIncoming=None, transmitScript=None):
|
||||||
self.serverHost = serverHost
|
self.serverHost = serverHost
|
||||||
self.serverPort = None if serverPort is None else int(serverPort)
|
self.serverPort = None if serverPort is None else int(serverPort)
|
||||||
self.serverProtocol = serverProtocol
|
self.serverProtocol = serverProtocol
|
||||||
self.serverSite = serverSite
|
self.serverSite = serverSite
|
||||||
self.mhsId = mhsId
|
self.mhsId = mhsId
|
||||||
self.sites = sites if sites is not None else []
|
self.sites = sites if sites is not None else []
|
||||||
self.filterSites = filterSites if filterSites is not None else []
|
self.filterSites = filterSites if filterSites is not None else []
|
||||||
self.mhsSites = mhsSites if mhsSites is not None else []
|
self.mhsSites = mhsSites if mhsSites is not None else []
|
||||||
self.issueTime = None if issueTime is None else float(issueTime)
|
self.issueTime = None if issueTime is None else float(issueTime)
|
||||||
|
@ -39,24 +39,24 @@ class SendActiveTableRequest(object):
|
||||||
self.fileName = fileName
|
self.fileName = fileName
|
||||||
self.xmlIncoming = xmlIncoming
|
self.xmlIncoming = xmlIncoming
|
||||||
self.transmitScript = transmitScript
|
self.transmitScript = transmitScript
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
retVal = "SendActiveTableRequest("
|
retVal = "SendActiveTableRequest("
|
||||||
retVal += repr(self.serverHost) + ", "
|
retVal += repr(self.serverHost) + ", "
|
||||||
retVal += repr(self.serverPort) + ", "
|
retVal += repr(self.serverPort) + ", "
|
||||||
retVal += repr(self.serverProtocol) + ", "
|
retVal += repr(self.serverProtocol) + ", "
|
||||||
retVal += repr(self.serverSite) + ", "
|
retVal += repr(self.serverSite) + ", "
|
||||||
retVal += repr(self.mhsId) + ", "
|
retVal += repr(self.mhsId) + ", "
|
||||||
retVal += repr(self.sites) + ", "
|
retVal += repr(self.sites) + ", "
|
||||||
retVal += repr(self.filterSites) + ", "
|
retVal += repr(self.filterSites) + ", "
|
||||||
retVal += repr(self.mhsSites) + ", "
|
retVal += repr(self.mhsSites) + ", "
|
||||||
retVal += repr(self.issueTime) + ", "
|
retVal += repr(self.issueTime) + ", "
|
||||||
retVal += repr(self.countDict) + ", "
|
retVal += repr(self.countDict) + ", "
|
||||||
retVal += repr(self.fileName) + ", "
|
retVal += repr(self.fileName) + ", "
|
||||||
retVal += repr(self.xmlIncoming) + ", "
|
retVal += repr(self.xmlIncoming) + ", "
|
||||||
retVal += repr(self.transmitScript) + ")"
|
retVal += repr(self.transmitScript) + ")"
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.__repr__()
|
return self.__repr__()
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
|
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.serialization.comm.response import ServerErrorResponse
|
from dynamicserialize.dstypes.com.raytheon.uf.common.serialization.comm.response import ServerErrorResponse
|
||||||
|
|
||||||
class AuthServerErrorResponse(ServerErrorResponse):
|
class AuthServerErrorResponse(ServerErrorResponse):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(AuthServerErrorResponse, self).__init__()
|
super(AuthServerErrorResponse, self).__init__()
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,41 +1,39 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
# and then modified post-generation to sub-class IDataRequest.
|
# and then modified post-generation to sub-class IDataRequest.
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 05/28/13 2023 dgilling Initial Creation.
|
# 05/28/13 2023 dgilling Initial Creation.
|
||||||
#
|
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
|
||||||
from awips.dataaccess import IDataRequest
|
from awips.dataaccess import IDataRequest
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Envelope
|
from dynamicserialize.dstypes.com.vividsolutions.jts.geom import Envelope
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.level import Level
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.level import Level
|
||||||
|
|
||||||
|
|
||||||
class DefaultDataRequest(IDataRequest):
|
class DefaultDataRequest(IDataRequest):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -45,22 +43,22 @@ class DefaultDataRequest(IDataRequest):
|
||||||
self.levels = []
|
self.levels = []
|
||||||
self.locationNames = []
|
self.locationNames = []
|
||||||
self.envelope = None
|
self.envelope = None
|
||||||
|
|
||||||
def setDatatype(self, datatype):
|
def setDatatype(self, datatype):
|
||||||
self.datatype = str(datatype)
|
self.datatype = str(datatype)
|
||||||
|
|
||||||
def addIdentifier(self, key, value):
|
def addIdentifier(self, key, value):
|
||||||
self.identifiers[key] = value
|
self.identifiers[key] = value
|
||||||
|
|
||||||
def removeIdentifier(self, key):
|
def removeIdentifier(self, key):
|
||||||
del self.identifiers[key]
|
del self.identifiers[key]
|
||||||
|
|
||||||
def setParameters(self, *params):
|
def setParameters(self, *params):
|
||||||
self.parameters = map(str, params)
|
self.parameters = map(str, params)
|
||||||
|
|
||||||
def setLevels(self, *levels):
|
def setLevels(self, *levels):
|
||||||
self.levels = map(self.__makeLevel, levels)
|
self.levels = map(self.__makeLevel, levels)
|
||||||
|
|
||||||
def __makeLevel(self, level):
|
def __makeLevel(self, level):
|
||||||
if type(level) is Level:
|
if type(level) is Level:
|
||||||
return level
|
return level
|
||||||
|
@ -68,27 +66,27 @@ class DefaultDataRequest(IDataRequest):
|
||||||
return Level(level)
|
return Level(level)
|
||||||
else:
|
else:
|
||||||
raise TypeError("Invalid object type specified for level.")
|
raise TypeError("Invalid object type specified for level.")
|
||||||
|
|
||||||
def setEnvelope(self, env):
|
def setEnvelope(self, env):
|
||||||
self.envelope = Envelope(env.envelope)
|
self.envelope = Envelope(env.envelope)
|
||||||
|
|
||||||
def setLocationNames(self, *locationNames):
|
def setLocationNames(self, *locationNames):
|
||||||
self.locationNames = map(str, locationNames)
|
self.locationNames = map(str, locationNames)
|
||||||
|
|
||||||
def getDatatype(self):
|
def getDatatype(self):
|
||||||
return self.datatype
|
return self.datatype
|
||||||
|
|
||||||
def getIdentifiers(self):
|
def getIdentifiers(self):
|
||||||
return self.identifiers
|
return self.identifiers
|
||||||
|
|
||||||
def getParameters(self):
|
def getParameters(self):
|
||||||
return self.parameters
|
return self.parameters
|
||||||
|
|
||||||
def getLevels(self):
|
def getLevels(self):
|
||||||
return self.levels
|
return self.levels
|
||||||
|
|
||||||
def getEnvelope(self):
|
def getEnvelope(self):
|
||||||
return self.envelope
|
return self.envelope
|
||||||
|
|
||||||
def getLocationNames(self):
|
def getLocationNames(self):
|
||||||
return self.locationNames
|
return self.locationNames
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
# and then modified post-generation to make it a abstract base class.
|
# and then modified post-generation to make it a abstract base class.
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 05/28/13 #2023 dgilling Initial Creation.
|
# 05/28/13 #2023 dgilling Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
# and then modified post-generation to make it a abstract base class.
|
# and then modified post-generation to make it a abstract base class.
|
||||||
#
|
#
|
||||||
# SOFTWARE HISTORY
|
# SOFTWARE HISTORY
|
||||||
#
|
#
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 07/23/14 #3185 njensen Initial Creation.
|
# 07/23/14 #3185 njensen Initial Creation.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue