예제 #1
0
파일: OSCTimeTag.cs 프로젝트: akx/ltag
        /// <summary>
        /// Returns a value indicating whether this instance is equal to a specified OscTimeTag instance.
        /// </summary>
        /// <param name="value">An object to compare to this instance.</param>
        /// <returns>true if value is an instance of System.DateTime and equals the value of this instance; otherwise, false.</returns>
        public bool Equals(OscTimeTag value)
        {
            if ((object)value == null)
            {
                return false;
            }

            return mTimeStamp.Equals(value.mTimeStamp);
        }
예제 #2
0
파일: OSCPacket.cs 프로젝트: akx/ltag
        protected static DateTime unpackTimeTag(byte[] bytes, ref int start)
        {
            byte[] data = new byte[8];
            for (int i = 0; i < 8; i++, start++) data[i] = bytes[start];
            var tag = new OscTimeTag(data);

            return tag.DateTime;
        }
예제 #3
0
파일: OSCTimeTag.cs 프로젝트: akx/ltag
 /// <summary>
 /// Determines whether two specified instances of OscTimeTag are equal.
 /// </summary>
 /// <param name="lhs">An OscTimeTag.</param>
 /// <param name="rhs">An OscTimeTag.</param>
 /// <returns>true if lhs and rhs represent the same time tag; otherwise, false.</returns>
 public static bool Equals(OscTimeTag lhs, OscTimeTag rhs)
 {
     return lhs.Equals(rhs);
 }
예제 #4
0
파일: OSCPacket.cs 프로젝트: akx/ltag
        protected static byte[] packTimeTag(DateTime value)
        {
            var tag = new OscTimeTag();
            tag.Set(value);

            return tag.ToByteArray(); ;
        }