示例#1
0
            /// <summary>
            /// Gets the current owner of the RCB
            /// </summary>
            /// <returns>The owner information</returns>
            public byte[] GetOwner()
            {
                IntPtr mmsValuePtr = ClientReportControlBlock_getOwner(self);

                MmsValue octetStringVal = new MmsValue(mmsValuePtr);

                return(octetStringVal.getOctetString());
            }
            /// <summary>
            /// Gets the current owner of the RCB
            /// </summary>
            /// <returns>The owner information, or null when no owner information is available.</returns>
            public byte[] GetOwner()
            {
                IntPtr mmsValuePtr = ClientReportControlBlock_getOwner(self);

                if (mmsValuePtr != IntPtr.Zero)
                {
                    MmsValue octetStringVal = new MmsValue(mmsValuePtr);

                    return(octetStringVal.getOctetString());
                }
                else
                {
                    return(null);
                }
            }
            /// <summary>
            /// Gets the entryID of RCB
            /// </summary>
            /// Returns the EntryID of the last received GetRCBValues service response.
            /// The EntryID is only present in buffered RCBs (BRCBs).
            ///
            /// <returns>The entry ID</returns>
            public byte[] GetEntryID()
            {
                IntPtr entryIdRef = ClientReportControlBlock_getEntryId(self);

                if (entryIdRef == IntPtr.Zero)
                {
                    return(null);
                }
                else
                {
                    MmsValue entryId = new MmsValue(entryIdRef);

                    return(entryId.getOctetString());
                }
            }
            public PhyComAddress GetDstAddress()
            {
                PhyComAddress addr = new PhyComAddress();

                IntPtr value = ClientGooseControlBlock_getDstAddress_addr(self);

                MmsValue mmsValue = new MmsValue(value);

                byte[] dstMacAddr = mmsValue.getOctetString();

                dstMacAddr.CopyTo(addr.dstAddress, 0);

                addr.dstAddress = dstMacAddr;

                addr.appId        = ClientGooseControlBlock_getDstAddress_appid(self);
                addr.vlanId       = ClientGooseControlBlock_getDstAddress_vid(self);
                addr.vlanPriority = ClientGooseControlBlock_getDstAddress_priority(self);

                return(addr);
            }
示例#5
0
            /// <summary>
            /// Gets the EntryID of this report.
            /// </summary>
            /// <returns>The entryID as a byte array representing an MMS octet string.</returns>
            public byte[] GetEntryId()
            {
                IntPtr entryIdRef = ClientReport_getEntryId (self);

                if (entryIdRef == IntPtr.Zero)
                    return null;
                else {
                    MmsValue entryId = new MmsValue (entryIdRef);

                    return entryId.getOctetString ();
                }
            }