|
| 1 | +from __future__ import print_function |
| 2 | + |
| 3 | +__all__ = [ |
| 4 | + "Annotation", |
| 5 | + "AnnotationPoint", |
| 6 | + "AtomicPoint", |
| 7 | + "DataPoint", |
| 8 | + "MetadataPoint", |
| 9 | + "SnapshotCapable", |
| 10 | + "StandardComplexPointType", |
| 11 | + "TemporalPoint", |
| 12 | +] |
| 13 | + |
| 14 | +from typing import Any, List, Optional, Union |
| 15 | + |
| 16 | +from java.lang import Class, Comparable, Enum, Object, Record |
| 17 | +from java.time import Instant |
| 18 | +from java.util import UUID |
| 19 | + |
| 20 | +from com.inductiveautomation.ignition.common import QualifiedPath |
| 21 | +from com.inductiveautomation.ignition.common.config import PropertySet, PropertyValue |
| 22 | +from com.inductiveautomation.ignition.common.model.values import QualityCode |
| 23 | + |
| 24 | + |
| 25 | +class SnapshotCapable(object): |
| 26 | + def isSnapshot(self): |
| 27 | + # type: () -> bool |
| 28 | + pass |
| 29 | + |
| 30 | + def snapshotTime(self): |
| 31 | + # type: () -> Optional[Instant] |
| 32 | + pass |
| 33 | + |
| 34 | + def withSnapshot(self, timestamp=None): |
| 35 | + # type: (Optional[Instant]) -> SnapshotCapable |
| 36 | + pass |
| 37 | + |
| 38 | + |
| 39 | +class TemporalPoint(Comparable): |
| 40 | + def compareTo(self, other): |
| 41 | + # type: (TemporalPoint) -> int |
| 42 | + pass |
| 43 | + |
| 44 | + def source(self): |
| 45 | + # type: () -> QualifiedPath |
| 46 | + pass |
| 47 | + |
| 48 | + def timestamp(self): |
| 49 | + # type: () -> Instant |
| 50 | + pass |
| 51 | + |
| 52 | + def type(self): |
| 53 | + # type: () -> Any |
| 54 | + pass |
| 55 | + |
| 56 | + def value(self): |
| 57 | + # type: () -> Any |
| 58 | + pass |
| 59 | + |
| 60 | + |
| 61 | +class DataPoint(SnapshotCapable, TemporalPoint): |
| 62 | + def quality(self): |
| 63 | + # type: () -> QualityCode |
| 64 | + pass |
| 65 | + |
| 66 | + def valueClass(self): |
| 67 | + # type: () -> Any |
| 68 | + pass |
| 69 | + |
| 70 | + |
| 71 | +class AtomicPoint(DataPoint): |
| 72 | + pass |
| 73 | + |
| 74 | + |
| 75 | +class Annotation(Record): |
| 76 | + def __init__( |
| 77 | + self, |
| 78 | + notes, # type: Union[str, unicode] |
| 79 | + type_, # type: Union[str, unicode] |
| 80 | + author, # type: Union[str, unicode] |
| 81 | + ): |
| 82 | + # type: (...) -> None |
| 83 | + super(Annotation, self).__init__() |
| 84 | + |
| 85 | + def author(self): |
| 86 | + # type: () -> Union[str, unicode] |
| 87 | + pass |
| 88 | + |
| 89 | + def notes(self): |
| 90 | + # type: () -> Union[str, unicode] |
| 91 | + pass |
| 92 | + |
| 93 | + def type(self): |
| 94 | + # type: () -> Union[str, unicode] |
| 95 | + pass |
| 96 | + |
| 97 | + |
| 98 | +class AnnotationPoint(Record): |
| 99 | + class Builder(Object): |
| 100 | + def __init__(self): |
| 101 | + # type: () -> None |
| 102 | + super(AnnotationPoint.Builder, self).__init__() |
| 103 | + |
| 104 | + def annotationType(self, annotationType): |
| 105 | + # type: (Union[str, unicode]) -> AnnotationPoint.Builder |
| 106 | + pass |
| 107 | + |
| 108 | + def author(self, author): |
| 109 | + # type: (Union[str, unicode]) -> AnnotationPoint.Builder |
| 110 | + pass |
| 111 | + |
| 112 | + def build(self): |
| 113 | + # type: () -> AnnotationPoint |
| 114 | + pass |
| 115 | + |
| 116 | + def endTime(self, endTime): |
| 117 | + # type: (Instant) -> AnnotationPoint.Builder |
| 118 | + pass |
| 119 | + |
| 120 | + def identifier( |
| 121 | + self, |
| 122 | + identifier, # type: Union[UUID, str, unicode] |
| 123 | + ): |
| 124 | + # type: (...) -> AnnotationPoint.Builder |
| 125 | + pass |
| 126 | + |
| 127 | + def lastUpdated(self, lastUpdated): |
| 128 | + # type: (Instant) -> AnnotationPoint.Builder |
| 129 | + pass |
| 130 | + |
| 131 | + def notes(self, notes): |
| 132 | + # type: (Union[str, unicode]) -> AnnotationPoint.Builder |
| 133 | + pass |
| 134 | + |
| 135 | + def source(self, source): |
| 136 | + # type: (QualifiedPath) -> AnnotationPoint.Builder |
| 137 | + pass |
| 138 | + |
| 139 | + def startTime(self, startTime): |
| 140 | + # type: (Instant) -> AnnotationPoint.Builder |
| 141 | + pass |
| 142 | + |
| 143 | + def __init__( |
| 144 | + self, |
| 145 | + identifier, # type: UUID |
| 146 | + source, # type: QualifiedPath |
| 147 | + value, # type: Annotation |
| 148 | + startTime, # type: Instant |
| 149 | + endTime=None, # type: Optional[Instant] |
| 150 | + lastUpdated=None, # type: Optional[Instant] |
| 151 | + ): |
| 152 | + # type: (...) -> None |
| 153 | + super(AnnotationPoint, self).__init__() |
| 154 | + print(identifier, source, value, startTime, endTime, lastUpdated) |
| 155 | + |
| 156 | + @staticmethod |
| 157 | + def builder(): |
| 158 | + # type: () -> AnnotationPoint.Builder |
| 159 | + pass |
| 160 | + |
| 161 | + def endTime(self): |
| 162 | + # type: () -> Optional[Instant] |
| 163 | + pass |
| 164 | + |
| 165 | + def identifier(self): |
| 166 | + # type: () -> UUID |
| 167 | + pass |
| 168 | + |
| 169 | + def lastUpdated(self): |
| 170 | + # type: () -> Optional[Instant] |
| 171 | + pass |
| 172 | + |
| 173 | + def source(self): |
| 174 | + # type: () -> QualifiedPath |
| 175 | + pass |
| 176 | + |
| 177 | + def startTime(self): |
| 178 | + # type: () -> Instant |
| 179 | + pass |
| 180 | + |
| 181 | + def timestamp(self): |
| 182 | + # type: () -> Instant |
| 183 | + pass |
| 184 | + |
| 185 | + def type(self): |
| 186 | + # type: () -> StandardComplexPointType |
| 187 | + pass |
| 188 | + |
| 189 | + def value(self): |
| 190 | + # type: () -> Annotation |
| 191 | + pass |
| 192 | + |
| 193 | + def withSource(self, source): |
| 194 | + # type: (QualifiedPath) -> AnnotationPoint |
| 195 | + pass |
| 196 | + |
| 197 | + |
| 198 | +class MetadataPoint(Record, TemporalPoint): |
| 199 | + class Builder(Object): |
| 200 | + def __init__(self): |
| 201 | + # type: () -> None |
| 202 | + super(MetadataPoint.Builder, self).__init__() |
| 203 | + |
| 204 | + def addValue(self, value): |
| 205 | + # type: (PropertyValue) -> MetadataPoint.Builder |
| 206 | + pass |
| 207 | + |
| 208 | + def build(self): |
| 209 | + # type: () -> MetadataPoint |
| 210 | + pass |
| 211 | + |
| 212 | + def quality(self, quality): |
| 213 | + # type: (QualityCode) -> MetadataPoint.Builder |
| 214 | + pass |
| 215 | + |
| 216 | + def source(self, source): |
| 217 | + # type: (QualifiedPath) -> MetadataPoint.Builder |
| 218 | + pass |
| 219 | + |
| 220 | + def timestamp(self, timestamp): |
| 221 | + # type: (Instant) -> MetadataPoint.Builder |
| 222 | + pass |
| 223 | + |
| 224 | + def values(self, values): |
| 225 | + # type: (PropertySet) -> MetadataPoint.Builder |
| 226 | + pass |
| 227 | + |
| 228 | + def __init__( |
| 229 | + self, |
| 230 | + value, # type: PropertySet |
| 231 | + quality, # type: QualityCode |
| 232 | + timestamp, # type: Instant |
| 233 | + source, # type: QualifiedPath |
| 234 | + ): |
| 235 | + # type: (...) -> None |
| 236 | + super(MetadataPoint, self).__init__() |
| 237 | + print(value, quality, timestamp, source) |
| 238 | + |
| 239 | + @staticmethod |
| 240 | + def builder(metadataPoint=None): |
| 241 | + # type: (Optional[MetadataPoint]) -> MetadataPoint.Builder |
| 242 | + pass |
| 243 | + |
| 244 | + @staticmethod |
| 245 | + def empty(source): |
| 246 | + # type: (QualifiedPath) -> MetadataPoint |
| 247 | + pass |
| 248 | + |
| 249 | + def quality(self): |
| 250 | + # type: () -> QualityCode |
| 251 | + pass |
| 252 | + |
| 253 | + def withSource(self, source): |
| 254 | + # type: (QualifiedPath) -> MetadataPoint |
| 255 | + pass |
| 256 | + |
| 257 | + |
| 258 | +class StandardComplexPointType(Enum): |
| 259 | + ANNOTATION = None # type: StandardComplexPointType |
| 260 | + GENERIC = None # type: StandardComplexPointType |
| 261 | + METADATA = None # type: StandardComplexPointType |
| 262 | + |
| 263 | + def getPointClass(self): |
| 264 | + # type: () -> Class |
| 265 | + pass |
| 266 | + |
| 267 | + def getQueryOptionsClass(self): |
| 268 | + # type: () -> Class |
| 269 | + pass |
| 270 | + |
| 271 | + @staticmethod |
| 272 | + def values(): |
| 273 | + # type: () -> List[StandardComplexPointType] |
| 274 | + pass |
0 commit comments