/// <summary> /// Checks the type of the sf. /// </summary> /// <param name="S">The s.</param> /// <param name="F">The f.</param> /// <returns>com.mirle.ibg3k0.stc.Common.SECS.SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.</returns> public static com.mirle.ibg3k0.stc.Common.SECS.SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT checkSFType(int S, int F) { com.mirle.ibg3k0.stc.Common.SECS.SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT result = SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.Recognize; string streamFunction = string.Format("S{0}F{1}", S, F); if (!StreamIDArray.Contains(S)) { result = SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.Unrecognized_Stream_Type; } else if (!FunctionIDArray.Contains(F)) { result = SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.Unrecognized_Function_Type; } else { Type type = Type.GetType("com.mirle.ibg3k0.sc.Data.SECS." + streamFunction); Type typeBase = Type.GetType("com.mirle.ibg3k0.stc.Data.SecsData." + streamFunction); if (type == null && typeBase == null && F != 0) { result = SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.Unrecognized_Stream_Type; } } return(result); }
//#region PPTYPE //public static readonly string PPTYPE_Equipment = "E"; //public static readonly string PPTYPE_Unit = "U"; //public static readonly string PPTYPE_SubUnit = "S"; //#endregion PPTYPE /// <summary> /// Checks the data value. /// </summary> /// <param name="name">The name.</param> /// <param name="value">The value.</param> /// <returns>com.mirle.ibg3k0.stc.Common.SECS.SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.</returns> public static com.mirle.ibg3k0.stc.Common.SECS.SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT checkDataValue( string name, string value) { com.mirle.ibg3k0.stc.Common.SECS.SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT result = SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.Recognize; //if (name.Trim().Equals("CRST")) //{ // //SECSConst.CRST // if (!SECSConst.CRST.Contains(value.Trim())) // { // return SECSAgent.SECS_STREAM_FUNCTION_CHECK_RESULT.Illegal_Data_Value_Format; // } //} return(result); }