Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ChannelData"/> class.
        /// </summary>
        /// <param name="file">The file.</param>
        /// <param name="reader">The reader.</param>
        public ChannelData(NiFile file, BinaryReader reader)
		{
			this.Type = (eChannelType)reader.ReadUInt32();
			this.Convention = (eChannelConvention)reader.ReadUInt32();
			this.BitsPerChannel = reader.ReadByte();
			this.UnkownByte = reader.ReadByte();
		}
Exemplo n.º 2
0
 public ChannelData(NiFile file, BinaryReader reader)
 {
     Type           = (eChannelType)reader.ReadUInt32();
     Convention     = (eChannelConvention)reader.ReadUInt32();
     BitsPerChannel = reader.ReadByte();
     UnkownByte     = reader.ReadByte();
 }
Exemplo n.º 3
0
        public static eCardState InitCh()
        {
            _ChNumTotal = DJDBDK.Tc08a32.CheckValidCh();

            for (int i = 0; i < _ChNumTotal; i++)
            {
                eChannelType chType  = (eChannelType)Enum.Parse(typeof(eChannelType), DJDBDK.Tc08a32.CheckChType(i).ToString());
                LineInfo     NewLine = new LineInfo();

                NewLine.Type  = chType;
                NewLine.iChID = i;
                Llineinfo.Add(NewLine);
            }
            _CardStatus = (eCardState)Enum.Parse(typeof(eCardState), DJDBDK.Tc08a32.EnableCard(ChNumTotal, 1024 * ChNumTotal).ToString());

            if (CardStatus != eCardState.Success)
            {
                FreeDrv();
            }

            _ChNumAvailable = Llineinfo.Where(n => n.Type != eChannelType.Empty).ToList().Count;
            return(CardStatus);
        }
Exemplo n.º 4
0
    public static void SetDebugChannel(eChannelType channel, bool state)
    {
        DEBUG_CHANNELS[(int)channel] = state;
        string s = channel.ToString() + ": CHANNEL IS " + state.ToString() + "\n";
        UnityEngine.Debug.Log(s);

        if( OnSetDebugChannel != null ) {
            OnSetDebugChannel(null, new DbgEventArgs(s));
        }
    }
Exemplo n.º 5
0
    public static void LogMethodCall(eChannelType channel)
    {
        if( DEBUG_CHANNELS[(int)channel] == true )
        {
            StackFrame sf = new StackFrame(1);
            MethodBase mb = sf.GetMethod();
            System.Type t = mb.DeclaringType;

            string s = System.String.Format(channel.ToString() + ": " + "METHODCALL {0}::{1} \n", t.Name, mb.Name);
            UnityEngine.Debug.Log(s);

            if( OnLogMethodCall != null ) {
                OnLogMethodCall(null, new DbgEventArgs(s));
            }
        }
    }
Exemplo n.º 6
0
    public static void Log(eChannelType channel, string message)
    {
        if( DEBUG_CHANNELS[(int)channel] == true )
        {
            string s = channel.ToString() + ": " + message + "\n";
            UnityEngine.Debug.Log(s);

            if( OnLog != null ) {
                OnLog(null, new DbgEventArgs(s));
            }
        }
    }