python-awips/dynamicserialize/adapters/CommutativeTimestampAdapter.py

29 lines
705 B
Python
Raw Normal View History

2018-09-05 15:52:38 -06:00
##
##
#
# Adapter for CommutativeTimestamp
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 9/21/2015 4486 rjpeter Initial creation.
# Jun 23, 2016 5696 rjpeter Handle CommutativeTimestamp.
#
#
from dynamicserialize.dstypes.com.raytheon.uf.common.time import CommutativeTimestamp
ClassAdapter = 'com.raytheon.uf.common.time.CommutativeTimestamp'
def serialize(context, date):
context.writeI64(date.getTime())
def deserialize(context):
result = CommutativeTimestamp()
result.setTime(context.readI64())
return result