Example #1
0
            /// <summary>
            /// Creates new data block row and assigns default values
            /// </summary>
            /// <param name="groupID">Group id</param>
            /// <param name="pPrefix">prefix for the station name</param>
            /// <param name="DataType">Type of the data.</param>
            /// <param name="Address">The address.</param>
            /// <returns>New <see cref="DataBlocksRow"/></returns>
            public DataBlocksRow NewDataBlocksRow(long groupID, string pPrefix, ulong DataType, ulong Address)
            {
                DataBlocksRow dr = NewDataBlocksRow();

                dr.Name     = string.Format("{1}{2}Block{0}", dr.DatBlockID.ToString(), pPrefix, m_IdentSep);
                dr.GroupID  = groupID;
                dr.DataType = DataType;
                dr.Address  = Address;
                return(dr);
            }
Example #2
0
            /// <summary>
            /// Creates new data block row and assigns default values
            /// </summary>
            /// <param name="groupID">Group ID</param>
            /// <param name="pRowToBeCopied">row that is copied</param>
            /// <param name="pShallowCopy">indicate if the copy is shallow or deep</param>
            /// <param name="pPrefix">prefix for the name</param>
            public void NewDataBlocksRow
                (long groupID, DataBlocksRow pRowToBeCopied, bool pShallowCopy, string pPrefix)
            {
                DataBlocksRow dr = NewDataBlocksRow(groupID, pPrefix,
                                                    pRowToBeCopied.DataType, pRowToBeCopied.Address);

                AddDataBlocksRow(dr);
                if (!pShallowCopy)
                {
                    foreach (TagsRow tr in pRowToBeCopied.GetTagsRows())
                    {
                        ((ComunicationNet)DataSet).Tags.NewTagsRow(dr.DatBlockID, tr, false, dr.Name);
                    }
                }
                return;
            }