Commit 949e7b6e authored by Pavel Vaynerman's avatar Pavel Vaynerman

add BLINK2, BLINK3 to IOControl (and new release)

parent 0c3eb913
...@@ -175,6 +175,9 @@ rm -f %buildroot%_libdir/*.la ...@@ -175,6 +175,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc %exclude %_pkgconfigdir/libUniSet.pc
%changelog %changelog
* Wed Aug 19 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter49
- add BLINK2, BLINK3 to IOControl
* Tue Aug 18 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter48 * Tue Aug 18 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter48
- fixed bug in PassiveTimer - fixed bug in PassiveTimer
......
...@@ -114,14 +114,24 @@ class IOControl: ...@@ -114,14 +114,24 @@ class IOControl:
friend std::ostream& operator<<(std::ostream& os, IOInfo& inf ); friend std::ostream& operator<<(std::ostream& os, IOInfo& inf );
}; };
struct IOPriority
{
IOPriority(int p, int i):
priority(p),index(i){}
int priority;
int index;
};
void execute(); void execute();
protected: protected:
void iopoll(); /*!< / */ void iopoll(); /*!< / */
void blink(); void ioread( IOInfo* it );
void check_testlamp(); void check_testlamp();
void blink();
// //
virtual void processingMessage( UniSetTypes::VoidMessage* msg ); virtual void processingMessage( UniSetTypes::VoidMessage* msg );
virtual void sysCommand( UniSetTypes::SystemMessage* sm ); virtual void sysCommand( UniSetTypes::SystemMessage* sm );
...@@ -157,7 +167,12 @@ class IOControl: ...@@ -157,7 +167,12 @@ class IOControl:
typedef std::vector<IOInfo> IOMap; typedef std::vector<IOInfo> IOMap;
IOMap iomap; /*!< / */ IOMap iomap; /*!< / */
typedef std::list<IOPriority> PIOMap;
PIOMap pmap; /*!< / */
unsigned int maxItem; /*!< ( ) */ unsigned int maxItem; /*!< ( ) */
unsigned int maxHalf;
int filtersize; int filtersize;
float filterT; float filterT;
...@@ -168,13 +183,26 @@ class IOControl: ...@@ -168,13 +183,26 @@ class IOControl:
UniversalInterface ui; UniversalInterface ui;
UniSetTypes::ObjectId myid; UniSetTypes::ObjectId myid;
typedef std::list<IOMap::iterator> BlinkList; typedef std::list<IOInfo*> BlinkList;
void addBlink( IOInfo* it, BlinkList& lst );
void delBlink( IOInfo* it, BlinkList& lst );
void blink( BlinkList& lst, bool& bstate );
//
BlinkList lstBlink; BlinkList lstBlink;
PassiveTimer ptBlink; PassiveTimer ptBlink;
bool blink_state; bool blink_state;
void addBlink( IOMap::iterator& it ); //
void delBlink( IOMap::iterator& it ); BlinkList lstBlink2;
PassiveTimer ptBlink2;
bool blink2_state;
//
BlinkList lstBlink3;
PassiveTimer ptBlink3;
bool blink3_state;
UniSetTypes::ObjectId testLamp_S; UniSetTypes::ObjectId testLamp_S;
Trigger trTestLamp; Trigger trTestLamp;
......
...@@ -61,8 +61,8 @@ namespace UniSetTypes ...@@ -61,8 +61,8 @@ namespace UniSetTypes
{ {
lmpOFF = 0, /*!< */ lmpOFF = 0, /*!< */
lmpON = 1, /*!< */ lmpON = 1, /*!< */
lmpBLINK = 2, /*!< */ lmpBLINK = 2, /*!< */
lmpBLINK2 = 3, /*!< */ lmpBLINK2 = 3, /*!< */
lmpBLINK3 = 4 /*!< */ lmpBLINK3 = 4 /*!< */
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment