Exemple #1
0
        public static ReturnKnowType SetCommandHandler(STATIONNAME StationName, DEVICECATEGORY DeviceCategory, DEVICENAME DeviceName, dynamic CommandName, Object[] Values, DateTime CommandDateTime)
        {
            StationHandler ThisSite = KeeperData.FirstOrDefault(Item => Item.StationName == StationName);

            if (ThisSite != null)
            {
                Boolean AckState = false;

                if (StationName == STATIONNAME.ASTROSERVER)
                {
                    AckState = true;
                }
                else
                {
                    return(ThisSite.RelayCommandToStation(DeviceCategory, DeviceName, CommandName, Values));
                }

                return(ReturnKnowType.DefineReturn(ReturnStatus.SUCESSFUL, null, AckState));
            }

            return(ReturnKnowType.DefineReturn(ReturnStatus.FAILED, "(#TT003) Failed to relay set command to station.", false));
        }