Skip to content

Commit

Permalink
feat: add fields and implement more methods
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcoatl committed Oct 11, 2021
1 parent 2473ff4 commit 1f17c83
Showing 1 changed file with 80 additions and 3 deletions.
@@ -1,13 +1,58 @@
__all__ = ["BasicQualifiedValue", "QualityCode", "QualifiedValue"]

from java.lang import Object
from java.util import Date


class QualityCode(Object):
"""QualityCode contains a 32-bit integer code and optionally a
diagnostic string.
"""

Bad = None
Bad_AccessDenied = None
Bad_AggregateNotFound = None
Bad_DatabaseNotConnected = None
Bad_Disabled = None
Bad_Failure = None
Bad_GatewayCommOff = None
Bad_LicenseExceeded = None
Bad_NotConnected = None
Bad_NotFound = None
Bad_OutOfRange = 524
Bad_ReadOnly = None
Bad_Stale = None
Bad_ReferenceNotFound = None
Bad_TrialExpired = None
Bad_Unauthorized = None
Bad_Unsupported = None
Error = None
Error_Configuration = None
Error_CycleDetected = None
Error_DatabaseQuery = None
Error_Exception = None
Error_ExpressionEval = None
Error_Formatting = None
Error_InvalidPathSyntax = None
Error_IO = None
Error_ScriptEval = None
Error_TagExecution = None
Error_TimeoutExpired = None
Error_TypeConversion = None
Good = None
Good_Backfill = None
Good_Initial = None
Good_Overload = None
Good_Provisional = None
Good_Unspecified = None
Good_WritePending = None
Uncertain = None
Uncertain_LastKnownValue = None
Uncertain_InitialValue = None
Uncertain_DataSubNormal = None
Uncertain_EngineeringUnitsExceeded = None
Uncertain_IncompleteOperation = None

def __init__(self, *args):
pass

Expand Down Expand Up @@ -75,12 +120,44 @@ def getValue(self):
raise NotImplementedError


class BasicQualifiedValue(QualifiedValue):
def getQuality(self):
class BasicQualifiedValue(QualifiedValue, Object):
quality = QualityCode.Bad_Stale
timestamp = Date()
value = None

def __init__(self, *arg):
pass

def getTimestamp(self):
@staticmethod
def fromObject(obj):
pass

def getQuality(self):
return self.quality

def getTimestamp(self):
return self.timestamp

def getValue(self):
return self.value

def setQuality(self, code):
self.quality = code

def setTimestamp(self, timestamp):
self.timestamp = timestamp

def setValue(self, value):
self.value = value

@staticmethod
def unwrap(obj):
pass

@staticmethod
def updateTimestamp(copy):
pass

@staticmethod
def valueOf(obj):
pass

0 comments on commit 1f17c83

Please sign in to comment.