public MatrixSwitcher(string p_strName, string p_strCOM, string p_strIPAddress, string p_strCurrentSession, logLevel p_objLogLevel = logLevel.ErrorOnly) { SwitcherName = p_strName; SwitcherCOMPort = p_strCOM; SwitcherIPAddress = p_strIPAddress; myDB = new AutomationsEntities(); m_objLogger = new Logger(ref myDB, p_strCurrentSession, p_objLogLevel, "MatrixSwitcher()"); m_blnViaHTTP = true; //Serial Commands were not tested as of yet. Due to limitations, get requests will be used to control through the switchers admin UI m_lstAvailableCommands = new List <tblMatrixSwitcherCommand>(); if (m_blnViaHTTP) { //fill the list try { m_objLogger.logToMemory(string.Format("{0}: {1}: Generating the list of available commands via.", "New MatrixSwitcher()", SwitcherName)); m_lstAvailableCommands = (from commands in myDB.tblMatrixSwitcherCommands orderby commands.CommandID select commands).ToList(); m_objLogger.logToMemory(string.Format("{0}: Matrix Switcher Command Count: {1}", "New MatrixSwitcher()", m_lstAvailableCommands.Count())); } catch { } finally { m_objLogger.writePendingToDB(p_strFunctionName: "New MatrixSwitcher()"); } } }
public ProjectorLift(string p_strName, string p_strCOM, int p_strMoveTime, string p_strCurrentSession, logLevel p_objLogLevel = logLevel.ErrorOnly) { LiftName = p_strName; LiftCOMPort = p_strCOM; LiftMoveTime = p_strMoveTime; myDB = new AutomationsEntities(); m_objLogger = new Logger(ref myDB, p_strCurrentSession, p_objLogLevel, "ProjectorLift()"); }
public Logger(ref AutomationsEntities p_objMyDB, string p_strSessionID, logLevel p_objLogLevel = logLevel.ErrorOnly, string p_strClassName = "") { m_objLogLevel = p_objLogLevel; m_objMemoryLog = new StringBuilder(); myDB = p_objMyDB; m_strSessionID = p_strSessionID; m_strClassName = p_strClassName; }
public Projector(string p_strName, string p_strIP, string p_strLiftAssociation, string p_strCurrentSession, logLevel p_objLogLevel = logLevel.ErrorOnly) { projectorName = p_strName; projectorIP = p_strIP; projectorLiftAssociation = p_strLiftAssociation; m_objProjectorConnection = null; myDB = new AutomationsEntities(); m_objLogger = new Logger(ref myDB, p_strCurrentSession, p_objLogLevel, "Projector()"); }