Exemplo n.º 1
0
        public virtual WSNPNData GeneratePNXml(XmlDocument doc, string id, bool isAbstracted, float xShift, float yShift, double probPathCongestion)
        {
            string name = "Channel";

            if (isAbstracted)
            {
                name = PREFIX_XML_ABSTRACTED + name;
            }

            return(WSNUtil.GetPNXml(doc, id, name, ID, xShift, yShift, probPathCongestion));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Generate the PN model of this sensor
        /// </summary>
        /// <param name="PNRes">PN model resource reference document</param>
        /// <param name="xShift"></param>
        /// <param name="yShift"></param>
        /// <returns></returns>
        public virtual WSNPNData GeneratePNXml(XmlDocument doc, string id, bool isAbstracted, float xShift, float yShift, double probPathCongestion = 0.0)
        {
            WSNPNData data = null;

            do
            {
                if (ID < 0)
                {
                    break;
                }

                string pnName = NodeType.ToString();
                if (isAbstracted)
                {
                    pnName = PREFIX_XML_ABSTRACTED + NodeType.ToString();
                }
                data = WSNUtil.GetPNXml(doc, id, pnName, ID.ToString(), xShift, yShift);
            } while (false);

            return(data);
        }