com0com-cvs Mailing List for Null-modem emulator (Page 17)
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
You can subscribe to this list here.
2005 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
(13) |
Jun
(18) |
Jul
(9) |
Aug
(10) |
Sep
(15) |
Oct
(6) |
Nov
(9) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(4) |
Mar
(4) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(6) |
Aug
(9) |
Sep
(1) |
Oct
(27) |
Nov
(22) |
Dec
(3) |
2007 |
Jan
(13) |
Feb
(16) |
Mar
(2) |
Apr
(3) |
May
(7) |
Jun
(17) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(20) |
Nov
(18) |
Dec
(1) |
2008 |
Jan
|
Feb
(3) |
Mar
(46) |
Apr
(40) |
May
(4) |
Jun
(9) |
Jul
(7) |
Aug
(62) |
Sep
(25) |
Oct
(51) |
Nov
(67) |
Dec
(81) |
2009 |
Jan
(13) |
Feb
(31) |
Mar
(12) |
Apr
|
May
(10) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
(12) |
Jun
(9) |
Jul
(12) |
Aug
(7) |
Sep
(6) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
(26) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(23) |
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vyacheslav F. <vf...@us...> - 2008-10-16 07:01:05
|
Update of /cvsroot/com0com/hub4com/plugins/lsrmap In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29792/lsrmap Log Message: Directory /cvsroot/com0com/hub4com/plugins/lsrmap added to the repository |
From: Vyacheslav F. <vf...@us...> - 2008-10-16 06:57:35
|
Update of /cvsroot/com0com/hub4com/plugins/serial In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29368 Modified Files: comparams.cpp Log Message: Added ignoring the case of the params Index: comparams.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/serial/comparams.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comparams.cpp 28 Aug 2008 10:24:35 -0000 1.3 --- comparams.cpp 16 Oct 2008 06:57:29 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/10/16 06:57:29 vfrolov + * Added ignoring the case of the params + * * Revision 1.3 2008/08/28 10:24:35 vfrolov * Removed linking with ....utils.h and ....utils.cpp *************** *** 48,63 **** /////////////////////////////////////////////////////////////// - static struct { - DWORD val; - const char *pName; - } event_names[] = { - {EV_CTS, "cts"}, - {EV_DSR, "dsr"}, - {EV_RLSD, "dcd"}, - {EV_RING, "ring"}, - {EV_BREAK, "break"}, - {EV_ERR, "err"}, - }; - /////////////////////////////////////////////////////////////// ComParams::ComParams() : baudRate(CBR_19200), --- 51,54 ---- *************** *** 76,80 **** BOOL ComParams::SetBaudRate(const char *pBaudRate) { ! if (*pBaudRate == 'c') { baudRate = -1; return TRUE; --- 67,71 ---- BOOL ComParams::SetBaudRate(const char *pBaudRate) { ! if (tolower(*pBaudRate) == 'c') { baudRate = -1; return TRUE; *************** *** 91,95 **** BOOL ComParams::SetByteSize(const char *pByteSize) { ! if (*pByteSize == 'c') { byteSize = -1; return TRUE; --- 82,86 ---- BOOL ComParams::SetByteSize(const char *pByteSize) { ! if (tolower(*pByteSize) == 'c') { byteSize = -1; return TRUE; *************** *** 106,110 **** BOOL ComParams::SetParity(const char *pParity) { ! switch (*pParity) { case 'n': parity = NOPARITY; break; case 'o': parity = ODDPARITY; break; --- 97,101 ---- BOOL ComParams::SetParity(const char *pParity) { ! switch (tolower(*pParity)) { case 'n': parity = NOPARITY; break; case 'o': parity = ODDPARITY; break; *************** *** 120,124 **** BOOL ComParams::SetStopBits(const char *pStopBits) { ! switch (*pStopBits) { case '1': if ((pStopBits[1] == '.' || pStopBits[1] == ',') && pStopBits[2] == '5') --- 111,115 ---- BOOL ComParams::SetStopBits(const char *pStopBits) { ! switch (tolower(*pStopBits)) { case '1': if ((pStopBits[1] == '.' || pStopBits[1] == ',') && pStopBits[2] == '5') *************** *** 154,158 **** } else ! if (*pFlagStr == 'c') { *pFlag = -1; } --- 145,149 ---- } else ! if (tolower(*pFlagStr) == 'c') { *pFlag = -1; } |
From: Vyacheslav F. <vf...@us...> - 2008-10-16 06:50:05
|
Update of /cvsroot/com0com/hub4com/plugins/pinmap In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28926 Modified Files: filter.cpp Log Message: Added wiring to DCE's output pins Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/pinmap/filter.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** filter.cpp 2 Oct 2008 08:20:17 -0000 1.9 --- filter.cpp 16 Oct 2008 06:49:58 -0000 1.10 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2008/10/16 06:49:58 vfrolov + * Added wiring to DCE's output pins + * * Revision 1.9 2008/10/02 08:20:17 vfrolov * Added connect mapping *************** *** 87,90 **** --- 90,97 ---- {"out1=", PIN_STATE_OUT1}, {"out2=", PIN_STATE_OUT2}, + {"cts=", PIN_STATE_CTS}, + {"dsr=", PIN_STATE_DSR}, + {"ring=", PIN_STATE_RI}, + {"dcd=", PIN_STATE_DCD}, {"break=", PIN_STATE_BREAK}, }; *************** *** 278,281 **** --- 285,292 ---- << " --out1=[!]<s> - wire input state of <s> to output pin OUT1." << endl << " --out2=[!]<s> - wire input state of <s> to output pin OUT2." << endl + << " --cts=[!]<s> - wire input state of <s> to output pin CTS." << endl + << " --dsr=[!]<s> - wire input state of <s> to output pin DSR." << endl + << " --ring=[!]<s> - wire input state of <s> to output pin RI." << endl + << " --dcd=[!]<s> - wire input state of <s> to output pin DCD." << endl << " --break=[!]<s> - wire input state of <s> to output state of BREAK." << endl << endl *************** *** 421,424 **** --- 432,436 ---- cerr << ((Filter *)hFilter)->PortName(nFromPort) << " WARNING: Requested by filter " << ((Filter *)hFilter)->FilterName() + << " for port " << ((Filter *)hFilter)->PortName(nToPort) << " option(s) 0x" << hex << fail_options << dec << " not accepted" << endl; |
From: Vyacheslav F. <vf...@us...> - 2008-10-16 06:46:23
|
Update of /cvsroot/com0com/hub4com/plugins/trace In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28551 Modified Files: filter.cpp Log Message: Added PIN_STATE_* for DCE Added HUB_MSG_TYPE_SET_LSR Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/trace/filter.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** filter.cpp 2 Oct 2008 14:01:43 -0000 1.4 --- filter.cpp 16 Oct 2008 06:46:13 -0000 1.5 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.5 2008/10/16 06:46:13 vfrolov + * Added PIN_STATE_* for DCE + * Added HUB_MSG_TYPE_SET_LSR + * * Revision 1.4 2008/10/02 14:01:43 vfrolov * Added help *************** *** 197,227 **** << " " << pProgPath << " --load=,,_END_" << endl << " COM4" << endl - << " --trace-file=com.log" << endl - << " --create-filter=trace,com" << endl - << " --add-filters=0:com" << endl << endl ! << " --create-filter=pin2con" << endl ! << " --add-filters=0:pin2con" << endl << " --trace-file=p2c.log" << endl ! << " --create-filter=trace,p2c" << endl ! << " --add-filters=0:p2c" << endl ! << endl ! << " --create-filter=awakseq:--awak-seq=aaa" << endl ! << " --add-filters=0:awakseq" << endl << " --trace-file=awk.log" << endl ! << " --create-filter=trace,awk" << endl ! << " --add-filters=0:awk" << endl << endl << " --use-driver=tcp" << endl << " 1.1.1.1:23" << endl << " --trace-file=tcp.log" << endl ! << " --create-filter=trace,tcp" << endl << " --add-filters=1:tcp" << endl << endl - << " --create-filter=telnet" << endl - << " --add-filters=1:telnet" << endl - << " --trace-file=tel.log" << endl - << " --create-filter=trace,tel" << endl - << " --add-filters=1:tel" << endl << " _END_" << endl << " - Trace data to different files by this way:" << endl --- 201,225 ---- << " " << pProgPath << " --load=,,_END_" << endl << " COM4" << endl << endl ! << " --trace-file=com.log" << endl ! << " --create-filter=trace,com,com" << endl ! << " --create-filter=pin2con,com,pin2con" << endl << " --trace-file=p2c.log" << endl ! << " --create-filter=trace,com,p2c" << endl ! << " --create-filter=awakseq,com,awakseq:--awak-seq=aaa" << endl << " --trace-file=awk.log" << endl ! << " --create-filter=trace,com,awk" << endl ! << " --add-filters=0:com" << endl << endl << " --use-driver=tcp" << endl << " 1.1.1.1:23" << endl + << endl << " --trace-file=tcp.log" << endl ! << " --create-filter=trace,tcp,tcp" << endl ! << " --create-filter=telnet,tcp,telnet" << endl ! << " --trace-file=tel.log" << endl ! << " --create-filter=trace,tcp,tel" << endl << " --add-filters=1:tcp" << endl << endl << " _END_" << endl << " - Trace data to different files by this way:" << endl *************** *** 415,418 **** --- 413,417 ---- TOCODE2NAME(HUB_MSG_TYPE_, SET_BR), TOCODE2NAME(HUB_MSG_TYPE_, SET_LC), + TOCODE2NAME(HUB_MSG_TYPE_, SET_LSR), {0, NULL} }; *************** *** 472,475 **** --- 471,478 ---- TOFIELD2NAME2(PIN_STATE_, OUT1), TOFIELD2NAME2(PIN_STATE_, OUT2), + TOFIELD2NAME2(PIN_STATE_, CTS), + TOFIELD2NAME2(PIN_STATE_, DSR), + TOFIELD2NAME2(PIN_STATE_, RI), + TOFIELD2NAME2(PIN_STATE_, DCD), TOFIELD2NAME2(PIN_STATE_, BREAK), {0, 0, NULL} |
From: Vyacheslav F. <vf...@us...> - 2008-10-16 06:45:17
|
Update of /cvsroot/com0com/hub4com/plugins In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28465 Modified Files: plugins_api.h Log Message: Added PIN_STATE_* for DCE Added HUB_MSG_TYPE_SET_LSR Index: plugins_api.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/plugins_api.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** plugins_api.h 30 Sep 2008 08:28:32 -0000 1.12 --- plugins_api.h 16 Oct 2008 06:45:05 -0000 1.13 *************** *** 77,80 **** --- 77,86 ---- #define PIN_STATE_OUT1 0x0004 #define PIN_STATE_OUT2 0x0008 + #define SPS_P2V_MST(p) ((BYTE)(((p) & 0xF000) >> 8)) + #define SPS_V2P_MST(v) (((WORD)(BYTE)(v) << 8) & 0xF000) + #define PIN_STATE_CTS SPS_V2P_MST(MODEM_STATUS_CTS) + #define PIN_STATE_DSR SPS_V2P_MST(MODEM_STATUS_DSR) + #define PIN_STATE_RI SPS_V2P_MST(MODEM_STATUS_RI) + #define PIN_STATE_DCD SPS_V2P_MST(MODEM_STATUS_DCD) #define PIN_STATE_BREAK 0x0100 #define HUB_MSG_TYPE_GET_IN_OPTS (6 | HUB_MSG_UNION_TYPE_PVAL) *************** *** 90,95 **** #define SO_O2V_PIN_STATE(o) ((WORD)(o)) #define SO_V2O_PIN_STATE(v) ((DWORD)(WORD)(v)) ! #define SO_SET_BR ((DWORD)1 << 16) ! #define SO_SET_LC ((DWORD)1 << 17) #define HUB_MSG_TYPE_FAIL_IN_OPTS (8 | HUB_MSG_UNION_TYPE_VAL) #define HUB_MSG_TYPE_RBR_STATUS (9 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_UINT) --- 96,103 ---- #define SO_O2V_PIN_STATE(o) ((WORD)(o)) #define SO_V2O_PIN_STATE(v) ((DWORD)(WORD)(v)) ! #define SO_O2V_LINE_STATUS(o) ((BYTE)((o) >> 16)) ! #define SO_V2O_LINE_STATUS(v) ((DWORD)(BYTE)(v) << 16) ! #define SO_SET_BR ((DWORD)1 << 24) ! #define SO_SET_LC ((DWORD)1 << 25) #define HUB_MSG_TYPE_FAIL_IN_OPTS (8 | HUB_MSG_UNION_TYPE_VAL) #define HUB_MSG_TYPE_RBR_STATUS (9 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_UINT) *************** *** 105,108 **** --- 113,117 ---- #define HUB_MSG_TYPE_SET_BR (15 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_UINT) #define HUB_MSG_TYPE_SET_LC (16 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_LC) + #define HUB_MSG_TYPE_SET_LSR (17 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) /*******************************************************************/ typedef struct _HUB_MSG { |
From: Vyacheslav F. <vf...@us...> - 2008-10-16 06:34:39
|
Update of /cvsroot/com0com/hub4com/plugins/linectl In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27589 Modified Files: filter.cpp Log Message: Fixed typo Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/linectl/filter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filter.cpp 30 Sep 2008 08:34:38 -0000 1.1 --- filter.cpp 16 Oct 2008 06:34:27 -0000 1.2 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.2 2008/10/16 06:34:27 vfrolov + * Fixed typo + * * Revision 1.1 2008/09/30 08:34:38 vfrolov * Initial revision *************** *** 233,236 **** --- 236,240 ---- cerr << ((Filter *)hFilter)->PortName(nFromPort) << " WARNING: Requested by filter " << ((Filter *)hFilter)->FilterName() + << " for port " << ((Filter *)hFilter)->PortName(nToPort) << " option(s) 0x" << hex << fail_options << dec << " not accepted" << endl; *************** *** 263,267 **** } case HUB_MSG_TYPE_RLC_STATUS: { ! if (((Filter *)hFilter)->soOutMask & SO_SET_BR) { State *pState = ((Filter *)hFilter)->GetState(nToPort); --- 267,271 ---- } case HUB_MSG_TYPE_RLC_STATUS: { ! if (((Filter *)hFilter)->soOutMask & SO_SET_LC) { State *pState = ((Filter *)hFilter)->GetState(nToPort); |
From: Vyacheslav F. <vf...@us...> - 2008-10-16 06:19:24
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25644 Modified Files: filters.cpp filters.h hub4com.cpp Log Message: Divided filter ID to filter group ID and filter name Index: hub4com.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** hub4com.cpp 26 Sep 2008 15:34:50 -0000 1.15 --- hub4com.cpp 16 Oct 2008 06:19:12 -0000 1.16 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.16 2008/10/16 06:19:12 vfrolov + * Divided filter ID to filter group ID and filter name + * * Revision 1.15 2008/09/26 15:34:50 vfrolov * Fixed adding order for filters with the same FID *************** *** 117,124 **** << endl << "Filter options:" << endl ! << " --create-filter=<MID>[,<FID>][:<Args>]" << endl << " - by using filter module with name <MID> create a" << endl ! << " filter with name <FID> (<FID> is <MID> by default)" << endl << " and put arguments <Args> (if any) to the filter." << endl << " --add-filters=<Lst>:<LstF>" << endl << " - attach the filters listed in <LstF> to the ports" << endl --- 120,129 ---- << endl << "Filter options:" << endl ! << " --create-filter=<MID>[,<FGID>[,<FN>]][:<Args>]" << endl << " - by using filter module with name <MID> create a" << endl ! << " filter with name <FN> (<FN> is <FGID> by default)" << endl << " and put arguments <Args> (if any) to the filter." << endl + << " Add filter to the end of filter group <FGID>" << endl + << " (<FGID> is <MID> by default)." << endl << " --add-filters=<Lst>:<LstF>" << endl << " - attach the filters listed in <LstF> to the ports" << endl *************** *** 129,137 **** << endl << " The syntax of <LstF> above is <F1>[,<F2>...], where the syntax of <Fn> is" << endl ! << " <FID>[.<Method>][(<Lst>)], where <FID> is a filter name, <Method> is IN or" << endl << " OUT and <Lst> lists the source ports (the data only from them will be handled" << endl ! << " by OUT method). The <FID> w/o <Method> is equivalent to adding IN and OUT for" << endl ! << " each filter with name <FID>. If the list of the source ports is not specified" << endl ! << " then the data routed from any port will be handled by OUT method." << endl << endl << "Port options:" << endl --- 134,142 ---- << endl << " The syntax of <LstF> above is <F1>[,<F2>...], where the syntax of <Fn> is" << endl ! << " <FGID>[.<Method>][(<Lst>)], where <FGID> is a filter group, <Method> is IN or" << endl << " OUT and <Lst> lists the source ports (the data only from them will be handled" << endl ! << " by OUT method). The <FGID> w/o <Method> is equivalent to adding IN and OUT" << endl ! << " for each filter from the group <FGID>. If the list of the source ports is not" << endl ! << " specified then the data routed from any port will be handled by OUT method." << endl << endl << "Port options:" << endl *************** *** 310,319 **** } const char *pFilterName = STRTOK_R(NULL, "", &pSave); if (!pFilterName || !*pFilterName) ! pFilterName = pPluginName; ! if (!filter.CreateFilter(pFltRoutines, pFilterName, hConfig, pArgs)) { cerr << "Invalid filter " << pParam << endl; exit(1); --- 315,329 ---- } + const char *pFilterGroup = STRTOK_R(NULL, ",", &pSave); + + if (!pFilterGroup || !*pFilterGroup) + pFilterGroup = pPluginName; + const char *pFilterName = STRTOK_R(NULL, "", &pSave); if (!pFilterName || !*pFilterName) ! pFilterName = pFilterGroup; ! if (!filter.CreateFilter(pFltRoutines, pFilterGroup, pFilterName, hConfig, pArgs)) { cerr << "Invalid filter " << pParam << endl; exit(1); Index: filters.h =================================================================== RCS file: /cvsroot/com0com/hub4com/filters.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** filters.h 26 Sep 2008 15:34:50 -0000 1.4 --- filters.h 16 Oct 2008 06:19:12 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2008/10/16 06:19:12 vfrolov + * Divided filter ID to filter group ID and filter name + * * Revision 1.4 2008/09/26 15:34:50 vfrolov * Fixed adding order for filters with the same FID *************** *** 56,59 **** --- 59,63 ---- BOOL CreateFilter( const FILTER_ROUTINES_A *pFltRoutines, + const char *pFilterGroup, const char *pFilterName, HCONFIG hConfig, *************** *** 61,65 **** BOOL AddFilter( int iPort, ! const char *pName, BOOL addInMethod, BOOL addOutMethod, --- 65,69 ---- BOOL AddFilter( int iPort, ! const char *pGroup, BOOL addInMethod, BOOL addOutMethod, Index: filters.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/filters.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** filters.cpp 26 Sep 2008 15:34:50 -0000 1.4 --- filters.cpp 16 Oct 2008 06:19:12 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2008/10/16 06:19:12 vfrolov + * Divided filter ID to filter group ID and filter name + * * Revision 1.4 2008/09/26 15:34:50 vfrolov * Fixed adding order for filters with the same FID *************** *** 46,49 **** --- 49,53 ---- public: Filter( + const char *pGroup, const char *pName, HFILTER _hFilter, *************** *** 51,55 **** FILTER_IN_METHOD *_pInMethod, FILTER_OUT_METHOD *_pOutMethod) ! : name(pName), hFilter(_hFilter), pInit(_pInit), --- 55,60 ---- FILTER_IN_METHOD *_pInMethod, FILTER_OUT_METHOD *_pOutMethod) ! : group(pGroup), ! name(pName), hFilter(_hFilter), pInit(_pInit), *************** *** 57,60 **** --- 62,66 ---- pOutMethod(_pOutMethod) {} + const string group; const string name; const HFILTER hFilter; *************** *** 103,106 **** --- 109,113 ---- BOOL Filters::CreateFilter( const FILTER_ROUTINES_A *pFltRoutines, + const char *pFilterGroup, const char *pFilterName, HCONFIG hConfig, *************** *** 128,131 **** --- 135,139 ---- Filter *pFilter = new Filter( + pFilterGroup, pFilterName, hFilter, *************** *** 146,150 **** BOOL Filters::AddFilter( int iPort, ! const char *pName, BOOL addInMethod, BOOL addOutMethod, --- 154,158 ---- BOOL Filters::AddFilter( int iPort, ! const char *pGroup, BOOL addInMethod, BOOL addOutMethod, *************** *** 176,180 **** for (FilterArray::const_iterator i = allFilters.begin() ; i != allFilters.end() ; i++) { ! if (*i && (*i)->name == pName) { if (addInMethod && (*i)->pInMethod) { FilterMethod *pFilterMethod = new FilterMethod(*(*i), TRUE, NULL); --- 184,188 ---- for (FilterArray::const_iterator i = allFilters.begin() ; i != allFilters.end() ; i++) { ! if (*i && (*i)->group == pGroup) { if (addInMethod && (*i)->pInMethod) { FilterMethod *pFilterMethod = new FilterMethod(*(*i), TRUE, NULL); *************** *** 217,221 **** if (!found) { ! cerr << "Can't find filter " << pName << endl; return FALSE; } --- 225,229 ---- if (!found) { ! cerr << "Can't find any filter for group " << pGroup << endl; return FALSE; } |
From: Vyacheslav F. <vf...@us...> - 2008-10-09 11:05:36
|
Update of /cvsroot/com0com/hub4com/plugins/telnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16923 Modified Files: filter.cpp telnet.cpp telnet.h telnet.vcproj Added Files: import.h Log Message: Redesigned class TelnetProtocol --- NEW FILE: import.h --- /* * $Id: import.h,v 1.1 2008/10/09 11:02:58 vfrolov Exp $ * * Copyright (c) 2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: import.h,v $ * Revision 1.1 2008/10/09 11:02:58 vfrolov * Redesigned class TelnetProtocol * */ #ifndef _IMPORT_H #define _IMPORT_H #include "../plugins_api.h" /////////////////////////////////////////////////////////////// extern ROUTINE_MSG_REPLACE_BUF *pMsgReplaceBuf; extern ROUTINE_MSG_INSERT_BUF *pMsgInsertBuf; /////////////////////////////////////////////////////////////// #endif // _IMPORT_H Index: telnet.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/telnet.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** telnet.h 28 Mar 2008 16:05:15 -0000 1.1 --- telnet.h 9 Oct 2008 11:02:58 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/28 16:05:15 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/10/09 11:02:58 vfrolov + * Redesigned class TelnetProtocol + * * Revision 1.1 2008/03/28 16:05:15 vfrolov * Initial revision * */ *************** *** 29,32 **** --- 31,36 ---- #define _TELNET_H + #include "../plugins_api.h" + /////////////////////////////////////////////////////////////// typedef vector<BYTE> BYTE_vector; *************** *** 39,52 **** void SetTerminalType(const char *pTerminalType); ! void Write(const BYTE *pBuf, DWORD count); ! void Send(const BYTE *pBuf, DWORD count); ! ! DWORD ReadDataLength() const { return (DWORD)streamSendRead.size(); } ! const BYTE *ReadData() const { return streamSendRead.data(); } ! void ReadDataClear() { streamSendRead.clear(); } ! ! DWORD RecvDataLength() const { return (DWORD)streamWriteRecv.size(); } ! const BYTE *RecvData() const { return streamWriteRecv.data(); } ! void RecvDataClear() { streamWriteRecv.clear(); } void Clear(); --- 43,49 ---- void SetTerminalType(const char *pTerminalType); ! HUB_MSG *Decode(HUB_MSG *pMsg); ! HUB_MSG *Encode(HUB_MSG *pMsg); ! HUB_MSG *FlushEncodedStream() { return FlushEncodedStream(NULL); } void Clear(); *************** *** 54,59 **** void SendOption(BYTE code, BYTE option); void SendSubNegotiation(int option, const BYTE_vector ¶ms); ! void SendRaw(const BYTE *pBuf, DWORD count) { streamSendRead.append(pBuf, count); } ! void WriteRaw(const BYTE *pBuf, DWORD count) { streamWriteRecv.append(pBuf, count); } string name; --- 51,59 ---- void SendOption(BYTE code, BYTE option); void SendSubNegotiation(int option, const BYTE_vector ¶ms); ! ! static HUB_MSG *Flush(HUB_MSG *pMsg, BYTE_string &stream); ! ! HUB_MSG *FlushEncodedStream(HUB_MSG *pMsg) { return Flush(pMsg, streamEncoded); } ! HUB_MSG *FlushDecodedStream(HUB_MSG *pMsg) { return Flush(pMsg, streamDecoded); } string name; *************** *** 74,79 **** BYTE_vector terminalType; ! BYTE_string streamSendRead; ! BYTE_string streamWriteRecv; }; /////////////////////////////////////////////////////////////// --- 74,79 ---- BYTE_vector terminalType; ! BYTE_string streamEncoded; ! BYTE_string streamDecoded; }; /////////////////////////////////////////////////////////////// Index: telnet.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/telnet.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** telnet.cpp 28 Mar 2008 16:05:15 -0000 1.1 --- telnet.cpp 9 Oct 2008 11:02:58 -0000 1.2 *************** *** 20,35 **** * * $Log$ * Revision 1.1 2008/03/28 16:05:15 vfrolov * Initial revision * - * */ #include "precomp.h" #include "telnet.h" /////////////////////////////////////////////////////////////// enum { cdSE = 240, cdSB = 250, cdWILL = 251, --- 20,39 ---- * * $Log$ + * Revision 1.2 2008/10/09 11:02:58 vfrolov + * Redesigned class TelnetProtocol + * * Revision 1.1 2008/03/28 16:05:15 vfrolov * Initial revision * */ #include "precomp.h" #include "telnet.h" + #include "import.h" /////////////////////////////////////////////////////////////// enum { cdSE = 240, + cdNOP = 241, cdSB = 250, cdWILL = 251, *************** *** 46,49 **** --- 50,56 ---- return "SE"; break; + case cdNOP: + return "NOP"; + break; case cdSB: return "SB"; *************** *** 110,133 **** options[opTerminalType].localOptionState = OptionState::osNo; ! streamSendRead.clear(); ! streamWriteRecv.clear(); } ! void TelnetProtocol::Send(const BYTE *pBuf, DWORD count) { ! for (DWORD i = 0 ; i < count ; i++) { ! BYTE ch = ((const BYTE *)pBuf)[i]; if (ch == cdIAC) ! SendRaw(&ch, 1); ! SendRaw(&ch, 1); } } ! void TelnetProtocol::Write(const BYTE *pBuf, DWORD count) { ! for (DWORD i = 0 ; i < count ; i++) { ! BYTE ch = ((const BYTE *)pBuf)[i]; switch (state) { --- 117,174 ---- options[opTerminalType].localOptionState = OptionState::osNo; ! streamEncoded.clear(); ! streamDecoded.clear(); } ! HUB_MSG *TelnetProtocol::Flush(HUB_MSG *pMsg, BYTE_string &stream) { ! if (!stream.empty()) { ! pMsg = pMsgInsertBuf(pMsg, ! HUB_MSG_TYPE_LINE_DATA, ! stream.data(), ! (DWORD)stream.size()); ! ! stream.clear(); ! } ! ! return pMsg; ! } ! ! HUB_MSG *TelnetProtocol::Encode(HUB_MSG *pMsg) ! { ! _ASSERTE(pMsg->type == HUB_MSG_TYPE_LINE_DATA); ! ! DWORD len = pMsg->u.buf.size; ! BYTE_string org(pMsg->u.buf.pBuf, len); ! const BYTE *pBuf = org.data(); ! ! // discard original data from the stream ! pMsg = pMsgReplaceBuf(pMsg, HUB_MSG_TYPE_LINE_DATA, NULL, 0); ! ! for (; len ; len--) { ! BYTE ch = *pBuf++; if (ch == cdIAC) ! streamEncoded += ch; ! streamEncoded += ch; } + + return FlushEncodedStream(pMsg); } ! HUB_MSG *TelnetProtocol::Decode(HUB_MSG *pMsg) { ! _ASSERTE(pMsg->type == HUB_MSG_TYPE_LINE_DATA); ! ! DWORD len = pMsg->u.buf.size; ! BYTE_string org(pMsg->u.buf.pBuf, len); ! const BYTE *pBuf = org.data(); ! ! // discard original data from the stream ! pMsg = pMsgReplaceBuf(pMsg, HUB_MSG_TYPE_LINE_DATA, NULL, 0); ! ! for (; len ; len--) { ! BYTE ch = *pBuf++; switch (state) { *************** *** 136,145 **** state = stCode; else ! WriteRaw(&ch, 1); break; case stCode: switch (ch) { case cdIAC: ! WriteRaw(&ch, 1); state = stData; break; --- 177,190 ---- state = stCode; else ! streamDecoded += ch; break; case stCode: switch (ch) { case cdIAC: ! streamDecoded += ch; ! state = stData; ! break; ! case cdNOP: ! cout << name << " RECV: " << code2name(ch) << endl; state = stData; break; *************** *** 228,231 **** --- 273,277 ---- switch (ch) { case cdIAC: + params.push_back(ch); state = stSubParams; break; *************** *** 258,270 **** } } } void TelnetProtocol::SendOption(BYTE code, BYTE option) { - BYTE buf[3] = {cdIAC, code, option}; - cout << name << " SEND: " << code2name(code) << " " << (unsigned)option << endl; ! SendRaw(buf, sizeof(buf)); } --- 304,318 ---- } } + + return FlushDecodedStream(pMsg); } void TelnetProtocol::SendOption(BYTE code, BYTE option) { cout << name << " SEND: " << code2name(code) << " " << (unsigned)option << endl; ! streamEncoded += (BYTE)cdIAC; ! streamEncoded += code; ! streamEncoded += option; } *************** *** 278,288 **** cout << (unsigned)b << " "; ! SendRaw(&b, sizeof(b)); } cout << "SE" << endl; ! BYTE buf[2] = {cdIAC, cdSE}; ! ! SendRaw(buf, sizeof(buf)); } /////////////////////////////////////////////////////////////// --- 326,335 ---- cout << (unsigned)b << " "; ! streamEncoded += b; } cout << "SE" << endl; ! streamEncoded += (BYTE)cdIAC; ! streamEncoded += (BYTE)cdSE; } /////////////////////////////////////////////////////////////// Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/filter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filter.cpp 20 Aug 2008 10:08:29 -0000 1.3 --- filter.cpp 9 Oct 2008 11:02:58 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/10/09 11:02:58 vfrolov + * Redesigned class TelnetProtocol + * * Revision 1.3 2008/08/20 10:08:29 vfrolov * Added strict option checking *************** *** 32,42 **** #include "precomp.h" - #include "../plugins_api.h" #include "telnet.h" /////////////////////////////////////////////////////////////// ! static ROUTINE_MSG_REPLACE_BUF *pMsgReplaceBuf = NULL; ! static ROUTINE_MSG_INSERT_BUF *pMsgInsertBuf = NULL; ! static ROUTINE_PORT_NAME_A *pPortName = NULL; /////////////////////////////////////////////////////////////// const char *GetParam(const char *pArg, const char *pPattern) --- 35,43 ---- #include "precomp.h" #include "telnet.h" + #include "import.h" /////////////////////////////////////////////////////////////// ! static ROUTINE_PORT_NAME_A *pPortName; /////////////////////////////////////////////////////////////// const char *GetParam(const char *pArg, const char *pPattern) *************** *** 180,185 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << ":\"--terminal=ANSI\" --add-filters=1:" << GetPluginAbout()->pName << " COM1 --use-driver=tcp *your.telnet.server:telnet" << endl ! << " - use the ANSI terminal connected to the port COM1 for working on the" << endl << " telnet server your.telnet.server." << endl ; --- 181,192 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " COM1" << endl ! << " --create-filter=telnet:--terminal=ANSI" << endl ! << " add-filters=1:telnet" << endl ! << " --use-driver=tcp" << endl ! << " *your.telnet.server:telnet" << endl ! << " _END_" << endl ! << " - use the ANSI terminal connected to the port COM1 for working with the" << endl << " telnet server your.telnet.server." << endl ; *************** *** 238,263 **** return FALSE; ! pTelnetProtocol->Write(pInMsg->u.buf.pBuf, pInMsg->u.buf.size); ! ! pInMsg = pMsgReplaceBuf(pInMsg, ! HUB_MSG_TYPE_LINE_DATA, ! pTelnetProtocol->RecvData(), ! pTelnetProtocol->RecvDataLength()); ! pTelnetProtocol->RecvDataClear(); if (!pInMsg) return FALSE; - - if (pTelnetProtocol->ReadDataLength()) { - *ppEchoMsg = pMsgInsertBuf(NULL, - HUB_MSG_TYPE_LINE_DATA, - pTelnetProtocol->ReadData(), - pTelnetProtocol->ReadDataLength()); - - pTelnetProtocol->ReadDataClear(); - - if (!*ppEchoMsg) - return FALSE; - } } else --- 245,253 ---- return FALSE; ! pInMsg = pTelnetProtocol->Decode(pInMsg); ! *ppEchoMsg = pTelnetProtocol->FlushEncodedStream(); if (!pInMsg) return FALSE; } else *************** *** 291,301 **** return FALSE; ! pTelnetProtocol->Send(pOutMsg->u.buf.pBuf, pOutMsg->u.buf.size); ! ! pOutMsg = pMsgReplaceBuf(pOutMsg, ! HUB_MSG_TYPE_LINE_DATA, ! pTelnetProtocol->ReadData(), ! pTelnetProtocol->ReadDataLength()); ! pTelnetProtocol->ReadDataClear(); if (!pOutMsg) --- 281,285 ---- return FALSE; ! pOutMsg = pTelnetProtocol->Encode(pOutMsg); if (!pOutMsg) *************** *** 324,327 **** --- 308,314 ---- }; /////////////////////////////////////////////////////////////// + ROUTINE_MSG_REPLACE_BUF *pMsgReplaceBuf; + ROUTINE_MSG_INSERT_BUF *pMsgInsertBuf; + /////////////////////////////////////////////////////////////// PLUGIN_INIT_A InitA; const PLUGIN_ROUTINES_A *const * CALLBACK InitA( Index: telnet.vcproj =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/telnet.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** telnet.vcproj 28 Mar 2008 16:05:44 -0000 1.1 --- telnet.vcproj 9 Oct 2008 11:02:58 -0000 1.2 *************** *** 183,186 **** --- 183,190 ---- > <File + RelativePath=".\import.h" + > + </File> + <File RelativePath="..\plugins_api.h" > |
From: Vyacheslav F. <vf...@us...> - 2008-10-07 14:30:05
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32361 Added Files: com2tcp-esc.bat Log Message: Initial revision --- NEW FILE: com2tcp-esc.bat --- @ECHO OFF SETLOCAL IF DEFINED HUB4COM GOTO DEFINED_HUB4COM SET HUB4COM=hub4com :DEFINED_HUB4COM PATH %~dp0;%PATH% :BEGIN_PARSE_OPTIONS SET OPTION=%1 IF NOT "%OPTION:~0,2%"=="--" GOTO END_PARSE_OPTIONS SHIFT /1 IF /I "%OPTION%"=="--help" GOTO USAGE IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE SET OPTIONS=%OPTIONS% --interface=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_INTERFACE GOTO USAGE :END_PARSE_OPTIONS :BEGIN_PARSE_ARGS IF "%1"=="" GOTO USAGE SET COMPORT=%1 SHIFT /1 IF "%1"=="" GOTO USAGE SET TCP=%1 SHIFT /1 IF "%1"=="" GOTO END_PARSE_ARGS SET TCP=%TCP%:%1 SHIFT /1 IF NOT "%1"=="" GOTO USAGE :END_PARSE_ARGS :SET OPTIONS=%OPTIONS% --create-filter=trace,ser --add-filters=0:ser SET OPTIONS=%OPTIONS% --create-filter=escparse,escparse-com --add-filters=0:escparse-com SET OPTIONS=%OPTIONS% --create-filter=pinmap:"--rts=cts --dtr=dsr --break=break" --add-filters=0:pinmap SET OPTIONS=%OPTIONS% --create-filter=linectl --add-filters=0:linectl :SET OPTIONS=%OPTIONS% --create-filter=trace,tcp --add-filters=1:tcp SET OPTIONS=%OPTIONS% --create-filter=escparse,escparse-tcp:"--request-esc-mode=no" --add-filters=1:escparse-tcp SET OPTIONS=%OPTIONS% --create-filter=escinsert --add-filters=1:escinsert :SET OPTIONS=%OPTIONS% --create-filter=trace,s2t --add-filters=1:s2t @ECHO ON "%HUB4COM%" %OPTIONS% --octs=off "%COMPORT%" --use-driver=tcp "*%TCP%" @ECHO OFF ENDLOCAL GOTO END :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :USAGE ECHO Usage (client mode): ECHO %0 [options] \\.\^<com port^> ^<host addr^> ^<host port^> ECHO. ECHO Usage (server mode): ECHO %0 [options] \\.\^<com port^> ^<listen port^> ECHO. ECHO Common options: ECHO --help - show this help. ECHO. ECHO Client mode options: ECHO --interface ^<if^> - use interface ^<if^> for connecting. ECHO. ECHO Server mode options: ECHO --interface ^<if^> - use interface ^<if^> for listening. GOTO END :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :END |
From: Vyacheslav F. <vf...@us...> - 2008-10-07 09:27:05
|
Update of /cvsroot/com0com/hub4com/plugins/serial In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15609 Modified Files: comio.cpp Log Message: Fixed reseting MCR by setting BR or LC Index: comio.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/serial/comio.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** comio.cpp 30 Sep 2008 08:28:32 -0000 1.9 --- comio.cpp 7 Oct 2008 09:26:00 -0000 1.10 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2008/10/07 09:26:00 vfrolov + * Fixed reseting MCR by setting BR or LC + * * Revision 1.9 2008/09/30 08:28:32 vfrolov * Added ability to control OUT1 and OUT2 pins *************** *** 389,392 **** --- 392,402 ---- } /////////////////////////////////////////////////////////////// + #define IOCTL_SERIAL_SET_BAUD_RATE CTL_CODE(FILE_DEVICE_SERIAL_PORT, 1,METHOD_BUFFERED,FILE_ANY_ACCESS) + #define IOCTL_SERIAL_GET_BAUD_RATE CTL_CODE(FILE_DEVICE_SERIAL_PORT,20,METHOD_BUFFERED,FILE_ANY_ACCESS) + + struct SERIAL_BAUD_RATE { + ULONG BaudRate; + }; + DWORD ComIo::SetBaudRate(DWORD baudRate) { *************** *** 394,403 **** return baudRate; ! dcb.BaudRate = baudRate; ! mySetCommState(handle, &dcb); return GetBaudRate(); } /////////////////////////////////////////////////////////////// DWORD ComIo::SetLineControl(DWORD lineControl) { --- 404,444 ---- return baudRate; ! DWORD returned; ! SERIAL_BAUD_RATE serialBaudRate; ! ! serialBaudRate.BaudRate = baudRate; ! ! if (!DeviceIoControl(handle, ! IOCTL_SERIAL_SET_BAUD_RATE, ! &serialBaudRate, sizeof(serialBaudRate), ! NULL, 0, &returned, ! NULL)) ! { ! TraceError(GetLastError(), "IOCTL_SERIAL_SET_BAUD_RATE"); ! } ! ! if (!DeviceIoControl(handle, ! IOCTL_SERIAL_GET_BAUD_RATE, ! NULL, 0, ! &serialBaudRate, sizeof(serialBaudRate), &returned, ! NULL)) ! { ! TraceError(GetLastError(), "IOCTL_SERIAL_GET_BAUD_RATE"); ! } else { ! dcb.BaudRate = serialBaudRate.BaudRate; ! } return GetBaudRate(); } /////////////////////////////////////////////////////////////// + #define IOCTL_SERIAL_SET_LINE_CONTROL CTL_CODE(FILE_DEVICE_SERIAL_PORT, 3,METHOD_BUFFERED,FILE_ANY_ACCESS) + #define IOCTL_SERIAL_GET_LINE_CONTROL CTL_CODE(FILE_DEVICE_SERIAL_PORT,21,METHOD_BUFFERED,FILE_ANY_ACCESS) + + struct SERIAL_LINE_CONTROL { + UCHAR StopBits; + UCHAR Parity; + UCHAR WordLength; + }; + DWORD ComIo::SetLineControl(DWORD lineControl) { *************** *** 407,414 **** return lineControl; ! dcb.ByteSize = LC2VAL_BYTESIZE(lineControl); ! dcb.Parity = LC2VAL_PARITY(lineControl); ! dcb.StopBits = LC2VAL_STOPBITS(lineControl); ! mySetCommState(handle, &dcb); return GetLineControl(); --- 448,479 ---- return lineControl; ! DWORD returned; ! SERIAL_LINE_CONTROL serialLineControl; ! ! serialLineControl.WordLength = LC2VAL_BYTESIZE(lineControl); ! serialLineControl.Parity = LC2VAL_PARITY(lineControl); ! serialLineControl.StopBits = LC2VAL_STOPBITS(lineControl); ! ! if (!DeviceIoControl(handle, ! IOCTL_SERIAL_SET_LINE_CONTROL, ! &serialLineControl, sizeof(serialLineControl), ! NULL, 0, &returned, ! NULL)) ! { ! TraceError(GetLastError(), "IOCTL_SERIAL_SET_LINE_CONTROL"); ! } ! ! if (!DeviceIoControl(handle, ! IOCTL_SERIAL_GET_LINE_CONTROL, ! NULL, 0, ! &serialLineControl, sizeof(serialLineControl), &returned, ! NULL)) ! { ! TraceError(GetLastError(), "IOCTL_SERIAL_GET_LINE_CONTROL"); ! } else { ! dcb.ByteSize = serialLineControl.WordLength; ! dcb.Parity = serialLineControl.Parity; ! dcb.StopBits = serialLineControl.StopBits; ! } return GetLineControl(); |
From: Vyacheslav F. <vf...@us...> - 2008-10-06 12:16:47
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4466 Modified Files: com2tcp.bat Log Message: Utilized --reconnect option Index: com2tcp.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/com2tcp.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** com2tcp.bat 2 Oct 2008 12:01:27 -0000 1.1 --- com2tcp.bat 6 Oct 2008 12:16:40 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- SET CF_PIN2CON=--create-filter=pin2con SET AF_PIN2CON=--add-filters=0:pin2con + SET RECONNECT=1000 :BEGIN_PARSE_OPTIONS *************** *** 35,38 **** --- 36,40 ---- SET CF_AWAK_SEQ=--create-filter=awakseq:--awak-seq=\"%1\" SET AF_AWAK_SEQ=--add-filters=0:awakseq + SET RECONNECT=d SHIFT /1 GOTO BEGIN_PARSE_OPTIONS *************** *** 43,46 **** --- 45,49 ---- SET AF_PIN2CON= SET PERMANENT=* + SET RECONNECT=d GOTO BEGIN_PARSE_OPTIONS :END_OPTION_IGNORE_DSR *************** *** 101,105 **** @ECHO ON ! "%HUB4COM%" %OPTIONS% %PARAMS% "%COMPORT%" --use-driver=tcp "%TCP%" @ECHO OFF ENDLOCAL --- 104,108 ---- @ECHO ON ! "%HUB4COM%" %OPTIONS% %PARAMS% "%COMPORT%" --use-driver=tcp --reconnect=%RECONNECT% "%TCP%" @ECHO OFF ENDLOCAL |
From: Vyacheslav F. <vf...@us...> - 2008-10-06 12:15:30
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4384 Modified Files: comparams.cpp comparams.h comport.cpp comport.h port.cpp Log Message: Added --reconnect option Index: comport.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comport.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** comport.cpp 2 Oct 2008 08:07:02 -0000 1.4 --- comport.cpp 6 Oct 2008 12:15:14 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2008/10/06 12:15:14 vfrolov + * Added --reconnect option + * * Revision 1.4 2008/10/02 08:07:02 vfrolov * Fixed sending not paired CONNECT(FALSE) *************** *** 105,108 **** --- 108,113 ---- isConnected(FALSE), connectionCounter(0), + reconnectTime(-1), + hReconnectTimer(NULL), name("TCP"), hMasterPort(NULL), *************** *** 134,137 **** --- 139,151 ---- SetAddr(snLocal, comParams.GetIF(), NULL) && SetAddr(snRemote, addrName.c_str(), portName.c_str()); + + if (comParams.GetReconnectTime() == comParams.rtDefault) { + if (permanent) + reconnectTime = 0; + } + else + if (comParams.GetReconnectTime() != comParams.rtDisable) { + reconnectTime = comParams.GetReconnectTime(); + } } else { isValid = SetAddr(snLocal, comParams.GetIF(), path.c_str()); *************** *** 176,180 **** return pListener->Start(); } else { ! if (permanent) StartConnect(); } --- 190,194 ---- return pListener->Start(); } else { ! if (CanConnect()) StartConnect(); } *************** *** 210,214 **** } - void ComPort::StartConnect() { --- 224,227 ---- *************** *** 315,320 **** _ASSERTE(connectionCounter > 0); ! if (!pListener) StartConnect(); } else { _ASSERTE(connectionCounter > 0); --- 328,337 ---- _ASSERTE(connectionCounter > 0); ! if (!pListener) { ! if (hReconnectTimer) ! ::CancelWaitableTimer(hReconnectTimer); ! StartConnect(); + } } else { _ASSERTE(connectionCounter > 0); *************** *** 402,405 **** --- 419,431 ---- } + static VOID CALLBACK TimerAPCProc( + LPVOID pArg, + DWORD /*dwTimerLowValue*/, + DWORD /*dwTimerHighValue*/) + { + if (((ComPort *)pArg)->CanConnect()) + ((ComPort *)pArg)->StartConnect(); + } + BOOL ComPort::OnEvent(WaitEventOverlapped *pOverlapped, long e, int err) { *************** *** 421,429 **** } ! if (pListener) Accept(); else ! if (permanent) ! StartConnect(); } --- 447,480 ---- } ! if (pListener) { Accept(); + } else ! if (CanConnect()) { ! if (reconnectTime == 0) { ! StartConnect(); ! } ! else ! if (reconnectTime > 0) { ! if (!hReconnectTimer) ! hReconnectTimer = ::CreateWaitableTimer(NULL, FALSE, NULL); ! ! if (hReconnectTimer) { ! LARGE_INTEGER firstReportTime; ! ! firstReportTime.QuadPart = -10000LL * reconnectTime; ! ! if (!::SetWaitableTimer(hReconnectTimer, &firstReportTime, 0, TimerAPCProc, this, FALSE)) { ! DWORD err = GetLastError(); ! ! cerr << "WARNING: SetWaitableTimer() - error=" << err << endl; ! } ! } else { ! DWORD err = GetLastError(); ! ! cerr << "WARNING: CreateWaitableTimer() - error=" << err << endl; ! } ! } ! } } *************** *** 446,449 **** --- 497,502 ---- void ComPort::OnConnect() { + _ASSERTE(isConnected == FALSE); + isConnected = TRUE; Index: comport.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comport.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comport.h 28 Mar 2008 16:00:19 -0000 1.2 --- comport.h 6 Oct 2008 12:15:14 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/10/06 12:15:14 vfrolov + * Added --reconnect option + * * Revision 1.2 2008/03/28 16:00:19 vfrolov * Added connectionCounter *************** *** 89,95 **** void Name(const char *pName) { name = pName; } HANDLE Handle() const { return (HANDLE)hSock; } private: - void StartConnect(); BOOL StartRead(); BOOL StartWaitEvent(SOCKET hSockWait); --- 92,99 ---- void Name(const char *pName) { name = pName; } HANDLE Handle() const { return (HANDLE)hSock; } + BOOL CanConnect() const { return (permanent || connectionCounter > 0); } + void StartConnect(); private: BOOL StartRead(); BOOL StartWaitEvent(SOCKET hSockWait); *************** *** 107,110 **** --- 111,117 ---- BOOL permanent; + int reconnectTime; + HANDLE hReconnectTimer; + string name; HMASTERPORT hMasterPort; Index: comparams.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comparams.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** comparams.cpp 27 Mar 2008 17:17:56 -0000 1.1 --- comparams.cpp 6 Oct 2008 12:15:14 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/27 17:17:56 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/10/06 12:15:14 vfrolov + * Added --reconnect option + * * Revision 1.1 2008/03/27 17:17:56 vfrolov * Initial revision * */ *************** *** 31,35 **** /////////////////////////////////////////////////////////////// ComParams::ComParams() ! : pIF(NULL) { } --- 33,38 ---- /////////////////////////////////////////////////////////////// ComParams::ComParams() ! : pIF(NULL), ! reconnectTime(rtDefault) { } Index: port.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/port.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** port.cpp 28 Aug 2008 10:31:25 -0000 1.5 --- port.cpp 6 Oct 2008 12:15:14 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2008/10/06 12:15:14 vfrolov + * Added --reconnect option + * * Revision 1.5 2008/08/28 10:31:25 vfrolov * Removed linking with ../../utils.h and ../../utils.cpp *************** *** 80,88 **** << endl << " The sign * above means that connection shold be permanent as it's possible." << endl ! << " In client mode it will force connection to remote host on start or on" << endl ! << " disconnect." << endl << endl << "Options:" << endl << " --interface=<if> - use interface <if>." << endl << endl << "Output data stream description:" << endl --- 83,95 ---- << endl << " The sign * above means that connection shold be permanent as it's possible." << endl ! << " In client mode it will force connection to remote host on start." << endl << endl << "Options:" << endl << " --interface=<if> - use interface <if>." << endl + << " --reconnect=<t> - enable/disable forcing connection to remote host" << endl + << " on disconnecting and set reconnect time. Where <t>" << endl + << " is a positive number of milliseconds or d[efault]" << endl + << " or n[o]. If sign * is not used then d[efault]" << endl + << " means n[o] else d[efault] means 0." << endl << endl << "Output data stream description:" << endl *************** *** 94,98 **** << "the connection counter will force connection to remote host." << endl << "If sign * is not used and there is connection to remote host the decrementing" << endl ! << "of the connection counter to 0 will force disconnection from remote host." << endl << endl << "Input data stream description:" << endl --- 101,107 ---- << "the connection counter will force connection to remote host." << endl << "If sign * is not used and there is connection to remote host the decrementing" << endl ! << "of the connection counter to 0 will force disconnection from remote host and" << endl ! << "will disable forcing connection to remote host till incrementing connection" << endl ! << "counter." << endl << endl << "Input data stream description:" << endl *************** *** 141,144 **** --- 150,175 ---- if ((pParam = GetParam(pArg, "--interface=")) != NULL) { comParams.SetIF(pParam); + } + else + if ((pParam = GetParam(pArg, "--reconnect=")) != NULL) { + int reconnectTime; + + if (*pParam == 'd') { + reconnectTime = comParams.rtDefault; + } + else + if (*pParam == 'n') { + reconnectTime = comParams.rtDisable; + } + else + if (isdigit(*pParam)) { + reconnectTime = atoi(pParam); + } + else { + cerr << "Unknown reconnect value in " << pArg << endl; + exit(1); + } + + comParams.SetReconnectTime(reconnectTime); } else { return FALSE; Index: comparams.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comparams.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** comparams.h 27 Mar 2008 17:17:56 -0000 1.1 --- comparams.h 6 Oct 2008 12:15:14 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/27 17:17:56 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/10/06 12:15:14 vfrolov + * Added --reconnect option + * * Revision 1.1 2008/03/27 17:17:56 vfrolov * Initial revision * */ *************** *** 39,44 **** --- 41,55 ---- const char *GetIF() const { return pIF; } + void SetReconnectTime(int _reconnectTime) { reconnectTime = _reconnectTime; } + int GetReconnectTime() const { return reconnectTime; } + + enum { + rtDefault = -1, + rtDisable = -2, + }; + private: char *pIF; + int reconnectTime; }; /////////////////////////////////////////////////////////////// |
From: Vyacheslav F. <vf...@us...> - 2008-10-06 12:13:15
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4215 Modified Files: comio.cpp Log Message: Duplicated code moved to SetThread() Index: comio.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comio.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comio.cpp 26 Aug 2008 14:07:01 -0000 1.2 --- comio.cpp 6 Oct 2008 12:12:29 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/10/06 12:12:29 vfrolov + * Duplicated code moved to SetThread() + * * Revision 1.2 2008/08/26 14:07:01 vfrolov * Execute OnEvent() in main thread context *************** *** 272,280 **** static DWORD idThread; #endif /* _DEBUG */ ! /////////////////////////////////////////////////////////////// ! WaitEventOverlapped::WaitEventOverlapped(ComPort &_port, SOCKET hSockWait) ! : port(_port), ! hSock(hSockWait), ! hWait(INVALID_HANDLE_VALUE) { #ifdef _DEBUG --- 275,280 ---- static DWORD idThread; #endif /* _DEBUG */ ! ! static BOOL SetThread() { #ifdef _DEBUG *************** *** 299,309 **** TraceError( GetLastError(), ! "WaitEventOverlapped::WaitEventOverlapped(): DuplicateHandle() %s", ! port.Name().c_str()); ! return; } } hEvent = ::CreateEvent(NULL, FALSE, FALSE, NULL); --- 299,319 ---- TraceError( GetLastError(), ! "SetThread(): DuplicateHandle()"); ! return FALSE; } } + return TRUE; + } + /////////////////////////////////////////////////////////////// + WaitEventOverlapped::WaitEventOverlapped(ComPort &_port, SOCKET hSockWait) + : port(_port), + hSock(hSockWait), + hWait(INVALID_HANDLE_VALUE) + { + if (!SetThread()) + return; + hEvent = ::CreateEvent(NULL, FALSE, FALSE, NULL); *************** *** 426,455 **** hWait(INVALID_HANDLE_VALUE) { ! #ifdef _DEBUG ! if (hThread == INVALID_HANDLE_VALUE) { ! idThread = ::GetCurrentThreadId(); ! } else { ! _ASSERTE(idThread == ::GetCurrentThreadId()); ! } ! #endif /* _DEBUG */ ! ! if (hThread == INVALID_HANDLE_VALUE) { ! if (!::DuplicateHandle(::GetCurrentProcess(), ! ::GetCurrentThread(), ! ::GetCurrentProcess(), ! &hThread, ! 0, ! FALSE, ! DUPLICATE_SAME_ACCESS)) ! { ! hThread = INVALID_HANDLE_VALUE; ! ! TraceError( ! GetLastError(), ! "ListenOverlapped::ListenOverlapped(): DuplicateHandle()"); ! return; - } - } hEvent = ::CreateEvent(NULL, FALSE, FALSE, NULL); --- 436,441 ---- hWait(INVALID_HANDLE_VALUE) { ! if (!SetThread()) return; hEvent = ::CreateEvent(NULL, FALSE, FALSE, NULL); |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 14:02:41
|
Update of /cvsroot/com0com/hub4com/plugins/trace In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21349 Modified Files: filter.cpp Log Message: Added help Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/trace/filter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filter.cpp 30 Sep 2008 08:28:32 -0000 1.3 --- filter.cpp 2 Oct 2008 14:01:43 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/10/02 14:01:43 vfrolov + * Added help + * * Revision 1.3 2008/09/30 08:28:32 vfrolov * Added ability to control OUT1 and OUT2 pins *************** *** 183,191 **** cerr << "Usage:" << endl ! << " " << pProgPath << " ... --create-filter=" << GetPluginAbout()->pName << "[,<FID>][:<options>] ... --add-filters=<ports>:[...,]<FID>[,...] ..." << endl << endl << "Options:" << endl << endl << "Examples:" << endl ; } --- 186,232 ---- cerr << "Usage:" << endl ! << " " << pProgPath << " ... [<global options>] --create-filter=" << GetPluginAbout()->pName << "[,<FID>][:<options>] ... --add-filters=<ports>:[...,]<FID>[,...] ..." << endl ! << endl ! << "Global options:" << endl ! << " --trace-file=<path> - redirect trace to <path>. Cancel redirection if" << endl ! << " <path> is empty." << endl << endl << "Options:" << endl << endl << "Examples:" << endl + << " " << pProgPath << " --load=,,_END_" << endl + << " COM4" << endl + << " --trace-file=com.log" << endl + << " --create-filter=trace,com" << endl + << " --add-filters=0:com" << endl + << endl + << " --create-filter=pin2con" << endl + << " --add-filters=0:pin2con" << endl + << " --trace-file=p2c.log" << endl + << " --create-filter=trace,p2c" << endl + << " --add-filters=0:p2c" << endl + << endl + << " --create-filter=awakseq:--awak-seq=aaa" << endl + << " --add-filters=0:awakseq" << endl + << " --trace-file=awk.log" << endl + << " --create-filter=trace,awk" << endl + << " --add-filters=0:awk" << endl + << endl + << " --use-driver=tcp" << endl + << " 1.1.1.1:23" << endl + << " --trace-file=tcp.log" << endl + << " --create-filter=trace,tcp" << endl + << " --add-filters=1:tcp" << endl + << endl + << " --create-filter=telnet" << endl + << " --add-filters=1:telnet" << endl + << " --trace-file=tel.log" << endl + << " --create-filter=trace,tel" << endl + << " --add-filters=1:tel" << endl + << " _END_" << endl + << " - Trace data to different files by this way:" << endl + << " COM4 <---> pin2con <---> awakseq <---> <---> telnet <---> 1.1.1.1:23" << endl + << " | | | | |" << endl + << " com.log p2c.log awk.log tel.log tcp.log" << endl ; } |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 12:03:10
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15546 Modified Files: hub4com.vcproj Log Message: Added com2tcp.bat and ReadMe.txt Index: hub4com.vcproj =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** hub4com.vcproj 26 Mar 2008 08:48:18 -0000 1.3 --- hub4com.vcproj 2 Oct 2008 12:03:05 -0000 1.4 *************** *** 299,302 **** --- 299,314 ---- </File> </Filter> + <Filter + Name="Other Files" + > + <File + RelativePath=".\examples\com2tcp.bat" + > + </File> + <File + RelativePath=".\ReadMe.txt" + > + </File> + </Filter> </Files> <Globals> |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 12:01:42
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15355 Added Files: com2tcp.bat Log Message: Initial revision --- NEW FILE: com2tcp.bat --- @ECHO OFF SETLOCAL IF DEFINED HUB4COM GOTO DEFINED_HUB4COM SET HUB4COM=hub4com :DEFINED_HUB4COM PATH %~dp0;%PATH% :SET PARAMS=%PARAMS% --create-filter=trace SET CF_PIN2CON=--create-filter=pin2con SET AF_PIN2CON=--add-filters=0:pin2con :BEGIN_PARSE_OPTIONS SET OPTION=%1 IF NOT "%OPTION:~0,2%"=="--" GOTO END_PARSE_OPTIONS SHIFT /1 IF /I "%OPTION%"=="--help" GOTO USAGE IF /I "%OPTION%" NEQ "--telnet" GOTO END_OPTION_TELNET SET CF_TELNET=--create-filter=telnet SET AF_TELNET=--add-filters=1:telnet GOTO BEGIN_PARSE_OPTIONS :END_OPTION_TELNET IF /I "%OPTION%" NEQ "--terminal" GOTO END_OPTION_TERMINAL SET CF_TELNET_OPTIONS=--terminal=\"%1\" SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_TERMINAL IF /I "%OPTION%" NEQ "--awak-seq" GOTO END_OPTION_AWAK_SEQ SET CF_AWAK_SEQ=--create-filter=awakseq:--awak-seq=\"%1\" SET AF_AWAK_SEQ=--add-filters=0:awakseq SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_AWAK_SEQ IF /I "%OPTION%" NEQ "--ignore-dsr" GOTO END_OPTION_IGNORE_DSR SET CF_PIN2CON= SET AF_PIN2CON= SET PERMANENT=* GOTO BEGIN_PARSE_OPTIONS :END_OPTION_IGNORE_DSR IF /I "%OPTION%" NEQ "--connect-dtr" GOTO END_OPTION_CONNECT_DTR SET CF_PINMAP=--create-filter=pinmap:"--dtr=connect" SET AF_PINMAP=--add-filters=0:pinmap GOTO BEGIN_PARSE_OPTIONS :END_OPTION_CONNECT_DTR IF /I "%OPTION%" NEQ "--interface" GOTO END_OPTION_INTERFACE SET OPTIONS=%OPTIONS% --interface=%1 SHIFT /1 GOTO BEGIN_PARSE_OPTIONS :END_OPTION_INTERFACE IF /I "%OPTION%"=="--baud" GOTO BEGIN_OPTION_LC IF /I "%OPTION%"=="--data" GOTO BEGIN_OPTION_LC IF /I "%OPTION%"=="--parity" GOTO BEGIN_OPTION_LC IF /I "%OPTION%"=="--stop" GOTO BEGIN_OPTION_LC GOTO END_OPTION_LC :BEGIN_OPTION_LC SET VAL=%1 SHIFT /1 IF /I "%VAL:~0,1%"=="d" SET VAL=c SET OPTIONS=%OPTIONS% %OPTION%=%VAL% GOTO BEGIN_PARSE_OPTIONS :END_OPTION_LC GOTO USAGE :END_PARSE_OPTIONS :BEGIN_PARSE_ARGS IF "%1"=="" GOTO USAGE SET COMPORT=%1 SHIFT /1 IF "%1"=="" GOTO USAGE SET TCP=%PERMANENT%%1 SHIFT /1 IF "%1"=="" GOTO END_PARSE_ARGS SET TCP=%TCP%:%1 SHIFT /1 IF NOT "%1"=="" GOTO USAGE :END_PARSE_ARGS IF "%CF_TELNET_OPTIONS%"=="" GOTO END_ADD_CF_TELNET_OPTIONS IF "%CF_TELNET%"=="" GOTO END_ADD_CF_TELNET_OPTIONS SET CF_TELNET=%CF_TELNET%:%CF_TELNET_OPTIONS% :END_ADD_CF_TELNET_OPTIONS SET PARAMS=%PARAMS% %CF_PINMAP% %AF_PINMAP% SET PARAMS=%PARAMS% %CF_PIN2CON% %AF_PIN2CON% SET PARAMS=%PARAMS% %CF_AWAK_SEQ% %AF_AWAK_SEQ% SET PARAMS=%PARAMS% %CF_TELNET% %AF_TELNET% @ECHO ON "%HUB4COM%" %OPTIONS% %PARAMS% "%COMPORT%" --use-driver=tcp "%TCP%" @ECHO OFF ENDLOCAL GOTO END :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :USAGE ECHO Usage (client mode): ECHO %0 [options] \\.\^<com port^> ^<host addr^> ^<host port^> ECHO. ECHO Usage (server mode): ECHO %0 [options] \\.\^<com port^> ^<listen port^> ECHO. ECHO Common options: ECHO --telnet - use Telnet protocol. ECHO --terminal ^<type^> - use terminal ^<type^> (RFC 1091). ECHO --help - show this help. ECHO. ECHO COM port options: ECHO --baud ^<b^> - set baud rate to ^<b^> (default is 19200), ECHO where ^<b^> is positive number or d[efault]. ECHO --data ^<d^> - set data bits to ^<d^> (default is 8), where ^<d^> is ECHO positive number or d[efault]. ECHO --parity ^<p^> - set parity to ^<p^> (default is no), where ^<p^> is ECHO n[o], o[dd], e[ven], m[ark], s[pace] or d[efault]. ECHO --stop ^<s^> - set stop bits to ^<s^> (default is 1), where ^<s^> is ECHO 1, 1.5, 2 or d[efault]. ECHO --ignore-dsr - ignore DSR state (do not wait DSR to be ON before ECHO connecting to host, do not close connection after ECHO DSR is OFF and do not ignore any bytes received ECHO while DSR is OFF). ECHO --connect-dtr - set DTR to ON/OFF on opening/closing connection to ECHO host. ECHO. ECHO The value d[efault] above means to use current COM port settings. ECHO. ECHO Client mode options: ECHO --awak-seq ^<sequence^> - wait for awakening ^<sequence^> from com port ECHO before connecting to host. All data before ECHO ^<sequence^> and ^<sequence^> itself will not be sent. ECHO --interface ^<if^> - use interface ^<if^> for connecting. ECHO. ECHO Server mode options: ECHO --interface ^<if^> - use interface ^<if^> for listening. GOTO END :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :END |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 11:41:19
|
Update of /cvsroot/com0com/hub4com/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14559/examples Log Message: Directory /cvsroot/com0com/hub4com/examples added to the repository |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 08:20:30
|
Update of /cvsroot/com0com/hub4com/plugins/pinmap In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3379 Modified Files: filter.cpp Log Message: Added connect mapping Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/pinmap/filter.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** filter.cpp 26 Aug 2008 14:28:48 -0000 1.8 --- filter.cpp 2 Oct 2008 08:20:17 -0000 1.9 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.9 2008/10/02 08:20:17 vfrolov + * Added connect mapping + * * Revision 1.8 2008/08/26 14:28:48 vfrolov * Removed option --break=break from default *************** *** 87,96 **** }; /////////////////////////////////////////////////////////////// ! #define MST2LSRMST(m) ((WORD)((BYTE)(m))) ! #define LSR2LSRMST(l) ((WORD)(((WORD)(BYTE)(l)) << 8)) ! #define LSRMST2MST(lm) ((BYTE)(lm)) ! #define LSRMST2LSR(lm) ((BYTE)((lm) >> 8)) ! #define LSRMST2GO(lm) (GO_V2O_MODEM_STATUS(LSRMST2MST(lm)) | \ ! ((lm & LSR2LSRMST(LINE_STATUS_BI)) ? GO_BREAK_STATUS : 0)) static struct { --- 90,98 ---- }; /////////////////////////////////////////////////////////////// ! #define LM_BREAK ((WORD)1 << 8) ! #define LM_CONNECT ((WORD)1 << 9) ! #define MST2LM(m) ((WORD)((BYTE)(m))) ! #define LM2MST(lm) ((BYTE)(lm)) ! #define LM2GO(lm) (GO_V2O_MODEM_STATUS(LM2MST(lm)) | ((lm & LM_BREAK) ? GO_BREAK_STATUS : 0)) static struct { *************** *** 98,106 **** WORD lmVal; } pinIn_names[] = { ! {"cts", MST2LSRMST(MODEM_STATUS_CTS)}, ! {"dsr", MST2LSRMST(MODEM_STATUS_DSR)}, ! {"dcd", MST2LSRMST(MODEM_STATUS_DCD)}, ! {"ring", MST2LSRMST(MODEM_STATUS_RI)}, ! {"break", LSR2LSRMST(LINE_STATUS_BI)}, }; /////////////////////////////////////////////////////////////// --- 100,109 ---- WORD lmVal; } pinIn_names[] = { ! {"cts", MST2LM(MODEM_STATUS_CTS)}, ! {"dsr", MST2LM(MODEM_STATUS_DSR)}, ! {"dcd", MST2LM(MODEM_STATUS_DCD)}, ! {"ring", MST2LM(MODEM_STATUS_RI)}, ! {"break", LM_BREAK}, ! {"connect", LM_CONNECT}, }; /////////////////////////////////////////////////////////////// *************** *** 277,293 **** << " --break=[!]<s> - wire input state of <s> to output state of BREAK." << endl << endl ! << " The possible values of <s> above can be cts, dsr, dcd, ring or break. The" << endl ! << " exclamation sign (!) can be used to invert the value. If no any wire option" << endl ! << " specified, then the options --rts=cts --dtr=dsr are used by default." << endl << endl << "OUT method input data stream description:" << endl - << " SET_OUT_OPTS(<opts>) - the value <opts> will be or'ed with the required mask" << endl - << " to to set pin state." << endl - << " GET_IN_OPTS(<pOpts>) - the value pointed by <pOpts> will be or'ed with" << endl - << " the required mask to get line status and modem" << endl - << " status." << endl << " SET_PIN_STATE(<set>) - pin settings controlled by this filter will be" << endl << " discarded from <set>." << endl ! << " LINE_STATUS(<val>) - current state of line." << endl << " MODEM_STATUS(<val>) - current state of modem." << endl << endl --- 280,293 ---- << " --break=[!]<s> - wire input state of <s> to output state of BREAK." << endl << endl ! << " The possible values of <s> above can be cts, dsr, dcd, ring, break or" << endl ! << " connect. The exclamation sign (!) can be used to invert the value. If no any" << endl ! << " wire option specified, then the options --rts=cts --dtr=dsr are used by" << endl ! << " default." << endl << endl << "OUT method input data stream description:" << endl << " SET_PIN_STATE(<set>) - pin settings controlled by this filter will be" << endl << " discarded from <set>." << endl ! << " CONNECT(<val>) - current state of connect." << endl ! << " BREAK_STATUS(<val>) - current state of break." << endl << " MODEM_STATUS(<val>) - current state of modem." << endl << endl *************** *** 296,304 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --add-filters=0,1:" << GetPluginAbout()->pName << " COM1 COM2" << endl << " - transfer data and signals between COM1 and COM2." << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << ":\"--rts=cts\" --add-filters=0,1:" << GetPluginAbout()->pName << " --octs=off COM1 COM2" << endl << " - allow end-to-end RTS/CTS handshaking between COM1 and COM2." << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --add-filters=0:" << GetPluginAbout()->pName << " --echo-route=0 COM2" << endl << " - receive data and signals from COM2 and send it back to COM2." << endl ; --- 296,320 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " --create-filter=pinmap" << endl ! << " --add-filters=0,1:pinmap" << endl ! << " COM1" << endl ! << " COM2" << endl ! << " _END_" << endl << " - transfer data and signals between COM1 and COM2." << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " --create-filter=pinmap:\"--rts=cts\"" << endl ! << " --add-filters=0,1:pinmap" << endl ! << " --octs=off" << endl ! << " COM1" << endl ! << " COM2" << endl ! << " _END_" << endl << " - allow end-to-end RTS/CTS handshaking between COM1 and COM2." << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " --create-filter=pinmap" << endl ! << " --add-filters=0:pinmap" << endl ! << " --echo-route=0" << endl ! << " COM2" << endl ! << " _END_" << endl << " - receive data and signals from COM2 and send it back to COM2." << endl ; *************** *** 395,404 **** _ASSERTE(pOutMsg->u.pv.pVal != NULL); ! // or'e with the required mask to get line status and modem status ! *pOutMsg->u.pv.pVal |= (LSRMST2GO(((Filter *)hFilter)->lmInMask) & pOutMsg->u.pv.val); break; } case HUB_MSG_TYPE_FAIL_IN_OPTS: { ! DWORD fail_options = (pOutMsg->u.val & LSRMST2GO(((Filter *)hFilter)->lmInMask)); if (fail_options) { --- 411,420 ---- _ASSERTE(pOutMsg->u.pv.pVal != NULL); ! // or'e with the required mask to get break status and modem status ! *pOutMsg->u.pv.pVal |= (LM2GO(((Filter *)hFilter)->lmInMask) & pOutMsg->u.pv.val); break; } case HUB_MSG_TYPE_FAIL_IN_OPTS: { ! DWORD fail_options = (pOutMsg->u.val & LM2GO(((Filter *)hFilter)->lmInMask)); if (fail_options) { *************** *** 414,418 **** pOutMsg->u.val &= ~(VAL2MASK(((Filter *)hFilter)->outMask)); break; - case HUB_MSG_TYPE_BREAK_STATUS: case HUB_MSG_TYPE_MODEM_STATUS: { State *pState = ((Filter *)hFilter)->GetState(nToPort); --- 430,433 ---- *************** *** 421,441 **** return FALSE; ! WORD lmInVal; ! WORD lmInMask; ! if (pOutMsg->type == HUB_MSG_TYPE_MODEM_STATUS) { ! lmInVal = MST2LSRMST(pOutMsg->u.val); ! lmInMask = MST2LSRMST(MASK2VAL(pOutMsg->u.val)); ! } else { ! lmInVal = (pOutMsg->u.val ? LSR2LSRMST(LINE_STATUS_BI) : 0); ! lmInMask = LSR2LSRMST(LINE_STATUS_BI); } ! lmInMask &= ((Filter *)hFilter)->lmInMask; ! lmInVal = ((lmInVal & lmInMask) | (pState->lmInVal & ~lmInMask)); ! InsertPinState(*(Filter *)hFilter, pState->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ! pState->lmInVal = lmInVal; break; } --- 436,475 ---- return FALSE; ! WORD lmInMask = MST2LM(MASK2VAL(pOutMsg->u.val)) & ((Filter *)hFilter)->lmInMask; ! WORD lmInVal = ((MST2LM(pOutMsg->u.val) & lmInMask) | (pState->lmInVal & ~lmInMask)); ! InsertPinState(*(Filter *)hFilter, pState->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ! ! pState->lmInVal = lmInVal; ! break; ! } ! case HUB_MSG_TYPE_BREAK_STATUS: { ! if (((Filter *)hFilter)->lmInMask & LM_BREAK) { ! State *pState = ((Filter *)hFilter)->GetState(nToPort); ! ! if (!pState) ! return FALSE; ! ! WORD lmInVal = ((pOutMsg->u.val ? LM_BREAK : 0) | (pState->lmInVal & ~LM_BREAK)); ! ! InsertPinState(*(Filter *)hFilter, pState->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ! ! pState->lmInVal = lmInVal; } + break; + } + case HUB_MSG_TYPE_CONNECT: { + if (((Filter *)hFilter)->lmInMask & LM_CONNECT) { + State *pState = ((Filter *)hFilter)->GetState(nToPort); ! if (!pState) ! return FALSE; ! WORD lmInVal = ((pOutMsg->u.val ? LM_CONNECT : 0) | (pState->lmInVal & ~LM_CONNECT)); ! InsertPinState(*(Filter *)hFilter, pState->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ! ! pState->lmInVal = lmInVal; ! } break; } |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 08:07:15
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2654 Modified Files: comport.cpp Log Message: Fixed sending not paired CONNECT(FALSE) Index: comport.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comport.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** comport.cpp 30 Sep 2008 06:44:50 -0000 1.3 --- comport.cpp 2 Oct 2008 08:07:02 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/10/02 08:07:02 vfrolov + * Fixed sending not paired CONNECT(FALSE) + * * Revision 1.3 2008/09/30 06:44:50 vfrolov * Added warning about ignored output options *************** *** 405,417 **** if (e == FD_CLOSE || (e == FD_CONNECT && err != ERROR_SUCCESS)) { if (hSock == pOverlapped->Sock()) { - isConnected = FALSE; hSock = INVALID_SOCKET; ! HUB_MSG msg; ! msg.type = HUB_MSG_TYPE_CONNECT; ! msg.u.val = FALSE; ! pOnRead(hHub, hMasterPort, &msg); if (pListener) --- 408,423 ---- if (e == FD_CLOSE || (e == FD_CONNECT && err != ERROR_SUCCESS)) { if (hSock == pOverlapped->Sock()) { hSock = INVALID_SOCKET; ! if (isConnected) { ! isConnected = FALSE; ! HUB_MSG msg; ! msg.type = HUB_MSG_TYPE_CONNECT; ! msg.u.val = FALSE; ! ! pOnRead(hHub, hMasterPort, &msg); ! } if (pListener) |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 07:59:52
|
Update of /cvsroot/com0com/hub4com/plugins/echo In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1819 Modified Files: filter.cpp Log Message: Changed example Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/echo/filter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filter.cpp 3 Apr 2008 14:53:06 -0000 1.1 --- filter.cpp 2 Oct 2008 07:59:37 -0000 1.2 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.2 2008/10/02 07:59:37 vfrolov + * Changed example + * * Revision 1.1 2008/04/03 14:53:06 vfrolov * Initial revision *************** *** 47,51 **** "Copyright (c) 2008 Vyacheslav Frolov", "GNU General Public License", ! "Echo filter (more flexible alternative to --echo-route option).", }; --- 50,54 ---- "Copyright (c) 2008 Vyacheslav Frolov", "GNU General Public License", ! "Echo filter (alternative to --echo-route option)", }; *************** *** 71,76 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --create-filter=flt --add-filters=0:" << GetPluginAbout()->pName << ",flt COM1 COM2" << endl ! << " - receive data from COM1 and send it as is back to COM1 and send it to COM2" << endl << " via filter flt." << endl ; --- 74,85 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " --create-filter=echo" << endl ! << " --create-filter=flt" << endl ! << " --add-filters=0:echo,flt" << endl ! << " COM1" << endl ! << " COM2" << endl ! << " _END_" << endl ! << " - receive data from COM1 and send it ASIS back to COM1 and send it to COM2" << endl << " via filter flt." << endl ; |
From: Vyacheslav F. <vf...@us...> - 2008-10-02 07:52:51
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1585 Modified Files: utils.cpp utils.h Log Message: Added removing macroses for undefined parameters of --load option Index: utils.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/utils.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** utils.cpp 26 Sep 2008 14:29:13 -0000 1.5 --- utils.cpp 2 Oct 2008 07:52:38 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2008/10/02 07:52:38 vfrolov + * Added removing macroses for undefined parameters of --load option + * * Revision 1.5 2008/09/26 14:29:13 vfrolov * Added substitution <PRM0> by <file> for --load=<file> *************** *** 49,84 **** { for (int i = 0 ; i < argc ; i++) ! Add(argv[i], vector<string>()); } ! void Args::Add(const string &arg, const vector<string> ¶ms) { ! string argBuf = arg; ! for (size_type off = argBuf.find("%%"); off != argBuf.npos ; off = argBuf.find("%%", off)) { ! BOOL replaced = FALSE; ! for (size_type i = 0 ; i < params.size() ; i++) { ! stringstream par; ! par << i << "%%"; ! if (argBuf.compare(off + 2, par.str().length(), par.str()) == 0) { ! argBuf.replace(off, par.str().length() + 2, params[i]); ! replaced = TRUE; ! off += params[i].length(); ! break; } } ! if (!replaced) ! off += 2; } ! const char *pLoad = GetParam(argBuf.c_str(), "--load="); if (!pLoad) { ! //cout << "<" << argBuf << ">" << endl; ! push_back(argBuf); return; } --- 52,106 ---- { for (int i = 0 ; i < argc ; i++) ! Add(argv[i]); } ! static void SubstParams(string &argBuf, const vector<string> ¶ms) { ! for (string::size_type off = argBuf.find("%%"); off != argBuf.npos ; off = argBuf.find("%%", off)) { ! string::size_type off_beg = off + 2; ! string::size_type off_end = argBuf.find("%%", off_beg); ! if (off_end != argBuf.npos && off_end != off_beg) { ! string var = argBuf.substr(off_beg, off_end - off_beg); ! BOOL isToken = TRUE; ! for (string::size_type i = 0 ; i < var.length() ; i++) { ! if (!isdigit(var[i])) { ! isToken = FALSE; ! break; ! } ! } ! string val; ! if (isToken) { ! for (vector<string>::size_type i = 0 ; i < params.size() ; i++) { ! stringstream par; ! ! par << i; ! ! if (var == par.str()) { ! val = params[i]; ! break; ! } ! } ! ! argBuf.replace(off, var.length() + 4, val); ! off += val.length(); ! continue; } } ! off++; } + } ! void Args::Add(const string &arg) ! { ! const char *pLoad = GetParam(arg.c_str(), "--load="); if (!pLoad) { ! //cout << "<" << arg << ">" << endl; ! push_back(arg); return; } *************** *** 140,143 **** --- 162,168 ---- if (!pInStream->fail()) { string str = line.str(); + + SubstParams(str, paramsLoad); + string::size_type first_non_space = string::npos; string::size_type last_non_space = string::npos; *************** *** 174,178 **** num_recursive++; ! Add(str, paramsLoad); num_recursive--; } --- 199,203 ---- num_recursive++; ! Add(str); num_recursive--; } *************** *** 258,261 **** --- 283,289 ---- if (discardQuotes) memmove(pStr, pStr + 1, strlen(pStr + 1) + 1); + else + pStr++; + quoted = !quoted; } else { Index: utils.h =================================================================== RCS file: /cvsroot/com0com/hub4com/utils.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** utils.h 28 Aug 2008 15:53:13 -0000 1.4 --- utils.h 2 Oct 2008 07:52:38 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2008/10/02 07:52:38 vfrolov + * Added removing macroses for undefined parameters of --load option + * * Revision 1.4 2008/08/28 15:53:13 vfrolov * Added ability to load arguments from standard input and *************** *** 48,52 **** private: ! void Add(const string &arg, const vector<string> ¶ms); int num_recursive; --- 51,55 ---- private: ! void Add(const string &arg); int num_recursive; |
From: Vyacheslav F. <vf...@us...> - 2008-09-30 11:05:01
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15660 Modified Files: filters.cpp filters.h hub4com.cpp Log Message: Fixed adding order for filters with the same FID Index: hub4com.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** hub4com.cpp 26 Sep 2008 14:29:13 -0000 1.14 --- hub4com.cpp 26 Sep 2008 15:34:50 -0000 1.15 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.15 2008/09/26 15:34:50 vfrolov + * Fixed adding order for filters with the same FID + * * Revision 1.14 2008/09/26 14:29:13 vfrolov * Added substitution <PRM0> by <file> for --load=<file> *************** *** 128,134 **** << " <FID>[.<Method>][(<Lst>)], where <FID> is a filter name, <Method> is IN or" << endl << " OUT and <Lst> lists the source ports (the data only from them will be handled" << endl ! << " by OUT method). The <FID> w/o <Method> is equivalent to <FID>.IN,<FID>.OUT." << endl ! << " If the list of the source ports is not specified then the data routed from" << endl ! << " any port will be handled by OUT method." << endl << endl << "Port options:" << endl --- 131,137 ---- << " <FID>[.<Method>][(<Lst>)], where <FID> is a filter name, <Method> is IN or" << endl << " OUT and <Lst> lists the source ports (the data only from them will be handled" << endl ! << " by OUT method). The <FID> w/o <Method> is equivalent to adding IN and OUT for" << endl ! << " each filter with name <FID>. If the list of the source ports is not specified" << endl ! << " then the data routed from any port will be handled by OUT method." << endl << endl << "Port options:" << endl *************** *** 374,389 **** if (method == ".IN") { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.substr(0, dot).c_str(), TRUE, NULL)) exit(1); } else if (method == ".OUT") { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.substr(0, dot).c_str(), FALSE, pSrcPorts)) exit(1); } else { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.c_str(), TRUE, NULL)) ! exit(1); ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.c_str(), FALSE, pSrcPorts)) exit(1); } --- 377,390 ---- if (method == ".IN") { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.substr(0, dot).c_str(), TRUE, FALSE, NULL)) exit(1); } else if (method == ".OUT") { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.substr(0, dot).c_str(), FALSE, TRUE, pSrcPorts)) exit(1); } else { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.c_str(), TRUE, TRUE, pSrcPorts)) exit(1); } Index: filters.h =================================================================== RCS file: /cvsroot/com0com/hub4com/filters.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filters.h 20 Aug 2008 08:32:35 -0000 1.3 --- filters.h 26 Sep 2008 15:34:50 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/09/26 15:34:50 vfrolov + * Fixed adding order for filters with the same FID + * * Revision 1.3 2008/08/20 08:32:35 vfrolov * Implemented Filters::FilterName() *************** *** 59,64 **** int iPort, const char *pName, ! BOOL isInMethod, ! const set<int> *pSrcPorts); void Report() const; BOOL Init() const; --- 62,68 ---- int iPort, const char *pName, ! BOOL addInMethod, ! BOOL addOutMethod, ! const set<int> *pOutMethodSrcPorts); void Report() const; BOOL Init() const; Index: filters.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/filters.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filters.cpp 20 Aug 2008 08:32:35 -0000 1.3 --- filters.cpp 26 Sep 2008 15:34:50 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/09/26 15:34:50 vfrolov + * Fixed adding order for filters with the same FID + * * Revision 1.3 2008/08/20 08:32:35 vfrolov * Implemented Filters::FilterName() *************** *** 144,149 **** int iPort, const char *pName, ! BOOL isInMethod, ! const set<int> *pSrcPorts) { PortFiltersMap::iterator iPair = portFilters.find(iPort); --- 147,153 ---- int iPort, const char *pName, ! BOOL addInMethod, ! BOOL addOutMethod, ! const set<int> *pOutMethodSrcPorts) { PortFiltersMap::iterator iPair = portFilters.find(iPort); *************** *** 173,179 **** for (FilterArray::const_iterator i = allFilters.begin() ; i != allFilters.end() ; i++) { if (*i && (*i)->name == pName) { ! if ((isInMethod && (*i)->pInMethod) || (!isInMethod && (*i)->pOutMethod)) { ! if (pSrcPorts) { ! pSrcPorts = new set<int>(*pSrcPorts); if (!pSrcPorts) { --- 177,196 ---- for (FilterArray::const_iterator i = allFilters.begin() ; i != allFilters.end() ; i++) { if (*i && (*i)->name == pName) { ! if (addInMethod && (*i)->pInMethod) { ! FilterMethod *pFilterMethod = new FilterMethod(*(*i), TRUE, NULL); ! ! if (!pFilterMethod) { ! cerr << "No enough memory." << endl; ! return FALSE; ! } ! ! iPair->second->push_back(pFilterMethod); ! } ! ! if (addOutMethod && (*i)->pOutMethod) { ! const set<int> *pSrcPorts; ! ! if (pOutMethodSrcPorts) { ! pSrcPorts = new set<int>(*pOutMethodSrcPorts); if (!pSrcPorts) { *************** *** 181,187 **** return FALSE; } } ! FilterMethod *pFilterMethod = new FilterMethod(*(*i), isInMethod, pSrcPorts); if (!pFilterMethod) { --- 198,206 ---- return FALSE; } + } else { + pSrcPorts = NULL; } ! FilterMethod *pFilterMethod = new FilterMethod(*(*i), FALSE, pSrcPorts); if (!pFilterMethod) { ******************************************************************************************************* This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. Orange Business Services shall not be liable for the message if altered, changed or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. ******************************************************************************************************* |
From: Vyacheslav F. <vf...@us...> - 2008-09-30 11:04:50
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23919 Modified Files: hub4com.cpp utils.cpp Log Message: Added substitution <PRM0> by <file> for --load=<file> Index: utils.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/utils.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** utils.cpp 28 Aug 2008 15:53:13 -0000 1.4 --- utils.cpp 26 Sep 2008 14:29:13 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2008/09/26 14:29:13 vfrolov + * Added substitution <PRM0> by <file> for --load=<file> + * * Revision 1.4 2008/08/28 15:53:13 vfrolov * Added ability to load arguments from standard input and *************** *** 59,63 **** stringstream par; ! par << (i + 1) << "%%"; if (argBuf.compare(off + 2, par.str().length(), par.str()) == 0) { --- 62,66 ---- stringstream par; ! par << i << "%%"; if (argBuf.compare(off + 2, par.str().length(), par.str()) == 0) { *************** *** 107,110 **** --- 110,115 ---- } + vector<string> paramsLoad; + ifstream ifile; istream *pInStream; *************** *** 118,128 **** } pInStream = &ifile; } else { pInStream = &cin; } - vector<string> paramsLoad; - for (char *p = STRQTOK_R(NULL, ",", &pSave) ; p ; p = STRQTOK_R(NULL, ",", &pSave)) paramsLoad.push_back(p); --- 123,133 ---- } + paramsLoad.push_back(pFile); pInStream = &ifile; } else { + paramsLoad.push_back(""); pInStream = &cin; } for (char *p = STRQTOK_R(NULL, ",", &pSave) ; p ; p = STRQTOK_R(NULL, ",", &pSave)) paramsLoad.push_back(p); Index: hub4com.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** hub4com.cpp 28 Aug 2008 15:53:13 -0000 1.13 --- hub4com.cpp 26 Sep 2008 14:29:13 -0000 1.14 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.14 2008/09/26 14:29:13 vfrolov + * Added substitution <PRM0> by <file> for --load=<file> + * * Revision 1.13 2008/08/28 15:53:13 vfrolov * Added ability to load arguments from standard input and *************** *** 87,91 **** << " if <begin> is empty. Do loading till end-of-file" << endl << " if <end> is empty. Ignore arguments begining with" << endl ! << " '#'." << endl << " --help - show this help." << endl << " --help=* - show help for all modules." << endl --- 90,94 ---- << " if <begin> is empty. Do loading till end-of-file" << endl << " if <end> is empty. Ignore arguments begining with" << endl ! << " '#'. <file> will replace %%0%% in the arguments." << endl << " --help - show this help." << endl << " --help=* - show help for all modules." << endl ******************************************************************************************************* This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. Orange Business Services shall not be liable for the message if altered, changed or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. ******************************************************************************************************* |
From: Vyacheslav F. <vf...@us...> - 2008-09-30 08:38:15
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17128 Modified Files: hub4com.sln Log Message: Added filter-escinsert and filter-linectl projects Index: hub4com.sln =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.sln,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** hub4com.sln 29 Aug 2008 13:14:36 -0000 1.9 --- hub4com.sln 30 Sep 2008 08:38:02 -0000 1.10 *************** *** 22,25 **** --- 22,29 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filter-trace", "plugins\trace\trace.vcproj", "{EDA524BD-8193-49E5-995E-9EE533E2641E}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filter-escinsert", "plugins\escinsert\escinsert.vcproj", "{4BFE1E9D-47D4-4172-A749-9AC2626C88F3}" + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filter-linectl", "plugins\linectl\linectl.vcproj", "{8060E11C-18B2-4F9D-BDC0-A37726A3B8B9}" + EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution *************** *** 68,71 **** --- 72,83 ---- {EDA524BD-8193-49E5-995E-9EE533E2641E}.Release|Win32.ActiveCfg = Release|Win32 {EDA524BD-8193-49E5-995E-9EE533E2641E}.Release|Win32.Build.0 = Release|Win32 + {4BFE1E9D-47D4-4172-A749-9AC2626C88F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {4BFE1E9D-47D4-4172-A749-9AC2626C88F3}.Debug|Win32.Build.0 = Debug|Win32 + {4BFE1E9D-47D4-4172-A749-9AC2626C88F3}.Release|Win32.ActiveCfg = Release|Win32 + {4BFE1E9D-47D4-4172-A749-9AC2626C88F3}.Release|Win32.Build.0 = Release|Win32 + {8060E11C-18B2-4F9D-BDC0-A37726A3B8B9}.Debug|Win32.ActiveCfg = Debug|Win32 + {8060E11C-18B2-4F9D-BDC0-A37726A3B8B9}.Debug|Win32.Build.0 = Debug|Win32 + {8060E11C-18B2-4F9D-BDC0-A37726A3B8B9}.Release|Win32.ActiveCfg = Release|Win32 + {8060E11C-18B2-4F9D-BDC0-A37726A3B8B9}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution |
From: Vyacheslav F. <vf...@us...> - 2008-09-30 08:34:52
|
Update of /cvsroot/com0com/hub4com/plugins/linectl In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15962 Added Files: .cvsignore filter.cpp linectl.vcproj precomp.cpp precomp.h Log Message: Initial revision --- NEW FILE: precomp.cpp --- /* * $Id: precomp.cpp,v 1.1 2008/09/30 08:34:38 vfrolov Exp $ * * Copyright (c) 2007-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /////////////////////////////////////////////////////////////// #include "precomp.h" /////////////////////////////////////////////////////////////// --- NEW FILE: precomp.h --- /* * $Id: precomp.h,v 1.1 2008/09/30 08:34:38 vfrolov Exp $ * * Copyright (c) 2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: precomp.h,v $ * Revision 1.1 2008/09/30 08:34:38 vfrolov * Initial revision * */ #ifndef _PRECOMP_H_ #define _PRECOMP_H_ #include <windows.h> #include <crtdbg.h> #include <map> #include <iostream> using namespace std; #pragma warning(disable:4512) // assignment operator could not be generated #endif /* _PRECOMP_H_ */ --- NEW FILE: .cvsignore --- *.user Release Debug --- NEW FILE: filter.cpp --- /* * $Id: filter.cpp,v 1.1 2008/09/30 08:34:38 vfrolov Exp $ * * Copyright (c) 2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: filter.cpp,v $ * Revision 1.1 2008/09/30 08:34:38 vfrolov * Initial revision * */ #include "precomp.h" #include "../plugins_api.h" /////////////////////////////////////////////////////////////// static ROUTINE_MSG_INSERT_VAL *pMsgInsertVal = NULL; static ROUTINE_MSG_REPLACE_NONE *pMsgReplaceNone = NULL; static ROUTINE_PORT_NAME_A *pPortName = NULL; static ROUTINE_FILTER_NAME_A *pFilterName = NULL; /////////////////////////////////////////////////////////////// const char *GetParam(const char *pArg, const char *pPattern) { size_t lenPattern = strlen(pPattern); if (_strnicmp(pArg, pPattern, lenPattern) != 0) return NULL; return pArg + lenPattern; } /////////////////////////////////////////////////////////////// class Valid { public: Valid() : isValid(TRUE) {} void Invalidate() { isValid = FALSE; } BOOL IsValid() const { return isValid; } private: BOOL isValid; }; /////////////////////////////////////////////////////////////// class State { public: State() : br(CBR_19200), lc(VAL2LC_BYTESIZE(8)|VAL2LC_PARITY(NOPARITY)|VAL2LC_PARITY(ONESTOPBIT)) {} ULONG br; DWORD lc; }; /////////////////////////////////////////////////////////////// class Filter : public Valid { public: Filter(int argc, const char *const argv[]); void SetHub(HHUB _hHub) { hHub = _hHub; } State *GetState(int nPort); const char *PortName(int nPort) const { return pPortName(hHub, nPort); } const char *FilterName() const { return pFilterName(hHub, (HFILTER)this); } DWORD soOutMask; DWORD goInMask; private: HHUB hHub; typedef map<int, State*> PortsMap; typedef pair<int, State*> PortPair; PortsMap portsMap; }; Filter::Filter(int argc, const char *const argv[]) : soOutMask(SO_SET_BR|SO_SET_LC), goInMask(GO_RBR_STATUS|GO_RLC_STATUS), hHub(NULL) { for (const char *const *pArgs = &argv[1] ; argc > 1 ; pArgs++, argc--) { const char *pArg = GetParam(*pArgs, "--"); if (!pArg) { cerr << "Unknown option " << *pArgs << endl; Invalidate(); continue; } { cerr << "Unknown option --" << pArg << endl; Invalidate(); } } } State *Filter::GetState(int nPort) { PortsMap::iterator iPair = portsMap.find(nPort); if (iPair == portsMap.end()) { portsMap.insert(PortPair(nPort, NULL)); iPair = portsMap.find(nPort); if (iPair == portsMap.end()) return NULL; } if (!iPair->second) iPair->second = new State(); return iPair->second; } /////////////////////////////////////////////////////////////// static PLUGIN_TYPE CALLBACK GetPluginType() { return PLUGIN_TYPE_FILTER; } /////////////////////////////////////////////////////////////// static const PLUGIN_ABOUT_A about = { sizeof(PLUGIN_ABOUT_A), "linectl", "Copyright (c) 2008 Vyacheslav Frolov", "GNU General Public License", "Baudrate and line control mapping filter", }; static const PLUGIN_ABOUT_A * CALLBACK GetPluginAbout() { return &about; } /////////////////////////////////////////////////////////////// static void CALLBACK Help(const char *pProgPath) { cerr << "Usage:" << endl << " " << pProgPath << " ... --create-filter=" << GetPluginAbout()->pName << "[,<FID>][:<options>] ... --add-filters=<ports>:[...,]<FID>[,...] ..." << endl << endl << "Options:" << endl << endl << "Examples:" << endl << " " << pProgPath << " --load=,,_END_" << endl << " --create-filter=escparse" << endl << " --add-filters=0,1:escparse" << endl << " --create-filter=linectl" << endl << " --add-filters=0,1:linectl" << endl << " \\\\.\\CNCB0" << endl << " \\\\.\\CNCB1" << endl << " _END_" << endl << " - transfer data, baudrate and line control between CNCB0 and CNCB1." << endl ; } /////////////////////////////////////////////////////////////// static HFILTER CALLBACK Create( HCONFIG /*hConfig*/, int argc, const char *const argv[]) { Filter *pFilter = new Filter(argc, argv); if (!pFilter) return NULL; if (!pFilter->IsValid()) { delete pFilter; return NULL; } return (HFILTER)pFilter; } /////////////////////////////////////////////////////////////// static BOOL CALLBACK Init( HFILTER hFilter, HHUB hHub) { _ASSERTE(hFilter != NULL); _ASSERTE(hHub != NULL); ((Filter *)hFilter)->SetHub(hHub); return TRUE; } static BOOL CALLBACK OutMethod( HFILTER hFilter, int nFromPort, int nToPort, HUB_MSG *pOutMsg) { _ASSERTE(hFilter != NULL); _ASSERTE(pOutMsg != NULL); switch (pOutMsg->type) { case HUB_MSG_TYPE_SET_OUT_OPTS: { // or'e with the required mask to set pOutMsg->u.val |= ((Filter *)hFilter)->soOutMask; State *pState = ((Filter *)hFilter)->GetState(nToPort); if (!pState) return FALSE; // init baudrate and line control if (((Filter *)hFilter)->soOutMask & SO_SET_BR) pOutMsg = pMsgInsertVal(pOutMsg, HUB_MSG_TYPE_SET_BR, pState->br); if (((Filter *)hFilter)->soOutMask & SO_SET_LC) pOutMsg = pMsgInsertVal(pOutMsg, HUB_MSG_TYPE_SET_LC, pState->lc); break; } case HUB_MSG_TYPE_GET_IN_OPTS: { _ASSERTE(pOutMsg->u.pv.pVal != NULL); // or'e with the required mask to get remote baudrate and line control *pOutMsg->u.pv.pVal |= (((Filter *)hFilter)->goInMask & pOutMsg->u.pv.val); break; } case HUB_MSG_TYPE_FAIL_IN_OPTS: { DWORD fail_options = (pOutMsg->u.val & ((Filter *)hFilter)->goInMask); if (fail_options) { cerr << ((Filter *)hFilter)->PortName(nFromPort) << " WARNING: Requested by filter " << ((Filter *)hFilter)->FilterName() << " option(s) 0x" << hex << fail_options << dec << " not accepted" << endl; } break; } case HUB_MSG_TYPE_SET_BR: // discard if controlled by this filter if (((Filter *)hFilter)->soOutMask & SO_SET_BR) pMsgReplaceNone(pOutMsg, HUB_MSG_TYPE_EMPTY); break; case HUB_MSG_TYPE_SET_LC: // discard if controlled by this filter if (((Filter *)hFilter)->soOutMask & SO_SET_LC) pMsgReplaceNone(pOutMsg, HUB_MSG_TYPE_EMPTY); break; case HUB_MSG_TYPE_RBR_STATUS: { if (((Filter *)hFilter)->soOutMask & SO_SET_BR) { State *pState = ((Filter *)hFilter)->GetState(nToPort); if (!pState) return FALSE; if (pState->br != pOutMsg->u.val) { pOutMsg = pMsgInsertVal(pOutMsg, HUB_MSG_TYPE_SET_BR, pOutMsg->u.val); pState->br = pOutMsg->u.val; } } break; } case HUB_MSG_TYPE_RLC_STATUS: { if (((Filter *)hFilter)->soOutMask & SO_SET_BR) { State *pState = ((Filter *)hFilter)->GetState(nToPort); if (!pState) return FALSE; _ASSERTE((pOutMsg->u.val & ~(VAL2LC_BYTESIZE(-1)|VAL2LC_PARITY(-1)|VAL2LC_STOPBITS(-1))) == 0); if (pState->lc != pOutMsg->u.val) { pOutMsg = pMsgInsertVal(pOutMsg, HUB_MSG_TYPE_SET_LC, pOutMsg->u.val); pState->lc = pOutMsg->u.val; } } break; } } return pOutMsg != NULL; } /////////////////////////////////////////////////////////////// static const FILTER_ROUTINES_A routines = { sizeof(FILTER_ROUTINES_A), GetPluginType, GetPluginAbout, Help, NULL, // ConfigStart NULL, // Config NULL, // ConfigStop Create, Init, NULL, // InMethod OutMethod, }; static const PLUGIN_ROUTINES_A *const plugins[] = { (const PLUGIN_ROUTINES_A *)&routines, NULL }; /////////////////////////////////////////////////////////////// PLUGIN_INIT_A InitA; const PLUGIN_ROUTINES_A *const * CALLBACK InitA( const HUB_ROUTINES_A * pHubRoutines) { if (!ROUTINE_IS_VALID(pHubRoutines, pMsgInsertVal) || !ROUTINE_IS_VALID(pHubRoutines, pMsgReplaceNone) || !ROUTINE_IS_VALID(pHubRoutines, pPortName) || !ROUTINE_IS_VALID(pHubRoutines, pFilterName)) { return NULL; } pMsgInsertVal = pHubRoutines->pMsgInsertVal; pMsgReplaceNone = pHubRoutines->pMsgReplaceNone; pPortName = pHubRoutines->pPortName; pFilterName = pHubRoutines->pFilterName; return plugins; } /////////////////////////////////////////////////////////////// --- NEW FILE: linectl.vcproj --- <?xml version="1.0" encoding="windows-1251"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="filter-linectl" ProjectGUID="{8060E11C-18B2-4F9D-BDC0-A37726A3B8B9}" RootNamespace="hub4com" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="2" UseOfMFC="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="2" PrecompiledHeaderThrough="precomp.h" PrecompiledHeaderFile="$(IntDir)\precomp.pch" WarningLevel="4" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" OutputFile="..\..\$(OutDir)\plugins\$(ProjectName).dll" LinkIncremental="2" ModuleDefinitionFile="..\plugins.def" GenerateDebugInformation="true" SubSystem="1" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="2" UseOfMFC="0" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE" RuntimeLibrary="0" UsePrecompiledHeader="2" PrecompiledHeaderThrough="precomp.h" PrecompiledHeaderFile="$(IntDir)\precomp.pch" WarningLevel="4" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" OutputFile="..\..\$(OutDir)\plugins\$(ProjectName).dll" LinkIncremental="2" ModuleDefinitionFile="..\plugins.def" GenerateDebugInformation="true" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > <File RelativePath="..\plugins_api.h" > </File> <File RelativePath=".\precomp.h" > </File> </Filter> <Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File RelativePath=".\filter.cpp" > </File> <File RelativePath="..\plugins.def" > </File> <File RelativePath=".\precomp.cpp" > <FileConfiguration Name="Debug|Win32" > <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" > <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1" /> </FileConfiguration> </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> |