00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 __facility__ = "Online"
00011 __abstract__ = "Provides port numbers to connect proxies together"
00012 __author__ = "<perazzo@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online"
00013 __updated__ = "$Date: 2006/04/14 02:19:44 $"
00014 __version__ = "$Revision: 1.4 $"
00015 __release__ = "$Name: HEAD $"
00016 __credits__ = "SLAC"
00017
00018 import LICOS.copyright_SLAC
00019
00020 class VscProxyPorts(object):
00021 """!\brief Class to deal with interrelations between the various TCP ports
00022 used by the LICOS proxies and current value table.
00023
00024 """
00025 VscCtrlPort = 3000
00026 SeDiagnosticCtrlPortOffset = 1
00027 SeTelemetryCtrlPortOffset = 2
00028 SeScienceCtrlPortOffset = 3
00029 CvtTelemetryCtrlPortOffset = 4
00030 CvtOutCtrlPortOffset = 5
00031 DiagMonitorPortOffset = 6
00032 TelemMonitorPortOffset = 7
00033
00034 def __init__(self, portbase):
00035 self.__portbase = portbase
00036
00037 def vsc(self):
00038 """!\brief Returns the port used to connect to the VSC crate.
00039
00040 \return VSC control port
00041 """
00042 return VscProxyPorts.VscCtrlPort
00043
00044 def diagnostic(self):
00045 """!\brief Returns the port used to connect to the VSC diagnostic proxy.
00046
00047 \return Diagnostic proxy port
00048 """
00049 return self.__portbase+VscProxyPorts.SeDiagnosticCtrlPortOffset
00050
00051 def telemetry(self):
00052 """!\brief Returns the port used to connect to the VSC telemetry proxy.
00053
00054 \return Telemetry proxy port
00055 """
00056 return self.__portbase+VscProxyPorts.SeTelemetryCtrlPortOffset
00057
00058 def science(self):
00059 """!\brief Returns the port used to connect to the VSC science proxy.
00060
00061 \return Science proxy port
00062 """
00063 return self.__portbase+VscProxyPorts.SeScienceCtrlPortOffset
00064
00065 def cvt(self):
00066 """!\brief Returns the port used by the Current Value Table to
00067 connect to the VSC telemetry proxy.
00068
00069 \return CVT telemetry port
00070 """
00071 return self.__portbase+VscProxyPorts.CvtTelemetryCtrlPortOffset
00072
00073 def cvtOut(self):
00074 """!\brief Returns the port used by Current Value Table clients
00075 to connect to the CVT proper.
00076
00077 \return CVT control port
00078 """
00079 return self.__portbase+VscProxyPorts.CvtOutCtrlPortOffset
00080
00081 def telemMon(self):
00082 """!\brief Returns the port used by the standalone telemetry monitor.
00083
00084 \return Telemetry monitor port
00085 """
00086 return self.__portbase+VscProxyPorts.TelemMonitorPortOffset
00087
00088 def diagMon(self):
00089 """!\brief Returns the port used by the standalone diagnostic monitor.
00090
00091 \return Diagnostic monitor port
00092 """
00093 return self.__portbase+VscProxyPorts.DiagMonitorPortOffset