예제 #1
0
        /// <summary>
        /// Populates itself based on the OSCA parameters in the ByRefPDO object
        /// </summary>
        /// <param name="byRefPDO"></param>
        public static void PopulateSelfFromByRef(ORPDOClass byRefPDO)
        {
            //Extract the OSCA parameters from the ByRef Class

            if (null != byRefPDO)
            {
                contextId   = (int)byRefPDO.GetAttribute("b_osca.i_context_id");
                errorNumber = (int)byRefPDO.GetAttribute("b_osca.i_error_no");
                errorType   = (int)byRefPDO.GetAttribute("b_osca.i_error_type");
                messageText = (string)byRefPDO.GetAttribute("b_osca.v_msg_txt");
                isEmpty     = false;
            }
        }
예제 #2
0
        /// <summary>
        /// The underlying delegate method to get Attribute value
        /// </summary>
        /// <param name="useByValParameter">Flag to indicate which PDO to use.</param>
        /// <param name="attributeName">The attribute name.</param>
        /// <returns>The attribute value.</returns>
        public static object GetAttribute(ORPDOClass pdo, string attributeName)
        {
            object rtn;

            rtn = pdo.GetAttribute(attributeName);

            return(rtn);
        }
예제 #3
0
        /// <summary>
        /// Populates itself based on the OSCA parameters in the ByRefPDO object
        /// </summary>
        /// <param name="byRefPDO"></param>
        public static void PopulateSelfFromByRef(ORPDOClass byRefPDO)
        {
            //Extract the OSCA parameters from the ByRef Class

            if (null != byRefPDO)
            {
                contextId = (int)byRefPDO.GetAttribute("b_osca.i_context_id");
                errorNumber = (int)byRefPDO.GetAttribute("b_osca.i_error_no");
                errorType = (int)byRefPDO.GetAttribute("b_osca.i_error_type");
                messageText = (string)byRefPDO.GetAttribute("b_osca.v_msg_txt");
                isEmpty = false;
            }
        }
예제 #4
0
        /// <summary>
        /// The underlying delegate method to get Attribute value
        /// </summary>
        /// <param name="useByValParameter">Flag to indicate which PDO to use.</param>
        /// <param name="attributeName">The attribute name.</param>
        /// <returns>The attribute value.</returns>
        public static object GetAttribute(ORPDOClass pdo, string attributeName)
        {
            object rtn;

            rtn = pdo.GetAttribute(attributeName);

            return rtn;
        }