コード例 #1
0
        public LabEquipmentStatus GetLabEquipmentStatus()
        {
            const string STRLOG_MethodName = "GetLabEquipmentStatus";

            Logfile.WriteCalled(STRLOG_ClassName, STRLOG_MethodName);

            LabEquipmentStatus labEquipmentStatus = null;

            //
            // Check caller access is authorised
            //
            if (Authorised(authHeader) == true)
            {
                //
                // Pass on to the equipment engine
                //
                LabStatus labStatus = Global.equipmentManager.GetLabEquipmentStatus();
                labEquipmentStatus = new LabEquipmentStatus(labStatus.online, labStatus.labStatusMessage);
            }
            else
            {
                labEquipmentStatus = new LabEquipmentStatus(false, STRLOG_AccessDenied);
            }

            string logMessage = STRLOG_Online + labEquipmentStatus.online.ToString() +
                                Logfile.STRLOG_Spacer + STRLOG_LabStatusMessage + Logfile.STRLOG_Quote + labEquipmentStatus.statusMessage + Logfile.STRLOG_Quote;

            Logfile.WriteCompleted(STRLOG_ClassName, STRLOG_MethodName, logMessage);

            return(labEquipmentStatus);
        }
コード例 #2
0
        public LabEquipmentStatus GetLabEquipmentStatus()
        {
            const string STRLOG_MethodName = "GetLabEquipmentStatus";

            Logfile.WriteCalled(STRLOG_ClassName, STRLOG_MethodName);

            LabEquipmentStatus labEquipmentStatus = null;

            //
            // Check caller access is authorised
            //
            if (Authorised(authHeader) == true)
            {
                //
                // Pass on to the equipment engine
                //
                LabStatus labStatus = Global.equipmentManager.GetLabEquipmentStatus();
                labEquipmentStatus = new LabEquipmentStatus(labStatus.online, labStatus.labStatusMessage);
            }
            else
            {
                labEquipmentStatus = new LabEquipmentStatus(false, STRLOG_AccessDenied);
            }

            string logMessage = STRLOG_Online + labEquipmentStatus.online.ToString() +
                Logfile.STRLOG_Spacer + STRLOG_LabStatusMessage + Logfile.STRLOG_Quote + labEquipmentStatus.statusMessage + Logfile.STRLOG_Quote;

            Logfile.WriteCompleted(STRLOG_ClassName, STRLOG_MethodName, logMessage);

            return labEquipmentStatus;
        }