initial commit
This commit is contained in:
82
Cs_HMI/SubProject/ProPLC/Arduino/EventsIO.cs
Normal file
82
Cs_HMI/SubProject/ProPLC/Arduino/EventsIO.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace arDev.Arduino
|
||||
{
|
||||
public partial class DIO
|
||||
{
|
||||
/// <summary>
|
||||
/// Digital Input/Output Changed
|
||||
/// </summary>
|
||||
public event EventHandler<IOValueEventArgs> ValueChanged;
|
||||
public event EventHandler<FlagValueEventArgs> FlagChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 마그넷 센서의 값이 변경되었을때 발생 함
|
||||
/// </summary>
|
||||
public event EventHandler PositionChanged;
|
||||
|
||||
///// <summary>
|
||||
///// Digital Input/Output Message
|
||||
///// </summary>
|
||||
//public event EventHandler<MessageEventArgs> Message;
|
||||
|
||||
public class FlagValueEventArgs : EventArgs
|
||||
{
|
||||
private int _arridx;
|
||||
private Boolean _oldvalue;
|
||||
private Boolean _newvalue;
|
||||
|
||||
public int ArrIDX { get { return _arridx; } }
|
||||
public Boolean OldValue { get { return _oldvalue; } }
|
||||
public Boolean NewValue { get { return _newvalue; } }
|
||||
|
||||
public FlagValueEventArgs( int ArrIDX, Boolean oldvalue, Boolean newvalue)
|
||||
{
|
||||
_arridx = ArrIDX;
|
||||
_oldvalue = oldvalue;
|
||||
_newvalue = newvalue;
|
||||
}
|
||||
}
|
||||
|
||||
public class IOValueEventArgs : EventArgs
|
||||
{
|
||||
private int _arridx;
|
||||
private Boolean _oldvalue;
|
||||
private Boolean _newvalue;
|
||||
private IODirection _dir;
|
||||
|
||||
public int ArrIDX { get { return _arridx; } }
|
||||
public Boolean OldValue { get { return _oldvalue; } }
|
||||
public Boolean NewValue { get { return _newvalue; } }
|
||||
public IODirection Direction { get { return _dir; } }
|
||||
|
||||
public IOValueEventArgs(IODirection dir, int ArrIDX, Boolean oldvalue, Boolean newvalue)
|
||||
{
|
||||
_arridx = ArrIDX;
|
||||
_oldvalue = oldvalue;
|
||||
_newvalue = newvalue;
|
||||
_dir = dir;
|
||||
}
|
||||
}
|
||||
|
||||
//public class MessageEventArgs : EventArgs
|
||||
//{
|
||||
// private Boolean _isError = false;
|
||||
// public Boolean IsError { get { return _isError; } }
|
||||
// private string _message = string.Empty;
|
||||
// public string Message { get { return _message; } }
|
||||
// private Arduino.MessageType _mtype;
|
||||
// public Arduino.MessageType MessageType { get { return _mtype; } }
|
||||
// public MessageEventArgs(Arduino.MessageType mType, string Message, Boolean isError)
|
||||
// {
|
||||
// _isError = isError;
|
||||
// _message = Message;
|
||||
// this._mtype = mType;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user