cosmostat python comment enrichment
This commit is contained in:
@ -1,10 +1,16 @@
|
||||
# this class file is for the cosmostat service
|
||||
#################################################################
|
||||
#################################################################
|
||||
### Cosmostat Component and System Class
|
||||
#################################################################
|
||||
#################################################################
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
import time
|
||||
import weakref
|
||||
import base64, hashlib
|
||||
from typing import Dict, Any, List
|
||||
# Import Cosmos Settings
|
||||
from Cosmos_Settings import *
|
||||
|
||||
# Global Class Vars
|
||||
@ -33,7 +39,13 @@ for entry in component_class_tree:
|
||||
|
||||
#################################################################
|
||||
#################################################################
|
||||
# Component Class
|
||||
### Component Class
|
||||
### Each Component type is defined by the descriptor and built
|
||||
### as part of the System Class Instantiation
|
||||
### Each Component Object contains static and dynamic data
|
||||
### The static data is declared once at instantiation
|
||||
### THe dynamic data is periodically updated by the application
|
||||
### where the System Class Object is instantiated
|
||||
#################################################################
|
||||
#################################################################
|
||||
|
||||
@ -42,8 +54,7 @@ class Component:
|
||||
############################################################
|
||||
# instantiate new component
|
||||
# this_device is set when the component has multiple instances
|
||||
############################################################
|
||||
|
||||
############################################################
|
||||
|
||||
def __init__(self, name: str, comp_type: str, parent_system, this_device=None):
|
||||
# begin init
|
||||
@ -246,7 +257,7 @@ class Component:
|
||||
return result
|
||||
|
||||
########################################################
|
||||
# random data functions
|
||||
# various data functions
|
||||
########################################################
|
||||
|
||||
# complex data type return
|
||||
@ -301,7 +312,15 @@ class Component:
|
||||
|
||||
############################################################
|
||||
############################################################
|
||||
# System Class
|
||||
### System Class
|
||||
### The System Class uses the Descriptor to build a List
|
||||
### of Components and interact with the data in a
|
||||
### useful manner. The System Object is similar to a
|
||||
### Component Object in that it has Static and Dynamic
|
||||
### properties, which are populated in a similar manner
|
||||
### to the Components. In fact, this is designed for the
|
||||
### System object to update Component Dymanic Metrics
|
||||
### as part of the same subroutine that updates its own
|
||||
############################################################
|
||||
############################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user