class EncodedGridTuple(Tuple): """ Encoded Grid Tuple This tuple stores a pre-encoded version of a GridTuple """ __tupleType__ = diagramTuplePrefix + "EncodedGridTuple" gridKey: str = TupleField() # A GridTuple, already encoded and ready for storage in the clients cache encodedGridTuple: str = TupleField() lastUpdate: datetime = TupleField() @property def ckiChunkKey(self): return self.gridKey @property def ckiHasEncodedData(self) -> bool: return bool(self.encodedGridTuple) @property def ckiLastUpdate(self): return self.lastUpdate
class DispKeyLocationTuple(Tuple): __tupleType__ = diagramTuplePrefix + "DispKeyLocationTuple" coordSetKey: str = TupleField() coordSetId: int = TupleField() dispId: int = TupleField() x: float = TupleField() y: float = TupleField() def toLocationJson(self) -> str: return '[%s,%s,%s,%s]' % ( self.coordSetId, self.dispId, self.x, self.y ) @classmethod def fromLocationJson(self, items: List[int]) -> 'DispKeyLocationTuple': assert len(items) == 4, "Invalid packed data." newItem = DispKeyLocationTuple() newItem.coordSetId = items[0] newItem.dispId = items[1] newItem.x = items[2] newItem.y = items[3] return newItem
class AdminStatusTuple(Tuple): __tupleType__ = eventdbTuplePrefix + "AdminStatusTuple" addedEvents: int = TupleField(0) removedEvents: int = TupleField(0) updatedAlarmFlags: int = TupleField(0) lastActivity: datetime = TupleField()
class EventDBPropertyValueTuple(Tuple): """ Event DB Property Value Tuple This tuple is an option that the user can select for each property. For example: Property = Alarm Class Property Value = Class 1 Property Value = Class 2 name: The name of this property value that is displayed to the user. value: The value that matches EvenDBEventTuple.value[property.key] == propertyValue.value color: If this property has a color then define it here. the first property value with a color will be applied ordered by property.order comment: The tooltip to display to the user in a UI. """ __tupleType__ = eventdbTuplePrefix + 'EventDBPropertyValueTuple' name: str = TupleField() value: str = TupleField() color: str = TupleField() comment: Optional[str] = TupleField()
class AdminStatusTuple(Tuple): __tupleType__ = docDbTuplePrefix + "AdminStatusTuple" documentCompilerQueueStatus: bool = TupleField(False) documentCompilerQueueSize: int = TupleField(0) documentCompilerQueueProcessedTotal: int = TupleField(0) documentCompilerQueueLastError: str = TupleField()
class PeekAdmNavbarUserTuple(Tuple): __tupleType__ = 'peek_server.PeekAdmNavbarUserTuple' supportExceeded = TupleField(False) demoExceeded = TupleField(False) countsExceeded = TupleField(False) username = TupleField('nouser')
class ImportSearchObjectTuple(Tuple): """ Import Search Object This tuple is used by other plugins to load objects into the search index. """ __tupleType__ = searchTuplePrefix + 'ImportSearchObjectTuple' #: The unique key for this object # This key will be indexed as a full keyword, do not include the key in the keywords key: str = TupleField() #: The type of this object objectType: str = TupleField() #: Full Keywords # The keywords to index that allows the user to search by partial keywords # The key of the property will match of create a new "SearchProperty" fullKeywords: Dict[str, str] = TupleField({}) #: Partial Keywords # The keywords to index that allows the user to search by partial keywords # The key of the property will match of create a new "SearchProperty" partialKeywords: Dict[str, str] = TupleField({}) #: The color routes: List[ImportSearchObjectRouteTuple] = TupleField([])
class AdminStatusTuple(Tuple): __tupleType__ = livedbTuplePrefix + "AdminStatusTuple" rawValueQueueStatus: bool = TupleField(False) rawValueQueueSize: int = TupleField(0) rawValueProcessedTotal: int = TupleField(0) rawValueLastError: str = TupleField()
class ActivityTuple(Tuple): """ Activity Tuple An Activity represents an item in the activity screen This is a screen that is intended to show actions that have been performed recently or events that plugins want in this list. see InboxAbiABC.NewActivity for documentation. """ __tupleType__ = inboxTuplePrefix + 'ActivityTuple' pluginName: str = TupleField() uniqueId: str = TupleField() userId: str = TupleField() dateTime: datetime = TupleField() # The display properties of the task title: str = TupleField() description: str = TupleField() iconPath: str = TupleField() # The mobile-app route to open when this task is selected routePath: str = TupleField() routeParamJson: str = TupleField() # Auto Delete on Time autoDeleteDateTime: datetime = TupleField()
class InternalUserImportResultTuple(Tuple): __tupleType__ = userPluginTuplePrefix + "InternalUserImportResultTuple" addedIds: List[int] = TupleField() updatedIds: List[int] = TupleField() deletedIds: List[int] = TupleField() sameCount: int = TupleField() errors: List[str] = TupleField()
class ImportInternalGroupTuple(Tuple): __tupleType__ = userPluginTuplePrefix + "ImportInternalGroupTuple" #: The unique name of this group groupName: str = TupleField() #: The nice name of this group groupTitle: str = TupleField()
class TupleUpdateAction(TupleActionABC): __tupleType__ = "vortex.TupleUpdateAction" tupleSelector = TupleField( comment="The tuple selector for this action", typingType=TupleSelector ) tupleChanges = TupleField( comment="An array of {old:v,new:v} dicts for the changes", typingType=List[Dict] )
class LocationIndexTuple(Tuple): __tupleType__ = diagramTuplePrefix + "LocationIndexTuple" modelSetKey: str = TupleField() indexBucket: str = TupleField() # The compressed (deflated) json string. jsonStr: str = TupleField() lastUpdate: str = TupleField()
class EventDBPropertyCriteriaTuple(Tuple): """ Event DB Property Criteria Tuple This tuple stores the criteria of alarms and events to retrieve. """ __tupleType__ = eventdbTuplePrefix + 'EventDBPropertyCriteriaTuple' property: EventDBPropertyTuple = TupleField() value: Union[List[str], str] = TupleField()
class UserLoginUiSettingTuple(Tuple): """ User Login UI Setting This tuple is sent to the devices to control the appearance of the UI """ __tupleType__ = userPluginTuplePrefix + "UserLoginUiSettingTuple" showUsersAsList: bool = TupleField() showVehicleInput: bool = TupleField()
class _VortexRPCArgTuple(Tuple): """ Vortex RPC Arg Tuple This tuple stores the arguments used to call the remote method. """ __tupleType__ = __name__ + '_VortexRPCArgTuple' args = TupleField(defaultValue=[]) kwargs = TupleField(defaultValue={})
class PerformTestActionTuple(Tuple): """ Perform Test Action Tuple This tuple is used for testing the action code. """ __tupleType__ = 'synerty.vortex.PerformTestActionTuple' actionDataInt = TupleField(typingType=int) actionDataUnicode = TupleField(typingType=str) failProcessing = TupleField(typingType=bool)
class UserLoginResponseTuple(Tuple): __tupleType__ = userPluginTuplePrefix + "UserLoginResponseTuple" userName: str = TupleField() userToken: str = TupleField() deviceToken: str = TupleField() deviceDescription: str = TupleField() vehicleId: str = TupleField() userDetail: UserDetailTuple = TupleField() succeeded: bool = TupleField(True) #: A list of accepted warning keys # If any server side warnings occur and they are in this list then the logon # continues. acceptedWarningKeys: List[str] = TupleField() #: A dict of warnings from a failed logon action. # key = a unique key for this warning # value = the description of the warning for the user warnings: Dict[str, str] = TupleField({}) def setFailed(self) -> None: self.succeeded = False def addWarning(self, key: str, displayText: str): self.warnings[key] = displayText
class GroupDetailTuple(Tuple): __tupleType__ = userPluginTuplePrefix + "GroupDetailTuple" #: ID id: int = TupleField() #: The name of the group, EG C917 groupName: str = TupleField() #: The title of the group, EG 'Chief Wiggum' groupTitle: str = TupleField()
class BranchUpdateTupleAction(TupleActionABC): """ Branch Update Tuple Action This is the Branch Update tuple Action """ __tupleType__ = diagramTuplePrefix + 'BranchUpdateTupleAction' doDelete: bool = TupleField(False) modelSetId:int = TupleField() branchTuple: BranchTuple = TupleField()
class SearchResultDetailTuple(Tuple): """ Search Result Detail Tuple This tuple represents the details of a search result. """ __tupleType__ = searchTuplePrefix + 'SearchResultDetailTuple' #: The name of the detail name: str = TupleField() #: The value of the detail value: str = TupleField()
class BranchKeyToIdMapTuple(Tuple): """ Branch Key to ID Map Tuple This tuple is used by the UI to get the IDs for branches for the model compiler to enable branches. """ __tupleType__ = diagramTuplePrefix + 'BranchKeyToIdMapTuple' # This field is server side only coordSetId: int = TupleField() keyIdMap: Dict[str, int] = TupleField()
class UserLogoutAction(TupleActionABC): __tupleType__ = userPluginTuplePrefix + "UserLogoutAction" userName: str = TupleField() deviceToken: str = TupleField() isFieldService: bool = TupleField() isOfficeService: bool = TupleField() #: A list of accepted warning keys # If any server side warnings occur and they are in this list then the logoff # continues. acceptedWarningKeys: List[str] = TupleField()
class LocationIndexUpdateDateTuple(Tuple, ACIUpdateDateTupleABC): __tupleType__ = diagramTuplePrefix + "LocationIndexUpdateDateTuple" # Improve performance of the JSON serialisation __rawJonableFields__ = ('initialLoadComplete', 'updateDateByChunkKey') initialLoadComplete: bool = TupleField() updateDateByChunkKey: DeviceLocationIndexT = TupleField({}) @property def ckiUpdateDateByChunkKey(self): return self.updateDateByChunkKey
class DiagramCoordSetTuple(Tuple): """ Diagram Coordinate Set Tuple This tuple represents a coordinate set in the diagram data storage. """ __tupleType__ = diagramTuplePrefix + 'DiagramCoordSetTuple' #: The ID of the coordinate set. key: int = TupleField() #: The name of the coordinate set. name: str = TupleField()
class UserLoggedInTuple(Tuple): """ User Logged In Tuple This tuple is sent to the devices when a user logs in. If the device receives this tuple and the deviceToken doesn't match the current device, then the user is logged off. """ __tupleType__ = userPluginTuplePrefix + "UserLoggedInTuple" userDetails: UserListItemTuple = TupleField() deviceToken: str = TupleField()
class TupleGenericAction(TupleActionABC): """Tuple Generic Action This is a generic action, to be used when the implementor doesn't want to implement concrete classes for each action type. """ __tupleType__ = "vortex.TupleGenericAction" key = TupleField(comment="An optional key for this action", typingType=str) data = TupleField(comment="Optional data for the update", typingType=str)
class SearchResultObjectRouteTuple(Tuple): """ Import Search Object Route This tuple is used to import object routes into the search plugin """ __tupleType__ = searchTuplePrefix + 'SearchResultObjectRouteTuple' #: The title of the route, that the user will see title: str = TupleField() #: The route that the angular app will route to path: str = TupleField()
class GroupDispsTuple(Tuple): """ Group Disps Tuple This tuple stores a list of DispGroups that are in the 'ID:dispgroup' grid key in that coord set. """ __tupleType__ = diagramTuplePrefix + "GroupDispsTuple" coordSetId: int = TupleField() # A GridTuple, already encoded and ready for storage in the clients cache encodedGridTuple: str = TupleField()
class GraphDbTraceResultVertexTuple(Tuple): """ GraphDB Trace Result Vertex Tuple This tuple contains the result of running a trace on the model """ __tupleType__ = graphDbTuplePrefix + 'GraphDbTraceResultVertexTuple' __rawJonableFields__ = ('key', 'props') #: The key of this vertex key: str = TupleField() #: The properties of this vertex props: Dict = TupleField()