com0com-cvs Mailing List for Null-modem emulator (Page 22)
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-05-04 09:53:56
|
Update of /cvsroot/com0com/com0com/setup In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10663 Modified Files: params.cpp params.h Log Message: Implemented HiddenMode option Index: params.h =================================================================== RCS file: /cvsroot/com0com/com0com/setup/params.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** params.h 19 Oct 2007 16:09:55 -0000 1.5 --- params.h 4 May 2008 09:53:51 -0000 1.6 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2008/05/04 09:53:51 vfrolov + * Implemented HiddenMode option + * * Revision 1.5 2007/10/19 16:09:55 vfrolov * Implemented --detail-prms option *************** *** 35,39 **** * Initial revision * - * */ --- 38,41 ---- *************** *** 71,74 **** --- 73,77 ---- DWORD plugInMode; DWORD exclusiveMode; + DWORD hiddenMode; DWORD pinCTS; DWORD pinDSR; Index: params.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/params.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** params.cpp 8 Apr 2008 06:49:44 -0000 1.10 --- params.cpp 4 May 2008 09:53:51 -0000 1.11 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.11 2008/05/04 09:53:51 vfrolov + * Implemented HiddenMode option + * * Revision 1.10 2008/04/08 06:49:44 vfrolov * Added pin OUT2 *************** *** 67,70 **** --- 70,74 ---- m_plugInMode = 0x0008, m_exclusiveMode = 0x0010, + m_hiddenMode = 0x0020, m_pinCTS = 0x0100, m_pinDSR = 0x0200, *************** *** 77,81 **** m_emuOverrun, m_plugInMode, ! m_exclusiveMode }; /////////////////////////////////////////////////////////////// --- 81,86 ---- m_emuOverrun, m_plugInMode, ! m_exclusiveMode, ! m_hiddenMode }; /////////////////////////////////////////////////////////////// *************** *** 102,105 **** --- 107,111 ---- plugInMode = 0; exclusiveMode = 0; + hiddenMode = 0; pinCTS = 0; *************** *** 145,148 **** --- 151,155 ---- case m_plugInMode: return &plugInMode; case m_exclusiveMode: return &exclusiveMode; + case m_hiddenMode: return &hiddenMode; case m_pinCTS: return &pinCTS; case m_pinDSR: return &pinDSR; *************** *** 160,163 **** --- 167,171 ---- static const DWORD plugInMode = C0C_DEFAULT_PLUGINMODE; static const DWORD exclusiveMode = C0C_DEFAULT_EXCLUSIVEMODE; + static const DWORD hiddenMode = C0C_DEFAULT_HIDDENMODE; static const DWORD pinCTS = C0C_DEFAULT_PIN_CTS; static const DWORD pinDSR = C0C_DEFAULT_PIN_DSR; *************** *** 170,173 **** --- 178,182 ---- case m_plugInMode: return &plugInMode; case m_exclusiveMode: return &exclusiveMode; + case m_hiddenMode: return &hiddenMode; case m_pinCTS: return &pinCTS; case m_pinDSR: return &pinDSR; *************** *** 187,190 **** --- 196,200 ---- case m_plugInMode: return "PlugInMode"; case m_exclusiveMode: return "ExclusiveMode"; + case m_hiddenMode: return "HiddenMode"; case m_pinCTS: return "cts"; case m_pinDSR: return "dsr"; *************** *** 743,746 **** --- 753,759 ---- " ExclusiveMode={yes|no} - enable/disable exclusive mode, the exclusive mode\n" " port is hidden if it is open (disabled by default)\n" + " HiddenMode={yes|no} - enable/disable hidden mode, the hidden mode port is\n" + " hidden as it is possible for port enumerators\n" + " (disabled by default)\n" " cts=[!]<p> - wire CTS pin to <p> (rrts by default)\n" " dsr=[!]<p> - wire DSR pin to <p> (rdtr by default)\n" |
From: Vyacheslav F. <vf...@us...> - 2008-05-04 09:51:49
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9900 Modified Files: adddev.c com0com.h showport.c showport.h trace.h tracetbl.c Log Message: Implemented HiddenMode option Index: showport.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/showport.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** showport.c 1 Jun 2007 16:22:40 -0000 1.1 --- showport.c 4 May 2008 09:51:45 -0000 1.2 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2007-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,27 **** * * $Log$ * Revision 1.1 2007/06/01 16:22:40 vfrolov * Implemented plug-in and exclusive modes * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/05/04 09:51:45 vfrolov + * Implemented HiddenMode option + * * Revision 1.1 2007/06/01 16:22:40 vfrolov * Implemented plug-in and exclusive modes * */ *************** *** 34,44 **** #define FILE_ID 0xD - #define C0C_SHOW_SETNAME 0x01 - #define C0C_SHOW_SYMLINK 0x02 - #define C0C_SHOW_DEVICEMAP 0x04 - #define C0C_SHOW_INTERFACE 0x08 - #define C0C_SHOW_WMIREG 0x10 - #define C0C_SHOW_SHOWN 0x80 - #ifndef NTDDI_VERSION /* ZwDeleteValueKey is missing in old DDKs */ --- 36,39 ---- *************** *** 155,159 **** res = TRUE; ! if ((pDevExt->shown & C0C_SHOW_SETNAME) == 0) { HANDLE hKey; --- 150,154 ---- res = TRUE; ! if ((pDevExt->shown & C0C_SHOW_SETNAME) == 0 && (pDevExt->hide & C0C_SHOW_SETNAME) == 0) { HANDLE hKey; *************** *** 190,194 **** if (pDevExt->ntDeviceName.Buffer) { ! if (pDevExt->win32DeviceName.Buffer && (pDevExt->shown & C0C_SHOW_SYMLINK) == 0) { status = IoCreateSymbolicLink(&pDevExt->win32DeviceName, &pDevExt->ntDeviceName); --- 185,192 ---- if (pDevExt->ntDeviceName.Buffer) { ! if (pDevExt->win32DeviceName.Buffer && ! (pDevExt->shown & C0C_SHOW_SYMLINK) == 0 && ! (pDevExt->hide & C0C_SHOW_SYMLINK) == 0) ! { status = IoCreateSymbolicLink(&pDevExt->win32DeviceName, &pDevExt->ntDeviceName); *************** *** 201,205 **** } ! if ((pDevExt->shown & C0C_SHOW_SYMLINK) != 0 && (pDevExt->shown & C0C_SHOW_DEVICEMAP) == 0) { status = RtlWriteRegistryValue(RTL_REGISTRY_DEVICEMAP, C0C_SERIAL_DEVICEMAP, pDevExt->ntDeviceName.Buffer, REG_SZ, --- 199,206 ---- } ! if ((pDevExt->shown & C0C_SHOW_SYMLINK) != 0 && ! (pDevExt->shown & C0C_SHOW_DEVICEMAP) == 0 && ! (pDevExt->hide & C0C_SHOW_DEVICEMAP) == 0) ! { status = RtlWriteRegistryValue(RTL_REGISTRY_DEVICEMAP, C0C_SERIAL_DEVICEMAP, pDevExt->ntDeviceName.Buffer, REG_SZ, *************** *** 216,220 **** } ! if (pDevExt->symbolicLinkName.Buffer && (pDevExt->shown & C0C_SHOW_INTERFACE) == 0) { status = IoSetDeviceInterfaceState(&pDevExt->symbolicLinkName, TRUE); --- 217,224 ---- } ! if (pDevExt->symbolicLinkName.Buffer && ! (pDevExt->shown & C0C_SHOW_INTERFACE) == 0 && ! (pDevExt->hide & C0C_SHOW_INTERFACE) == 0) ! { status = IoSetDeviceInterfaceState(&pDevExt->symbolicLinkName, TRUE); *************** *** 227,231 **** } ! if ((pDevExt->shown & C0C_SHOW_WMIREG) == 0) { status = IoWMIRegistrationControl(pDevExt->pDevObj, WMIREG_ACTION_REGISTER); --- 231,235 ---- } ! if ((pDevExt->shown & C0C_SHOW_WMIREG) == 0 && (pDevExt->hide & C0C_SHOW_WMIREG) == 0) { status = IoWMIRegistrationControl(pDevExt->pDevObj, WMIREG_ACTION_REGISTER); *************** *** 244,245 **** --- 248,264 ---- return res; } + + VOID SetHiddenMode(IN PC0C_FDOPORT_EXTENSION pDevExt, ULONG hiddenMode) + { + if (hiddenMode == 0xFFFFFFFF) + pDevExt->hide = (C0C_SHOW_SETNAME|C0C_SHOW_DEVICEMAP|C0C_SHOW_WMIREG); + else + pDevExt->hide = (UCHAR)hiddenMode; + + #if DBG + if (pDevExt->hide) + TraceMask((PC0C_COMMON_EXTENSION)pDevExt, "Enabled hidden mode ", codeNameTableShowPort, pDevExt->hide); + else + Trace0((PC0C_COMMON_EXTENSION)pDevExt, L"Disabled hidden mode"); + #endif /* DBG */ + } Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/com0com.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** com0com.h 8 Apr 2008 10:27:44 -0000 1.42 --- com0com.h 4 May 2008 09:51:45 -0000 1.43 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.43 2008/05/04 09:51:45 vfrolov + * Implemented HiddenMode option + * * Revision 1.42 2008/04/08 10:27:44 vfrolov * Fixed C0C_MCR_MASK *************** *** 360,364 **** UNICODE_STRING win32DeviceName; UNICODE_STRING symbolicLinkName; ! unsigned short shown; LONG openCount; --- 363,378 ---- UNICODE_STRING win32DeviceName; UNICODE_STRING symbolicLinkName; ! ! #define C0C_SHOW_SETNAME 0x01 ! #define C0C_SHOW_SYMLINK 0x02 ! #define C0C_SHOW_DEVICEMAP 0x04 ! #define C0C_SHOW_INTERFACE 0x08 ! #define C0C_SHOW_WMIREG 0x10 ! ! UCHAR hide; ! ! #define C0C_SHOW_SHOWN 0x80 ! ! UCHAR shown; LONG openCount; Index: tracetbl.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/tracetbl.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tracetbl.c 17 Sep 2007 14:31:06 -0000 1.13 --- tracetbl.c 4 May 2008 09:51:45 -0000 1.14 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.14 2008/05/04 09:51:45 vfrolov + * Implemented HiddenMode option + * * Revision 1.13 2007/09/17 14:31:06 vfrolov * Implemented pseudo pin OPEN *************** *** 60,64 **** * Initial revision * - * */ --- 63,66 ---- *************** *** 440,443 **** --- 442,454 ---- }; + CODE2NAME codeNameTableShowPort[] = { + TOCODE2NAME(C0C_SHOW_, SETNAME), + TOCODE2NAME(C0C_SHOW_, SYMLINK), + TOCODE2NAME(C0C_SHOW_, DEVICEMAP), + TOCODE2NAME(C0C_SHOW_, INTERFACE), + TOCODE2NAME(C0C_SHOW_, WMIREG), + {0, NULL} + }; + #else /* DBG */ #pragma warning(disable:4206) // nonstandard extension used : translation unit is empty Index: showport.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/showport.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** showport.h 1 Jun 2007 16:22:40 -0000 1.1 --- showport.h 4 May 2008 09:51:45 -0000 1.2 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2007-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,27 **** * * $Log$ * Revision 1.1 2007/06/01 16:22:40 vfrolov * Implemented plug-in and exclusive modes * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/05/04 09:51:45 vfrolov + * Implemented HiddenMode option + * * Revision 1.1 2007/06/01 16:22:40 vfrolov * Implemented plug-in and exclusive modes * */ *************** *** 32,35 **** --- 34,38 ---- BOOLEAN HidePort(IN PC0C_FDOPORT_EXTENSION pDevExt); BOOLEAN ShowPort(IN PC0C_FDOPORT_EXTENSION pDevExt); + VOID SetHiddenMode(IN PC0C_FDOPORT_EXTENSION pDevExt, ULONG hiddenMode); #endif /* _C0C_SHOWPORT_H_ */ Index: adddev.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/adddev.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** adddev.c 14 Mar 2008 15:28:39 -0000 1.32 --- adddev.c 4 May 2008 09:51:44 -0000 1.33 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.33 2008/05/04 09:51:44 vfrolov + * Implemented HiddenMode option + * * Revision 1.32 2008/03/14 15:28:39 vfrolov * Implemented ability to get paired port settings with *************** *** 185,189 **** PC0C_FDOPORT_EXTENSION pDevExt; PC0C_PDOPORT_EXTENSION pPhDevExt; ! ULONG emuBR, emuOverrun, plugInMode, exclusiveMode; ULONG pinCTS, pinDSR, pinDCD, pinRI; UNICODE_STRING ntDeviceName; --- 188,192 ---- PC0C_FDOPORT_EXTENSION pDevExt; PC0C_PDOPORT_EXTENSION pPhDevExt; ! ULONG emuBR, emuOverrun, plugInMode, exclusiveMode, hiddenMode; ULONG pinCTS, pinDSR, pinDCD, pinRI; UNICODE_STRING ntDeviceName; *************** *** 263,270 **** plugInMode = C0C_DEFAULT_PLUGINMODE; exclusiveMode = C0C_DEFAULT_EXCLUSIVEMODE; pinCTS = pinDSR = pinDCD = pinRI = 0; if (NT_SUCCESS(status)) { ! RTL_QUERY_REGISTRY_TABLE queryTable[9]; ULONG zero = 0; int i; --- 266,274 ---- plugInMode = C0C_DEFAULT_PLUGINMODE; exclusiveMode = C0C_DEFAULT_EXCLUSIVEMODE; + hiddenMode = C0C_DEFAULT_HIDDENMODE; pinCTS = pinDSR = pinDCD = pinRI = 0; if (NT_SUCCESS(status)) { ! RTL_QUERY_REGISTRY_TABLE queryTable[10]; ULONG zero = 0; int i; *************** *** 300,303 **** --- 304,312 ---- i++; + queryTable[i].Name = L"HiddenMode"; + queryTable[i].EntryContext = &hiddenMode; + queryTable[i].DefaultData = &hiddenMode; + + i++; queryTable[i].Name = L"cts"; queryTable[i].EntryContext = &pinCTS; *************** *** 391,394 **** --- 400,405 ---- } + SetHiddenMode(pDevExt, hiddenMode); + AllocTimeouts(pDevExt->pIoPortLocal); Index: trace.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** trace.h 21 Feb 2007 16:52:34 -0000 1.11 --- trace.h 4 May 2008 09:51:45 -0000 1.12 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.12 2008/05/04 09:51:45 vfrolov + * Implemented HiddenMode option + * * Revision 1.11 2007/02/21 16:52:34 vfrolov * Added tracing of IRP_MJ_POWER with more details *************** *** 54,58 **** * Initial revision * - * */ --- 57,60 ---- *************** *** 141,144 **** --- 143,147 ---- CODE2NAME codeNameTableHoldReasons[]; CODE2NAME codeNameTableFileInformationClass[]; + CODE2NAME codeNameTableShowPort[]; FIELD2NAME codeNameTableControlHandShake[]; |
From: Vyacheslav F. <vf...@us...> - 2008-05-04 09:44:12
|
Update of /cvsroot/com0com/com0com/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7159 Modified Files: com0com.h Log Message: Added C0C_DEFAULT_HIDDENMODE Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/include/com0com.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** com0com.h 8 Apr 2008 06:44:35 -0000 1.7 --- com0com.h 4 May 2008 09:44:05 -0000 1.8 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.8 2008/05/04 09:44:05 vfrolov + * Added C0C_DEFAULT_HIDDENMODE + * * Revision 1.7 2008/04/08 06:44:35 vfrolov * Added pin OUT2 *************** *** 82,85 **** --- 85,89 ---- #define C0C_DEFAULT_PLUGINMODE 0x00000000 #define C0C_DEFAULT_EXCLUSIVEMODE 0x00000000 + #define C0C_DEFAULT_HIDDENMODE 0x00000000 #endif /* _INCLUDE_C0C_COM0COM_H_ */ |
From: Vyacheslav F. <vf...@us...> - 2008-04-16 14:14:07
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8454 Modified Files: filters.cpp filters.h hub4com.cpp Log Message: Added ability to specify source posts for OUT method Index: hub4com.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** hub4com.cpp 14 Apr 2008 07:32:03 -0000 1.10 --- hub4com.cpp 16 Apr 2008 14:13:59 -0000 1.11 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.11 2008/04/16 14:13:59 vfrolov + * Added ability to specify source posts for OUT method + * * Revision 1.10 2008/04/14 07:32:03 vfrolov * Renamed option --use-port-module to --use-driver *************** *** 106,112 **** << " sending to ports listed in <Lst>." << endl << endl ! << " The syntax of <LstF> above is <FID0>[.<Method>][,<FID1>[.<Method>]...], where" << endl ! << " <FIDn> is a filter name and <Method> is IN or OUT. The <FID> w/o <Method> is" << endl ! << " equivalent to <FID>.IN,<FID>.OUT" << endl << endl << "Port options:" << endl --- 109,118 ---- << " sending to ports listed in <Lst>." << endl << 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 <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 *************** *** 160,163 **** --- 166,170 ---- res = FALSE; } else { + cerr << "Invalid port " << p << endl; res = FALSE; } *************** *** 285,289 **** } /////////////////////////////////////////////////////////////// ! static BOOL AddFilters(ComHub &/*hub*/, int iPort, PVOID pFilters, PVOID pListFlt, PVOID /*p2*/) { char *pTmpList = _strdup((const char *)pListFlt); --- 292,296 ---- } /////////////////////////////////////////////////////////////// ! static BOOL AddFilters(ComHub &hub, int iPort, PVOID pFilters, PVOID pListFlt, PVOID /*p2*/) { char *pTmpList = _strdup((const char *)pListFlt); *************** *** 296,322 **** char *pSave; ! for (char *pFilter = STRTOK_R(pTmpList, ",", &pSave) ; pFilter ; ! pFilter = STRTOK_R(NULL, ",", &pSave)) { ! string filter(pFilter); string::size_type dot = filter.rfind('.'); string method(dot != filter.npos ? filter.substr(dot) : ""); if (method == ".IN") { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.substr(0, dot).c_str(), TRUE)) exit(1); } else if (method == ".OUT") { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.substr(0, dot).c_str(), FALSE)) exit(1); } else { ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.c_str(), TRUE)) exit(1); ! if (!((Filters *)pFilters)->AddFilter(iPort, filter.c_str(), FALSE)) exit(1); } } --- 303,366 ---- char *pSave; ! for (char *pFilter = STRQTOK_R(pTmpList, ",", &pSave, "()", FALSE) ; pFilter ; ! pFilter = STRQTOK_R(NULL, ",", &pSave, "()", FALSE)) { ! char *pSave2; ! ! string filter(STRTOK_R(pFilter, "(", &pSave2)); ! char *pList = STRTOK_R(NULL, ")", &pSave2); ! ! set<int> *pSrcPorts = NULL; ! ! if (pList) { ! for (char *p = STRTOK_R(pList, ",", &pSave2) ; p ; p = STRTOK_R(NULL, ",", &pSave2)) { ! int i; ! ! if (_stricmp(p, "All") == 0) { ! if (pSrcPorts) { ! delete pSrcPorts; ! pSrcPorts = NULL; ! } ! break; ! } else if (StrToInt(p, &i) && i >= 0 && i < hub.NumPorts()) { ! if (!pSrcPorts) { ! pSrcPorts = new set<int>; ! ! if (!pSrcPorts) { ! cerr << "No enough memory." << endl; ! exit(2); ! } ! } ! ! pSrcPorts->insert(i); ! } else { ! cerr << "Invalid port " << p << endl; ! exit(1); ! } ! } ! } ! string::size_type dot = filter.rfind('.'); string method(dot != filter.npos ? filter.substr(dot) : ""); 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); } + + if (pSrcPorts) + delete pSrcPorts; } Index: filters.h =================================================================== RCS file: /cvsroot/com0com/hub4com/filters.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filters.h 26 Mar 2008 08:35:32 -0000 1.1 --- filters.h 16 Apr 2008 14:13:59 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/26 08:35:32 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/04/16 14:13:59 vfrolov + * Added ability to specify source posts for OUT method + * * Revision 1.1 2008/03/26 08:35:32 vfrolov * Initial revision * */ *************** *** 54,58 **** int iPort, const char *pName, ! BOOL isInMethod); void Report() const; BOOL Init() const; --- 56,61 ---- int iPort, const char *pName, ! BOOL isInMethod, ! const set<int> *pSrcPorts); void Report() const; BOOL Init() const; Index: filters.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/filters.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filters.cpp 26 Mar 2008 08:35:32 -0000 1.1 --- filters.cpp 16 Apr 2008 14:13:59 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/26 08:35:32 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/04/16 14:13:59 vfrolov + * Added ability to specify source posts for OUT method + * * Revision 1.1 2008/03/26 08:35:32 vfrolov * Initial revision * */ *************** *** 58,67 **** class FilterMethod { public: ! FilterMethod(const Filter &_filter, BOOL _isInMethod) : filter(_filter), ! isInMethod(_isInMethod) {} const Filter &filter; const BOOL isInMethod; }; /////////////////////////////////////////////////////////////// --- 60,76 ---- class FilterMethod { public: ! FilterMethod(const Filter &_filter, BOOL _isInMethod, const set<int> *_pSrcPorts) : filter(_filter), ! isInMethod(_isInMethod), ! pSrcPorts(_pSrcPorts) {} ! ! ~FilterMethod() { ! if (pSrcPorts) ! delete pSrcPorts; ! } const Filter &filter; const BOOL isInMethod; + const set<int> *const pSrcPorts; }; /////////////////////////////////////////////////////////////// *************** *** 132,136 **** int iPort, const char *pName, ! BOOL isInMethod) { PortFiltersMap::iterator iPair = portFilters.find(iPort); --- 141,146 ---- int iPort, const char *pName, ! BOOL isInMethod, ! const set<int> *pSrcPorts) { PortFiltersMap::iterator iPair = portFilters.find(iPort); *************** *** 161,165 **** if (*i && (*i)->name == pName) { if ((isInMethod && (*i)->pInMethod) || (!isInMethod && (*i)->pOutMethod)) { ! FilterMethod *pFilterMethod = new FilterMethod(*(*i), isInMethod); if (!pFilterMethod) { --- 171,184 ---- if (*i && (*i)->name == pName) { if ((isInMethod && (*i)->pInMethod) || (!isInMethod && (*i)->pOutMethod)) { ! if (pSrcPorts) { ! pSrcPorts = new set<int>(*pSrcPorts); ! ! if (!pSrcPorts) { ! cerr << "No enough memory." << endl; ! return FALSE; ! } ! } ! ! FilterMethod *pFilterMethod = new FilterMethod(*(*i), isInMethod, pSrcPorts); if (!pFilterMethod) { *************** *** 232,236 **** bufs[2] << "-"; } else { ! bufs[2] << "{" << (*i)->filter.name << ".OUT" << "}<-"; string::size_type len = (*i)->filter.name.length(); --- 251,269 ---- bufs[2] << "-"; } else { ! bufs[2] << "{" << (*i)->filter.name << ".OUT"; ! if ((*i)->pSrcPorts) { ! bufs[2] << "("; ! for (set<int>::const_iterator iSrc = (*i)->pSrcPorts->begin() ; ! iSrc != (*i)->pSrcPorts->end() ; iSrc++) ! { ! if (iSrc != (*i)->pSrcPorts->begin()) ! bufs[2] << ","; ! ! bufs[2] << *iSrc; ! } ! bufs[2] << ")"; ! } ! bufs[2] << "}<-"; ! string::size_type len = (*i)->filter.name.length(); *************** *** 393,397 **** for (FilterMethodArray::const_reverse_iterator i = pFilters->rbegin() ; i != pFilters->rend() ; i++) { ! if (!(*i)->isInMethod) { FILTER_OUT_METHOD *pOutMethod = (*i)->filter.pOutMethod; HFILTER hFilter = (*i)->filter.hFilter; --- 426,432 ---- for (FilterMethodArray::const_reverse_iterator i = pFilters->rbegin() ; i != pFilters->rend() ; i++) { ! if (!(*i)->isInMethod && (!(*i)->pSrcPorts || ! (*i)->pSrcPorts->find(nFromPort) != (*i)->pSrcPorts->end())) ! { FILTER_OUT_METHOD *pOutMethod = (*i)->filter.pOutMethod; HFILTER hFilter = (*i)->filter.hFilter; |
From: Vyacheslav F. <vf...@us...> - 2008-04-16 14:09:50
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6834 Modified Files: precomp.h Log Message: Included <set> Index: precomp.h =================================================================== RCS file: /cvsroot/com0com/hub4com/precomp.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** precomp.h 26 Mar 2008 08:15:24 -0000 1.3 --- precomp.h 16 Apr 2008 14:09:41 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/04/16 14:09:41 vfrolov + * Included <set> + * * Revision 1.3 2008/03/26 08:15:24 vfrolov * Added more includes *************** *** 29,33 **** * Initial revision * - * */ --- 32,35 ---- *************** *** 40,43 **** --- 42,46 ---- #include <string> #include <vector> + #include <set> #include <map> #include <iostream> |
From: Vyacheslav F. <vf...@us...> - 2008-04-16 14:07:26
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6022 Modified Files: utils.cpp utils.h Log Message: Extended STRQTOK_R() Index: utils.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/utils.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utils.cpp 26 Mar 2008 08:14:09 -0000 1.2 --- utils.cpp 16 Apr 2008 14:07:12 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/04/16 14:07:12 vfrolov + * Extended STRQTOK_R() + * * Revision 1.2 2008/03/26 08:14:09 vfrolov * Added *************** *** 184,188 **** } /////////////////////////////////////////////////////////////// ! char *STRQTOK_R(char *pStr, const char *pDelims, char **ppSave) { if (!pStr) --- 187,196 ---- } /////////////////////////////////////////////////////////////// ! char *STRQTOK_R( ! char *pStr, ! const char *pDelims, ! char **ppSave, ! const char *pQuotes, ! BOOL discard) { if (!pStr) *************** *** 202,208 **** while (*pStr && (quoted || !IsDelim(*pStr, pDelims))) { ! if (*pStr == '\"') { if (cntMask%2 == 0) { ! memmove(pStr, pStr + 1, strlen(pStr + 1) + 1); quoted = !quoted; } else { --- 210,217 ---- while (*pStr && (quoted || !IsDelim(*pStr, pDelims))) { ! if (quoted ? (*pStr == pQuotes[1]) : (*pStr == pQuotes[0])) { if (cntMask%2 == 0) { ! if (discard) ! memmove(pStr, pStr + 1, strlen(pStr + 1) + 1); quoted = !quoted; } else { Index: utils.h =================================================================== RCS file: /cvsroot/com0com/hub4com/utils.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utils.h 26 Mar 2008 08:14:09 -0000 1.2 --- utils.h 16 Apr 2008 14:07:12 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/04/16 14:07:12 vfrolov + * Extended STRQTOK_R() + * * Revision 1.2 2008/03/26 08:14:09 vfrolov * Added *************** *** 47,51 **** /////////////////////////////////////////////////////////////// char *STRTOK_R(char *pStr, const char *pDelims, char **ppSave); ! char *STRQTOK_R(char *pStr, const char *pDelims, char **ppSave); BOOL StrToInt(const char *pStr, int *pNum); const char *GetParam(const char *pArg, const char *pPattern); --- 50,59 ---- /////////////////////////////////////////////////////////////// char *STRTOK_R(char *pStr, const char *pDelims, char **ppSave); ! char *STRQTOK_R( ! char *pStr, ! const char *pDelims, ! char **ppSave, ! const char *pQuotes = "\"\"", ! BOOL discard = TRUE); BOOL StrToInt(const char *pStr, int *pNum); const char *GetParam(const char *pArg, const char *pPattern); |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:10
|
Update of /cvsroot/com0com/hub4com/plugins In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976/plugins Modified Files: plugins_api.h Log Message: Renamed option --use-port-module to --use-driver Index: plugins_api.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/plugins_api.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** plugins_api.h 11 Apr 2008 14:48:42 -0000 1.3 --- plugins_api.h 14 Apr 2008 07:32:03 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/04/14 07:32:03 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.3 2008/04/11 14:48:42 vfrolov * Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK *************** *** 134,138 **** PLUGIN_TYPE_INVALID, PLUGIN_TYPE_FILTER, ! PLUGIN_TYPE_PORT, } PLUGIN_TYPE; /*******************************************************************/ --- 137,141 ---- PLUGIN_TYPE_INVALID, PLUGIN_TYPE_FILTER, ! PLUGIN_TYPE_DRIVER, } PLUGIN_TYPE; /*******************************************************************/ |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:10
|
Update of /cvsroot/com0com/hub4com/plugins/pin2con In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976/plugins/pin2con Modified Files: filter.cpp Log Message: Renamed option --use-port-module to --use-driver Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/pin2con/filter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filter.cpp 11 Apr 2008 14:48:42 -0000 1.3 --- filter.cpp 14 Apr 2008 07:32:04 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/04/14 07:32:04 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.3 2008/04/11 14:48:42 vfrolov * Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK *************** *** 179,183 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --add-filters=0:" << GetPluginAbout()->pName << " COM1 --use-port-module=tcp 111.11.11.11:1111" << endl << " - wait DSR ON from COM1 and then establish connection to 111.11.11.11:1111" << endl << " and disconnect on DSR OFF." << endl --- 182,186 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --add-filters=0:" << GetPluginAbout()->pName << " COM1 --use-driver=tcp 111.11.11.11:1111" << endl << " - wait DSR ON from COM1 and then establish connection to 111.11.11.11:1111" << endl << " and disconnect on DSR OFF." << endl |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:10
|
Update of /cvsroot/com0com/hub4com/plugins/awakseq In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976/plugins/awakseq Modified Files: filter.cpp Log Message: Renamed option --use-port-module to --use-driver Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/awakseq/filter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filter.cpp 7 Apr 2008 12:29:11 -0000 1.3 --- filter.cpp 14 Apr 2008 07:32:03 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/04/14 07:32:03 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.3 2008/04/07 12:29:11 vfrolov * Replaced --rt-events option by SET_RT_EVENTS message *************** *** 168,175 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --add-filters=0:" << GetPluginAbout()->pName << " COM1 --use-port-module=tcp 111.11.11.11:1111" << endl << " - wait first byte from COM1 and then establish connection to" << endl << " 111.11.11.11:1111." << endl ! << " " << pProgPath << " --create-filter=pin2con --create-filter=" << GetPluginAbout()->pName << ":\"--awak-seq=aaa\" --add-filters=0:pin2con," << GetPluginAbout()->pName << " COM1 --use-port-module=tcp 111.11.11.11:1111" << endl << " - wait \"aaa\" from COM1 and then establish connection to 111.11.11.11:1111." << endl << " and disconnect on DSR OFF." << endl --- 171,178 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << " --add-filters=0:" << GetPluginAbout()->pName << " COM1 --use-driver=tcp 111.11.11.11:1111" << endl << " - wait first byte from COM1 and then establish connection to" << endl << " 111.11.11.11:1111." << endl ! << " " << pProgPath << " --create-filter=pin2con --create-filter=" << GetPluginAbout()->pName << ":\"--awak-seq=aaa\" --add-filters=0:pin2con," << GetPluginAbout()->pName << " COM1 --use-driver=tcp 111.11.11.11:1111" << endl << " - wait \"aaa\" from COM1 and then establish connection to 111.11.11.11:1111." << endl << " and disconnect on DSR OFF." << endl |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:10
|
Update of /cvsroot/com0com/hub4com/plugins/telnet In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976/plugins/telnet Modified Files: filter.cpp Log Message: Renamed option --use-port-module to --use-driver Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/filter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filter.cpp 28 Mar 2008 16:05:44 -0000 1.1 --- filter.cpp 14 Apr 2008 07:32:04 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/28 16:05:44 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/04/14 07:32:04 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.1 2008/03/28 16:05:44 vfrolov * Initial revision * */ *************** *** 163,167 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --create-filter=" << GetPluginAbout()->pName << ":\"--terminal=ANSI\" --add-filters=1:" << GetPluginAbout()->pName << " COM1 --use-port-module=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 --- 165,169 ---- << 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 |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:10
|
Update of /cvsroot/com0com/hub4com/plugins/serial In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976/plugins/serial Modified Files: port.cpp Log Message: Renamed option --use-port-module to --use-driver Index: port.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/serial/port.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** port.cpp 7 Apr 2008 12:28:03 -0000 1.3 --- port.cpp 14 Apr 2008 07:32:04 -0000 1.4 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/04/14 07:32:04 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.3 2008/04/07 12:28:03 vfrolov * Replaced --rt-events option by SET_RT_EVENTS message *************** *** 40,44 **** static PLUGIN_TYPE CALLBACK GetPluginType() { ! return PLUGIN_TYPE_PORT; } /////////////////////////////////////////////////////////////// --- 43,47 ---- static PLUGIN_TYPE CALLBACK GetPluginType() { ! return PLUGIN_TYPE_DRIVER; } /////////////////////////////////////////////////////////////// *************** *** 60,64 **** cerr << "Usage:" << endl ! << " " << pProgPath << " ... [--use-port-module=" << GetPluginAbout()->pName << "] <com port> ..." << endl << endl << "Options:" << endl --- 63,67 ---- cerr << "Usage:" << endl ! << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] <com port> ..." << endl << endl << "Options:" << endl |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:09
|
Update of /cvsroot/com0com/hub4com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976 Modified Files: hub4com.cpp plugins.cpp Log Message: Renamed option --use-port-module to --use-driver Index: plugins.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** plugins.cpp 26 Mar 2008 08:36:25 -0000 1.1 --- plugins.cpp 14 Apr 2008 07:32:03 -0000 1.2 *************** *** 20,27 **** * * $Log$ * Revision 1.1 2008/03/26 08:36:25 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/04/14 07:32:03 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.1 2008/03/26 08:36:25 vfrolov * Initial revision * */ *************** *** 111,115 **** switch (type) { case PLUGIN_TYPE_FILTER: str << "filter"; break; ! case PLUGIN_TYPE_PORT: str << "port"; break; default: str << type; } --- 113,117 ---- switch (type) { case PLUGIN_TYPE_FILTER: str << "filter"; break; ! case PLUGIN_TYPE_DRIVER: str << "driver"; break; default: str << type; } *************** *** 374,379 **** cerr << "-----------------------------" << endl; - cerr << "Type: " << type2str(iPair->first) << endl; cerr << "Name: " << (*i)->Name() << endl; cerr << "Copyright: " << (*i)->Copyright() << endl; cerr << "License: " << (*i)->License() << endl; --- 376,381 ---- cerr << "-----------------------------" << endl; cerr << "Name: " << (*i)->Name() << endl; + cerr << "Type: " << type2str(iPair->first) << endl; cerr << "Copyright: " << (*i)->Copyright() << endl; cerr << "License: " << (*i)->License() << endl; Index: hub4com.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/hub4com.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** hub4com.cpp 28 Mar 2008 15:53:48 -0000 1.9 --- hub4com.cpp 14 Apr 2008 07:32:03 -0000 1.10 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2008/04/14 07:32:03 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.9 2008/03/28 15:53:48 vfrolov * Fixed help *************** *** 93,100 **** << "Filter options:" << endl << " --create-filter=<MID>[,<FID>][:<Args>]" << endl ! << " - by using module with type 'filter' and with name" << endl ! << " <MID> create a filter with name <FID> (<FID> is" << endl ! << " <MID> by default) and put arguments <Args> (if" << endl ! << " any) to the filter." << endl << " --add-filters=<Lst>:<LstF>" << endl << " - attach the filters listed in <LstF> to the ports" << endl --- 96,102 ---- << "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 *************** *** 109,115 **** << endl << "Port options:" << endl ! << " --use-port-module=<MID> - use module with type 'port' and with name <MID> to" << endl ! << " create the following ports (<MID> is serial by" << endl ! << " default)." << endl << endl << "The syntax of <LstR>, <LstL> and <Lst> above is <P1>[,<P2>...], where <Pn> is a" << endl --- 111,116 ---- << endl << "Port options:" << endl ! << " --use-driver=<MID> - use driver module with name <MID> to create the" << endl ! << " following ports (<MID> is serial by default)." << endl << endl << "The syntax of <LstR>, <LstL> and <Lst> above is <P1>[,<P2>...], where <Pn> is a" << endl *************** *** 375,379 **** PortNumMap routeFlowControlMap; ! const char *pUsePortModule = "serial"; for (vector<string>::const_iterator i = args.begin() ; i != args.end() ; i++) { --- 376,380 ---- PortNumMap routeFlowControlMap; ! const char *pUseDriver = "serial"; for (vector<string>::const_iterator i = args.begin() ; i != args.end() ; i++) { *************** *** 385,392 **** const PORT_ROUTINES_A *pPortRoutines = ! (const PORT_ROUTINES_A *)pPlugins->GetRoutines(PLUGIN_TYPE_PORT, pUsePortModule, &hConfig); if (!pPortRoutines) { ! cerr << "No port module " << pUsePortModule << endl; exit(1); } --- 386,393 ---- const PORT_ROUTINES_A *pPortRoutines = ! (const PORT_ROUTINES_A *)pPlugins->GetRoutines(PLUGIN_TYPE_DRIVER, pUseDriver, &hConfig); if (!pPortRoutines) { ! cerr << "No driver " << pUseDriver << endl; exit(1); } *************** *** 455,460 **** AddFilters(hub, *pFilters, pParam); } else ! if ((pParam = GetParam(pArg, "use-port-module=")) != NULL) { ! pUsePortModule = pParam; } else { if (!ok) { --- 456,461 ---- AddFilters(hub, *pFilters, pParam); } else ! if ((pParam = GetParam(pArg, "use-driver=")) != NULL) { ! pUseDriver = pParam; } else { if (!ok) { |
From: Vyacheslav F. <vf...@us...> - 2008-04-14 07:32:09
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25976/plugins/tcp Modified Files: port.cpp Log Message: Renamed option --use-port-module to --use-driver Index: port.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/port.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** port.cpp 28 Mar 2008 16:01:13 -0000 1.2 --- port.cpp 14 Apr 2008 07:32:04 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/04/14 07:32:04 vfrolov + * Renamed option --use-port-module to --use-driver + * * Revision 1.2 2008/03/28 16:01:13 vfrolov * Fixed Help *************** *** 37,41 **** static PLUGIN_TYPE CALLBACK GetPluginType() { ! return PLUGIN_TYPE_PORT; } /////////////////////////////////////////////////////////////// --- 40,44 ---- static PLUGIN_TYPE CALLBACK GetPluginType() { ! return PLUGIN_TYPE_DRIVER; } /////////////////////////////////////////////////////////////// *************** *** 57,63 **** cerr << "Usage (client mode):" << endl ! << " " << pProgPath << " ... [--use-port-module=" << GetPluginAbout()->pName << "] [*]<host addr>:<host port> ..." << endl << "Usage (server mode):" << endl ! << " " << pProgPath << " ... [--use-port-module=" << GetPluginAbout()->pName << "] [*]<listen port> ..." << endl << endl << " The sign * above means that connection shold be permanent as it's possible." << endl --- 60,66 ---- cerr << "Usage (client mode):" << endl ! << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] [*]<host addr>:<host port> ..." << endl << "Usage (server mode):" << endl ! << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] [*]<listen port> ..." << endl << endl << " The sign * above means that connection shold be permanent as it's possible." << endl *************** *** 84,98 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --use-port-module=" << GetPluginAbout()->pName << " 1111 222.22.22.22:2222" << endl << " - listen TCP port 1111 and on incoming connection connect to" << endl << " 222.22.22.22:2222, receive data from 1111 and send it to" << endl << " 222.22.22.22:2222, receive data from 222.22.22.22:2222 and send it to" << endl << " 1111, on disconnecting any connection disconnect paired connection." << endl ! << " " << pProgPath << " --use-port-module=" << GetPluginAbout()->pName << " *111.11.11.11:1111 *222.22.22.22:2222" << endl << " - connect to 111.11.11.11:1111 and connect to 222.22.22.22:2222," << endl << " receive data from 111.11.11.11:1111 and send it to 222.22.22.22:2222," << endl << " receive data from 222.22.22.22:2222 and send it to 111.11.11.11:1111," << endl << " on disconnecting any connection reconnect it." << endl ! << " " << pProgPath << " --route=All:All --use-port-module=" << GetPluginAbout()->pName << " *1111 *1111 *1111" << endl << " - up to 3 clients can connect to port 2222 and talk each others." << endl ; --- 87,101 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --use-driver=" << GetPluginAbout()->pName << " 1111 222.22.22.22:2222" << endl << " - listen TCP port 1111 and on incoming connection connect to" << endl << " 222.22.22.22:2222, receive data from 1111 and send it to" << endl << " 222.22.22.22:2222, receive data from 222.22.22.22:2222 and send it to" << endl << " 1111, on disconnecting any connection disconnect paired connection." << endl ! << " " << pProgPath << " --use-driver=" << GetPluginAbout()->pName << " *111.11.11.11:1111 *222.22.22.22:2222" << endl << " - connect to 111.11.11.11:1111 and connect to 222.22.22.22:2222," << endl << " receive data from 111.11.11.11:1111 and send it to 222.22.22.22:2222," << endl << " receive data from 222.22.22.22:2222 and send it to 111.11.11.11:1111," << endl << " on disconnecting any connection reconnect it." << endl ! << " " << pProgPath << " --route=All:All --use-driver=" << GetPluginAbout()->pName << " *1111 *1111 *1111" << endl << " - up to 3 clients can connect to port 2222 and talk each others." << endl ; |
From: Vyacheslav F. <vf...@us...> - 2008-04-11 14:49:11
|
Update of /cvsroot/com0com/hub4com/plugins/pin2con In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31211/pin2con Modified Files: filter.cpp Log Message: Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK Replaced COM_ERRORS by LINE_STATUS Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/pin2con/filter.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** filter.cpp 7 Apr 2008 12:24:17 -0000 1.2 --- filter.cpp 11 Apr 2008 14:48:42 -0000 1.3 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.3 2008/04/11 14:48:42 vfrolov + * Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK + * Replaced COM_ERRORS by LINE_STATUS + * * Revision 1.2 2008/04/07 12:24:17 vfrolov * Replaced --rt-events option by SET_RT_EVENTS message *************** *** 62,67 **** DWORD pin; BOOL negative; - DWORD myEvents; - DWORD events; private: --- 66,69 ---- *************** *** 70,85 **** static struct { - DWORD val; const char *pName; ! DWORD events; } pin_names[] = { ! {MS_CTS_ON, "cts", EV_CTS}, ! {MS_DSR_ON, "dsr", EV_DSR}, ! {MS_RLSD_ON, "dcd", EV_RLSD}, ! {MS_RING_ON, "ring", EV_RING}, }; Filter::Filter(int argc, const char *const argv[]) ! : pin(MS_DSR_ON), negative(FALSE) { --- 72,87 ---- static struct { const char *pName; ! WORD val; } pin_names[] = { ! {"cts", MODEM_STATUS_CTS}, ! {"dsr", MODEM_STATUS_DSR}, ! {"dcd", MODEM_STATUS_DCD}, ! {"ring", MODEM_STATUS_RI}, ! {"break", LINE_STATUS_BI << 8}, }; Filter::Filter(int argc, const char *const argv[]) ! : pin(MODEM_STATUS_DSR), negative(FALSE) { *************** *** 99,113 **** pParam++; } ! BOOL found = FALSE; for (int i = 0 ; i < sizeof(pin_names)/sizeof(pin_names[0]) ; i++) { if (_stricmp(pParam, pin_names[i].pName) == 0) { pin = pin_names[i].val; - found = TRUE; break; } } ! if (!found) cerr << "Unknown pin " << pParam << endl; } else { --- 101,115 ---- pParam++; } ! ! pin = 0; for (int i = 0 ; i < sizeof(pin_names)/sizeof(pin_names[0]) ; i++) { if (_stricmp(pParam, pin_names[i].pName) == 0) { pin = pin_names[i].val; break; } } ! if (!pin) cerr << "Unknown pin " << pParam << endl; } else { *************** *** 115,127 **** } } - - myEvents = 0; - - for (int i = 0 ; i < sizeof(pin_names)/sizeof(pin_names[0]) ; i++) { - if ((pin & pin_names[i].val) != 0) - myEvents |= pin_names[i].events; - } - - events = myEvents; } --- 117,120 ---- *************** *** 155,159 **** "Copyright (c) 2008 Vyacheslav Frolov", "GNU General Public License", ! "Connect on pin state changing filter", }; --- 148,152 ---- "Copyright (c) 2008 Vyacheslav Frolov", "GNU General Public License", ! "Connect or disconnect on changing of line or modem state filter", }; *************** *** 170,193 **** << endl << "Options:" << endl ! << " --connect=[!]<pin> - <pin> is cts, dsr, dcd or ring (dsr by default)." << endl << endl << "IN method input data stream description:" << endl ! << " CONNECT(TRUE) - it will be discarded from stream." << endl ! << " CONNECT(FALSE) - it will be discarded from stream." << endl ! << " MODEM_STATUS(<value>) - current state of pins" << endl << endl << "IN method output data stream description:" << endl ! << " CONNECT(TRUE) - will be added on appropriate pin state changing." << endl ! << " CONNECT(FALSE) - will be added on appropriate pin state changing." << endl ! << endl ! << "IN method echo data stream description:" << endl ! << " SET_RT_EVENTS(<mask>) - will be added on CONNECT(TRUE) in input data stream." << endl ! << endl ! << "OUT method input data stream description:" << endl ! << " SET_RT_EVENTS(<mask>) - <mask> is the events mask." << endl ! << endl ! << "OUT method output data stream description:" << endl ! << " SET_RT_EVENTS(<mask>) - <mask> is the events mask with event required by this" << endl ! << " filter." << endl << endl << "Examples:" << endl --- 163,180 ---- << endl << "Options:" << endl ! << " --connect=[!]<state> - <state> is cts, dsr, dcd, ring or break (dsr by" << endl ! << " default)." << endl << endl << "IN method input data stream description:" << endl ! << " INIT_LSR_MASK(<pval>) - the value pointed by <pval> will be or'ed with the" << endl ! << " required line status mask." << endl ! << " INIT_MST_MASK(<pval>) - the value pointed by <pval> will be or'ed with the" << endl ! << " required modem status mask." << endl ! << " CONNECT(TRUE/FALSE) - will be discarded from stream." << endl ! << " LINE_STATUS(<val>) - current state of line" << endl ! << " MODEM_STATUS(<val>) - current state of modem" << endl << endl << "IN method output data stream description:" << endl ! << " CONNECT(TRUE/FALSE) - will be added on appropriate state changing." << endl << endl << "Examples:" << endl *************** *** 217,236 **** _ASSERTE(*ppEchoMsg == NULL); if (pInMsg->type == HUB_MSG_TYPE_CONNECT) { - if (pInMsg->u.val) { - *ppEchoMsg = pMsgInsertVal(NULL, - HUB_MSG_TYPE_SET_RT_EVENTS, - ((Filter *)hFilter)->events); - - if (!*ppEchoMsg) - return FALSE; - } - // discard any CONNECT messages from the input stream pMsgReplaceNone(pInMsg, HUB_MSG_TYPE_EMPTY); } else ! if (pInMsg->type == HUB_MSG_TYPE_MODEM_STATUS) { ! BOOL connect = ((pInMsg->u.val & ((Filter *)hFilter)->pin) != 0); if (((Filter *)hFilter)->negative) --- 204,231 ---- _ASSERTE(*ppEchoMsg == NULL); + if (pInMsg->type == HUB_MSG_TYPE_INIT_LSR_MASK) { + _ASSERTE(pInMsg->u.pVal != NULL); + *pInMsg->u.pVal |= (((Filter *)hFilter)->pin >> 8); + } + else + if (pInMsg->type == HUB_MSG_TYPE_INIT_MST_MASK) { + _ASSERTE(pInMsg->u.pVal != NULL); + *pInMsg->u.pVal |= (((Filter *)hFilter)->pin & 0xFF); + } + else if (pInMsg->type == HUB_MSG_TYPE_CONNECT) { // discard any CONNECT messages from the input stream pMsgReplaceNone(pInMsg, HUB_MSG_TYPE_EMPTY); } else ! if (pInMsg->type == HUB_MSG_TYPE_LINE_STATUS || ! pInMsg->type == HUB_MSG_TYPE_MODEM_STATUS) ! { ! BOOL connect; ! ! if (pInMsg->type == HUB_MSG_TYPE_LINE_STATUS) ! connect = ((pInMsg->u.val & (((Filter *)hFilter)->pin >> 8)) != 0); ! else ! connect = ((pInMsg->u.val & (((Filter *)hFilter)->pin & 0xFF)) != 0); if (((Filter *)hFilter)->negative) *************** *** 256,277 **** } /////////////////////////////////////////////////////////////// - static BOOL CALLBACK OutMethod( - HFILTER hFilter, - int /*nFromPort*/, - int /*nToPort*/, - HUB_MSG *pOutMsg) - { - _ASSERTE(hFilter != NULL); - _ASSERTE(pOutMsg != NULL); - - if (pOutMsg->type == HUB_MSG_TYPE_SET_RT_EVENTS) { - // Add event required by this filter - pOutMsg->u.val |= ((Filter *)hFilter)->myEvents; - ((Filter *)hFilter)->events = pOutMsg->u.val; - } - - return TRUE; - } - /////////////////////////////////////////////////////////////// static const FILTER_ROUTINES_A routines = { sizeof(FILTER_ROUTINES_A), --- 251,254 ---- *************** *** 285,289 **** NULL, // Init InMethod, ! OutMethod, }; --- 262,266 ---- NULL, // Init InMethod, ! NULL, // OutMethod }; |
From: Vyacheslav F. <vf...@us...> - 2008-04-11 14:49:07
|
Update of /cvsroot/com0com/hub4com/plugins In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31211 Modified Files: plugins_api.h Log Message: Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK Replaced COM_ERRORS by LINE_STATUS Index: plugins_api.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/plugins_api.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugins_api.h 7 Apr 2008 12:20:51 -0000 1.2 --- plugins_api.h 11 Apr 2008 14:48:42 -0000 1.3 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.3 2008/04/11 14:48:42 vfrolov + * Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK + * Replaced COM_ERRORS by LINE_STATUS + * * Revision 1.2 2008/04/07 12:20:51 vfrolov * Added HUB_MSG_TYPE_SET_RT_EVENTS *************** *** 40,51 **** #define HUB_MSG_UNION_TYPE_BUF 0x1000 #define HUB_MSG_UNION_TYPE_VAL 0x2000 /*******************************************************************/ ! #define HUB_MSG_TYPE_EMPTY (HUB_MSG_UNION_TYPE_NONE | 0) ! #define HUB_MSG_TYPE_LINE_DATA (HUB_MSG_UNION_TYPE_BUF | 1) ! #define HUB_MSG_TYPE_CONNECT (HUB_MSG_UNION_TYPE_VAL | 2) ! #define HUB_MSG_TYPE_MODEM_STATUS (HUB_MSG_UNION_TYPE_VAL | 3) ! #define HUB_MSG_TYPE_COM_ERRORS (HUB_MSG_UNION_TYPE_VAL | 4) ! #define HUB_MSG_TYPE_COM_FUNCTION (HUB_MSG_UNION_TYPE_VAL | 5) ! #define HUB_MSG_TYPE_SET_RT_EVENTS (HUB_MSG_UNION_TYPE_VAL | 6) /*******************************************************************/ typedef struct _HUB_MSG { --- 44,57 ---- #define HUB_MSG_UNION_TYPE_BUF 0x1000 #define HUB_MSG_UNION_TYPE_VAL 0x2000 + #define HUB_MSG_UNION_TYPE_PVAL 0x3000 /*******************************************************************/ ! #define HUB_MSG_TYPE_EMPTY (0 | HUB_MSG_UNION_TYPE_NONE) ! #define HUB_MSG_TYPE_LINE_DATA (1 | HUB_MSG_UNION_TYPE_BUF) ! #define HUB_MSG_TYPE_CONNECT (2 | HUB_MSG_UNION_TYPE_VAL) ! #define HUB_MSG_TYPE_MODEM_STATUS (3 | HUB_MSG_UNION_TYPE_VAL) ! #define HUB_MSG_TYPE_LINE_STATUS (4 | HUB_MSG_UNION_TYPE_VAL) ! #define HUB_MSG_TYPE_COM_FUNCTION (5 | HUB_MSG_UNION_TYPE_VAL) ! #define HUB_MSG_TYPE_INIT_LSR_MASK (6 | HUB_MSG_UNION_TYPE_PVAL) ! #define HUB_MSG_TYPE_INIT_MST_MASK (7 | HUB_MSG_UNION_TYPE_PVAL) /*******************************************************************/ typedef struct _HUB_MSG { *************** *** 56,59 **** --- 62,66 ---- DWORD size; } buf; + DWORD *pVal; DWORD val; } u; *************** *** 245,248 **** --- 252,273 ---- (ROUTINE_GET(pStruct, pRoutine) != NULL) /*******************************************************************/ + #define LINE_STATUS_DR 0x01 + #define LINE_STATUS_OE 0x02 + #define LINE_STATUS_PE 0x04 + #define LINE_STATUS_FE 0x08 + #define LINE_STATUS_BI 0x10 + #define LINE_STATUS_THRE 0x20 + #define LINE_STATUS_TEMT 0x40 + #define LINE_STATUS_FIFOERR 0x80 + /*******************************************************************/ + #define MODEM_STATUS_DCTS 0x01 + #define MODEM_STATUS_DDSR 0x02 + #define MODEM_STATUS_TERI 0x04 + #define MODEM_STATUS_DDCD 0x08 + #define MODEM_STATUS_CTS 0x10 + #define MODEM_STATUS_DSR 0x20 + #define MODEM_STATUS_RI 0x40 + #define MODEM_STATUS_DCD 0x80 + /*******************************************************************/ #ifdef __cplusplus |
From: Vyacheslav F. <vf...@us...> - 2008-04-11 14:49:01
|
Update of /cvsroot/com0com/hub4com/plugins/serial In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31211/serial Modified Files: comport.cpp comport.h Log Message: Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK Replaced COM_ERRORS by LINE_STATUS Index: comport.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/serial/comport.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comport.cpp 7 Apr 2008 12:28:03 -0000 1.2 --- comport.cpp 11 Apr 2008 14:48:42 -0000 1.3 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.3 2008/04/11 14:48:42 vfrolov + * Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK + * Replaced COM_ERRORS by LINE_STATUS + * * Revision 1.2 2008/04/07 12:28:03 vfrolov * Replaced --rt-events option by SET_RT_EVENTS message *************** *** 89,102 **** _ASSERTE(handle != INVALID_HANDLE_VALUE); CheckComEvents(DWORD(-1)); if (!StartRead()) return FALSE; - HUB_MSG msg; - msg.type = HUB_MSG_TYPE_CONNECT; msg.u.val = TRUE; - pOnRead(hHub, hMasterPort, &msg); --- 93,152 ---- _ASSERTE(handle != INVALID_HANDLE_VALUE); + HUB_MSG msg; + DWORD mask; + + mask = 0; + msg.type = HUB_MSG_TYPE_INIT_LSR_MASK; + msg.u.pVal = &mask; + pOnRead(hHub, hMasterPort, &msg); + maskLsr = (BYTE)mask; + + mask = 0; + msg.type = HUB_MSG_TYPE_INIT_MST_MASK; + msg.u.pVal = &mask; + pOnRead(hHub, hMasterPort, &msg); + maskMst = (BYTE)mask; + CheckComEvents(DWORD(-1)); + if (maskLsr || maskMst) { + if ((maskMst & MODEM_STATUS_CTS) != 0) + events |= EV_CTS; + + if ((maskMst & MODEM_STATUS_DSR) != 0) + events |= EV_DSR; + + if ((maskMst & MODEM_STATUS_DCD) != 0) + events |= EV_RLSD; + + if ((maskMst & MODEM_STATUS_RI) != 0) + events |= EV_RING; + + if (maskMst & ~(MODEM_STATUS_CTS|MODEM_STATUS_DSR|MODEM_STATUS_DCD|MODEM_STATUS_RI)) { + cout << "WARNING: Changing of MODEM STATUS bits 0x" << hex + << (unsigned)(maskMst & ~(MODEM_STATUS_CTS|MODEM_STATUS_DSR|MODEM_STATUS_DCD|MODEM_STATUS_RI)) + << dec << " will be ignored" << endl; + } + + if (maskLsr) { + cout << "WARNING: Changing of LINE STATUS bits 0x" << hex + << (unsigned)maskLsr + << dec << " will be ignored" << endl; + } + } + + if (events) { + if (!SetComEvents(handle, &events)) + return FALSE; + + if (!StartWaitCommEvent()) + return FALSE; + } + if (!StartRead()) return FALSE; msg.type = HUB_MSG_TYPE_CONNECT; msg.u.val = TRUE; pOnRead(hHub, hMasterPort, &msg); *************** *** 204,222 **** return FALSE; } - else - if (pMsg->type == HUB_MSG_TYPE_SET_RT_EVENTS) { - if (events != pMsg->u.val) { - if (handle == INVALID_HANDLE_VALUE) - return FALSE; - - events = pMsg->u.val; - - if (!SetComEvents(handle, &events)) - return FALSE; - - if (events && !StartWaitCommEvent()) - return FALSE; - } - } return TRUE; --- 254,257 ---- *************** *** 312,328 **** DWORD errs; ! if (!::ClearCommError(handle, &errs, NULL)) ! errs = 0; ! ! if (errs) { errors |= errs; - - HUB_MSG msg; - - msg.type = HUB_MSG_TYPE_COM_ERRORS; - msg.u.val = errs; - - pOnRead(hHub, hMasterPort, &msg); - } } } --- 347,352 ---- DWORD errs; ! if (::ClearCommError(handle, &errs, NULL)) errors |= errs; } } Index: comport.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/serial/comport.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comport.h 7 Apr 2008 12:28:03 -0000 1.2 --- comport.h 11 Apr 2008 14:48:42 -0000 1.3 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.3 2008/04/11 14:48:42 vfrolov + * Replaced SET_RT_EVENTS by INIT_LSR_MASK and INIT_MST_MASK + * Replaced COM_ERRORS by LINE_STATUS + * * Revision 1.2 2008/04/07 12:28:03 vfrolov * Replaced --rt-events option by SET_RT_EVENTS message *************** *** 83,86 **** --- 87,92 ---- BOOL filterX; DWORD events; + BYTE maskLsr; + BYTE maskMst; DWORD writeQueueLimit; |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 12:29:11
|
Update of /cvsroot/com0com/com0com/setupg In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19687 Modified Files: Form1.resx Log Message: Fixed typo Index: Form1.resx =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/Form1.resx,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Form1.resx 8 Apr 2008 06:52:12 -0000 1.3 --- Form1.resx 8 Apr 2008 12:28:52 -0000 1.4 *************** *** 837,841 **** </data> <data name="pinNameA_OPEN.ToolTip" xml:space="preserve"> ! <value>OPEN - logical ON if remote/local port is open.</value> </data> <data name=">>pinNameA_OPEN.Name" xml:space="preserve"> --- 837,841 ---- </data> <data name="pinNameA_OPEN.ToolTip" xml:space="preserve"> ! <value>OPEN - logical ON if the port is open.</value> </data> <data name=">>pinNameA_OPEN.Name" xml:space="preserve"> *************** *** 990,994 **** </data> <data name="pinNameB_OPEN.ToolTip" xml:space="preserve"> ! <value>OPEN - logical ON if remote/local port is open.</value> </data> <data name=">>pinNameB_OPEN.Name" xml:space="preserve"> --- 990,994 ---- </data> <data name="pinNameB_OPEN.ToolTip" xml:space="preserve"> ! <value>OPEN - logical ON if the port is open.</value> </data> <data name=">>pinNameB_OPEN.Name" xml:space="preserve"> |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 10:38:00
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10365 Modified Files: trace.c Log Message: Implemented ability to set individual pins with extended IOCTL_SERIAL_SET_MODEM_CONTROL and IOCTL_SERIAL_GET_MODEM_CONTROL Index: trace.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** trace.c 14 Mar 2008 15:28:39 -0000 1.29 --- trace.c 8 Apr 2008 10:37:56 -0000 1.30 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.30 2008/04/08 10:37:56 vfrolov + * Implemented ability to set individual pins with extended + * IOCTL_SERIAL_SET_MODEM_CONTROL and IOCTL_SERIAL_GET_MODEM_CONTROL + * * Revision 1.29 2008/03/14 15:28:39 vfrolov * Implemented ability to get paired port settings with *************** *** 1423,1432 **** --- 1427,1457 ---- } break; + case IOCTL_SERIAL_SET_MODEM_CONTROL: + if ((flags & TRACE_FLAG_PARAMS) && inLength >= sizeof(ULONG)) { + pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); + pDestStr = AnsiStrCopyMask(pDestStr, &size, + codeNameTableModemControl, *((PULONG)pSysBuf)); + + if (inLength > sizeof(ULONG)) { + pDestStr = AnsiStrCopyStr(pDestStr, &size, ", "); + pDestStr = AnsiStrCopyDump(pDestStr, &size, ((PUCHAR)pSysBuf) + sizeof(ULONG), inLength - sizeof(ULONG)); + } + } + break; case IOCTL_SERIAL_GET_MODEM_CONTROL: case IOCTL_SERIAL_GET_DTRRTS: + if ((flags & TRACE_FLAG_PARAMS) && inLength) { + pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); + pDestStr = AnsiStrCopyDump(pDestStr, &size, pSysBuf, inLength); + } if ((flags & TRACE_FLAG_RESULTS) && inform >= sizeof(ULONG)) { pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); pDestStr = AnsiStrCopyMask(pDestStr, &size, codeNameTableModemControl, *((PULONG)pSysBuf)); + + if (inform > sizeof(ULONG)) { + pDestStr = AnsiStrCopyStr(pDestStr, &size, ", "); + pDestStr = AnsiStrCopyDump(pDestStr, &size, ((PUCHAR)pSysBuf) + sizeof(ULONG), inform - sizeof(ULONG)); + } } break; *************** *** 1513,1521 **** break; case IOCTL_SERIAL_LSRMST_INSERT: ! if (flags & TRACE_FLAG_PARAMS) { ! pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); ! pDestStr = AnsiStrCopyDump(pDestStr, &size, pSysBuf, inLength); } ! if (flags & TRACE_FLAG_RESULTS) { pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); pDestStr = AnsiStrCopyDump(pDestStr, &size, pSysBuf, inform); --- 1538,1550 ---- break; case IOCTL_SERIAL_LSRMST_INSERT: ! if ((flags & TRACE_FLAG_PARAMS) && inLength >= sizeof(UCHAR)) { ! pDestStr = AnsiStrFormat(pDestStr, &size, " escapeChar=0x%02X", (int)(*(PUCHAR)pSysBuf & 0xFF)); ! ! if (inLength > sizeof(UCHAR)) { ! pDestStr = AnsiStrCopyStr(pDestStr, &size, ", "); ! pDestStr = AnsiStrCopyDump(pDestStr, &size, ((PUCHAR)pSysBuf) + sizeof(UCHAR), inLength - sizeof(UCHAR)); ! } } ! if ((flags & TRACE_FLAG_RESULTS) && inform) { pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); pDestStr = AnsiStrCopyDump(pDestStr, &size, pSysBuf, inform); |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 10:36:22
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9944 Modified Files: ioctl.c Log Message: Implemented ability to set individual pins with extended IOCTL_SERIAL_SET_MODEM_CONTROL and IOCTL_SERIAL_GET_MODEM_CONTROL Index: ioctl.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/ioctl.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** ioctl.c 14 Mar 2008 15:28:39 -0000 1.34 --- ioctl.c 8 Apr 2008 10:36:16 -0000 1.35 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.35 2008/04/08 10:36:16 vfrolov + * Implemented ability to set individual pins with extended + * IOCTL_SERIAL_SET_MODEM_CONTROL and IOCTL_SERIAL_GET_MODEM_CONTROL + * * Revision 1.34 2008/03/14 15:28:39 vfrolov * Implemented ability to get paired port settings with *************** *** 227,244 **** case IOCTL_SERIAL_SET_MODEM_CONTROL: { LIST_ENTRY queueToComplete; ! if (pIrpStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(ULONG)) { status = STATUS_BUFFER_TOO_SMALL; break; } InitializeListHead(&queueToComplete); KeAcquireSpinLock(pIoPortLocal->pIoLock, &oldIrql); ! SetModemControl( ! pIoPortLocal, ! (UCHAR)*(PULONG)pIrp->AssociatedIrp.SystemBuffer, ! (UCHAR)C0C_MCR_MASK, ! &queueToComplete); if (pIoPortLocal->pIoPortRemote->tryWrite || pIoPortLocal->tryWrite) { --- 231,260 ---- case IOCTL_SERIAL_SET_MODEM_CONTROL: { LIST_ENTRY queueToComplete; + UCHAR mask; + PUCHAR pSysBuf; + ULONG InputBufferLength; ! InputBufferLength = pIrpStack->Parameters.DeviceIoControl.InputBufferLength; ! ! if (InputBufferLength < sizeof(ULONG)) { status = STATUS_BUFFER_TOO_SMALL; break; } + pSysBuf = (PUCHAR)pIrp->AssociatedIrp.SystemBuffer; + + if (InputBufferLength >= (sizeof(ULONG) + sizeof(ULONG) + C0CE_SIGNATURE_SIZE) && + RtlEqualMemory(pSysBuf + sizeof(ULONG) + sizeof(ULONG), C0CE_SIGNATURE, C0CE_SIGNATURE_SIZE)) + { + mask = C0C_MCR_MASK & (UCHAR)*((PULONG)pSysBuf + 1); + } else { + mask = C0C_MCR_MASK; + } + InitializeListHead(&queueToComplete); + KeAcquireSpinLock(pIoPortLocal->pIoLock, &oldIrql); ! SetModemControl(pIoPortLocal, (UCHAR)*(PULONG)pSysBuf, mask, &queueToComplete); if (pIoPortLocal->pIoPortRemote->tryWrite || pIoPortLocal->tryWrite) { *************** *** 256,261 **** case IOCTL_SERIAL_GET_DTRRTS: { ULONG modemControl; ! if (pIrpStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(ULONG)) { status = STATUS_BUFFER_TOO_SMALL; break; --- 272,281 ---- case IOCTL_SERIAL_GET_DTRRTS: { ULONG modemControl; + PUCHAR pSysBuf; + ULONG OutputBufferLength; ! OutputBufferLength = pIrpStack->Parameters.DeviceIoControl.OutputBufferLength; ! ! if (OutputBufferLength < sizeof(ULONG)) { status = STATUS_BUFFER_TOO_SMALL; break; *************** *** 263,274 **** KeAcquireSpinLock(pIoPortLocal->pIoLock, &oldIrql); ! modemControl = pIoPortLocal->modemControl & C0C_MCR_MASK; KeReleaseSpinLock(pIoPortLocal->pIoLock, oldIrql); ! if (code == IOCTL_SERIAL_GET_DTRRTS) modemControl &= SERIAL_DTR_STATE | SERIAL_RTS_STATE; ! *(PULONG)pIrp->AssociatedIrp.SystemBuffer = modemControl; ! pIrp->IoStatus.Information = sizeof(ULONG); TraceIrp("FdoPortIoCtl", pIrp, &status, TRACE_FLAG_RESULTS); --- 283,318 ---- KeAcquireSpinLock(pIoPortLocal->pIoLock, &oldIrql); ! modemControl = pIoPortLocal->modemControl; KeReleaseSpinLock(pIoPortLocal->pIoLock, oldIrql); ! pSysBuf = (PUCHAR)pIrp->AssociatedIrp.SystemBuffer; ! ! if (code == IOCTL_SERIAL_GET_DTRRTS) { modemControl &= SERIAL_DTR_STATE | SERIAL_RTS_STATE; + } else { + ULONG InputBufferLength; ! InputBufferLength = pIrpStack->Parameters.DeviceIoControl.InputBufferLength; ! ! if (OutputBufferLength >= (sizeof(ULONG) + C0CE_SIGNATURE_SIZE) && ! InputBufferLength >= C0CE_SIGNATURE_SIZE && ! RtlEqualMemory(pSysBuf, C0CE_SIGNATURE, C0CE_SIGNATURE_SIZE)) ! { ! RtlCopyMemory(pSysBuf + sizeof(PULONG), C0CE_SIGNATURE, C0CE_SIGNATURE_SIZE); ! ! if (OutputBufferLength > (sizeof(ULONG) + C0CE_SIGNATURE_SIZE)) { ! RtlZeroMemory(pSysBuf + sizeof(ULONG) + C0CE_SIGNATURE_SIZE, ! OutputBufferLength - (sizeof(ULONG) + C0CE_SIGNATURE_SIZE)); ! } ! ! pIrp->IoStatus.Information = OutputBufferLength; ! } else { ! pIrp->IoStatus.Information = sizeof(ULONG); ! } ! ! modemControl &= C0C_MCR_MASK; ! } ! ! *(PULONG)pSysBuf = modemControl; TraceIrp("FdoPortIoCtl", pIrp, &status, TRACE_FLAG_RESULTS); |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 10:30:38
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7617 Modified Files: openclos.c Log Message: Fixed modem control setting on close Index: openclos.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/openclos.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** openclos.c 14 Mar 2008 15:28:39 -0000 1.21 --- openclos.c 8 Apr 2008 10:30:35 -0000 1.22 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.22 2008/04/08 10:30:35 vfrolov + * Fixed modem control setting on close + * * Revision 1.21 2008/03/14 15:28:39 vfrolov * Implemented ability to get paired port settings with *************** *** 230,234 **** pIoPort->writeHoldingRemote = 0; pIoPort->sendXonXoff = 0; ! SetModemControl(pIoPort, 0, C0C_MCR_RTS | C0C_MCR_DTR | C0C_MCR_OPEN, &queueToComplete); FreeBuffer(&pIoPort->readBuf); SetBreakHolding(pIoPort, FALSE); --- 233,237 ---- pIoPort->writeHoldingRemote = 0; pIoPort->sendXonXoff = 0; ! SetModemControl(pIoPort, C0C_MCR_OUT2, C0C_MCR_MASK | C0C_MCR_OPEN, &queueToComplete); FreeBuffer(&pIoPort->readBuf); SetBreakHolding(pIoPort, FALSE); |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 10:27:50
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6450 Modified Files: com0com.h Log Message: Fixed C0C_MCR_MASK Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/com0com.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** com0com.h 8 Apr 2008 06:47:37 -0000 1.41 --- com0com.h 8 Apr 2008 10:27:44 -0000 1.42 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.42 2008/04/08 10:27:44 vfrolov + * Fixed C0C_MCR_MASK + * * Revision 1.41 2008/04/08 06:47:37 vfrolov * Added pin OUT2 *************** *** 319,323 **** #define C0C_MCR_LOOP 0x10 #define C0C_MCR_OPEN 0x80 ! #define C0C_MCR_MASK (~(C0C_MCR_OPEN)) UCHAR modemControl; --- 322,326 ---- #define C0C_MCR_LOOP 0x10 #define C0C_MCR_OPEN 0x80 ! #define C0C_MCR_MASK ((UCHAR)~(C0C_MCR_OPEN)) UCHAR modemControl; |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 06:52:15
|
Update of /cvsroot/com0com/com0com/setupg In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23475 Modified Files: Form1.h Form1.resx pinmap.cpp Log Message: Added pin OUT2 Index: pinmap.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/pinmap.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pinmap.cpp 31 Oct 2007 10:16:55 -0000 1.1 --- pinmap.cpp 8 Apr 2008 06:52:12 -0000 1.2 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2007-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,27 **** * * $Log$ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * - * */ --- 20,29 ---- * * $Log$ + * Revision 1.2 2008/04/08 06:52:12 vfrolov + * Added pin OUT2 + * * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * */ *************** *** 79,85 **** using namespace System::Collections::Generic; ! #define NUM_LINES 10 #define NUM_MIDDLE_SRCS 1 ! #define MAX_DIFF 6 #define UL 0 --- 81,87 ---- using namespace System::Collections::Generic; ! #define NUM_LINES 11 #define NUM_MIDDLE_SRCS 1 ! #define MAX_DIFF 7 #define UL 0 *************** *** 91,95 **** #define MC (NUM_COLUMS/2) ! #define PIN_SIZE 8 #define INVERT_SIZE 14 --- 93,97 ---- #define MC (NUM_COLUMS/2) ! #define PIN_SIZE 9 #define INVERT_SIZE 14 *************** *** 115,118 **** --- 117,121 ---- pins["RI(A)"] = gcnew Pin(C, L++, false, 0); pins["OUT1(A)"] = gcnew Pin(C, L++, false, IC++); + pins["OUT2(A)"] = gcnew Pin(C, L++, false, IC++); pins["OPEN(A)"] = gcnew Pin(C, L++, false, IC++); *************** *** 129,132 **** --- 132,136 ---- pins["RI(B)"] = gcnew Pin(C, L++, false, 0); pins["OUT1(B)"] = gcnew Pin(C, L++, false, IC++); + pins["OUT2(B)"] = gcnew Pin(C, L++, false, IC++); pins["OPEN(B)"] = gcnew Pin(C, L++, false, IC++); Index: Form1.h =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/Form1.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Form1.h 20 Nov 2007 12:29:40 -0000 1.2 --- Form1.h 8 Apr 2008 06:52:12 -0000 1.3 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2007-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2008/04/08 06:52:12 vfrolov + * Added pin OUT2 + * * Revision 1.2 2007/11/20 12:29:40 vfrolov * Fixed appearance for Vista *************** *** 26,30 **** * Initial revision * - * */ --- 29,32 ---- *************** *** 100,106 **** --- 102,110 ---- private: System::Windows::Forms::Label^ pinNameA_RI; private: System::Windows::Forms::Label^ pinNameA_OUT1; + private: System::Windows::Forms::Label^ pinNameA_OUT2; private: System::Windows::Forms::Label^ pinNameA_OPEN; private: System::Windows::Forms::Label^ pinNameB_OPEN; private: System::Windows::Forms::Label^ pinNameB_OUT1; + private: System::Windows::Forms::Label^ pinNameB_OUT2; private: System::Windows::Forms::Label^ pinNameB_RI; private: System::Windows::Forms::Label^ pinNameB_CTS; *************** *** 150,153 **** --- 154,158 ---- this->pinNameA_RI = (gcnew System::Windows::Forms::Label()); this->pinNameA_OUT1 = (gcnew System::Windows::Forms::Label()); + this->pinNameA_OUT2 = (gcnew System::Windows::Forms::Label()); this->pinNameA_OPEN = (gcnew System::Windows::Forms::Label()); this->pairList = (gcnew System::Windows::Forms::TreeView()); *************** *** 158,161 **** --- 163,167 ---- this->pinNameB_OPEN = (gcnew System::Windows::Forms::Label()); this->pinNameB_OUT1 = (gcnew System::Windows::Forms::Label()); + this->pinNameB_OUT2 = (gcnew System::Windows::Forms::Label()); this->pinNameB_RI = (gcnew System::Windows::Forms::Label()); this->pinNameB_CTS = (gcnew System::Windows::Forms::Label()); *************** *** 323,326 **** --- 329,338 ---- this->toolTip1->SetToolTip(this->pinNameA_OUT1, resources->GetString(L"pinNameA_OUT1.ToolTip")); // + // pinNameA_OUT2 + // + resources->ApplyResources(this->pinNameA_OUT2, L"pinNameA_OUT2"); + this->pinNameA_OUT2->Name = L"pinNameA_OUT2"; + this->toolTip1->SetToolTip(this->pinNameA_OUT2, resources->GetString(L"pinNameA_OUT2.ToolTip")); + // // pinNameA_OPEN // *************** *** 377,380 **** --- 389,398 ---- this->toolTip1->SetToolTip(this->pinNameB_OUT1, resources->GetString(L"pinNameB_OUT1.ToolTip")); // + // pinNameB_OUT2 + // + resources->ApplyResources(this->pinNameB_OUT2, L"pinNameB_OUT2"); + this->pinNameB_OUT2->Name = L"pinNameB_OUT2"; + this->toolTip1->SetToolTip(this->pinNameB_OUT2, resources->GetString(L"pinNameB_OUT2.ToolTip")); + // // pinNameB_RI // *************** *** 431,434 **** --- 449,453 ---- this->Controls->Add(this->pinNameB_OPEN); this->Controls->Add(this->pinNameB_OUT1); + this->Controls->Add(this->pinNameB_OUT2); this->Controls->Add(this->pinNameB_RI); this->Controls->Add(this->pinNameB_CTS); *************** *** 441,444 **** --- 460,464 ---- this->Controls->Add(this->pinNameA_OPEN); this->Controls->Add(this->pinNameA_OUT1); + this->Controls->Add(this->pinNameA_OUT2); this->Controls->Add(this->pinNameA_RI); this->Controls->Add(this->pinNameA_CTS); Index: Form1.resx =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/Form1.resx,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Form1.resx 20 Nov 2007 12:29:40 -0000 1.2 --- Form1.resx 8 Apr 2008 06:52:12 -0000 1.3 *************** *** 182,186 **** </data> <data name="pinNameON.Location" type="System.Drawing.Point, System.Drawing"> ! <value>282, 317</value> </data> <data name="pinNameON.Size" type="System.Drawing.Size, System.Drawing"> --- 182,186 ---- </data> <data name="pinNameON.Location" type="System.Drawing.Point, System.Drawing"> ! <value>282, 337</value> </data> <data name="pinNameON.Size" type="System.Drawing.Size, System.Drawing"> *************** *** 218,222 **** </data> <data name="picturePinMap.Size" type="System.Drawing.Size, System.Drawing"> ! <value>250, 200</value> </data> <data name="picturePinMap.TabIndex" type="System.Int32, mscorlib"> --- 218,222 ---- </data> <data name="picturePinMap.Size" type="System.Drawing.Size, System.Drawing"> ! <value>250, 220</value> </data> <data name="picturePinMap.TabIndex" type="System.Int32, mscorlib"> *************** *** 785,793 **** <value>11</value> </data> <data name="pinNameA_OPEN.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <value>NoControl</value> </data> <data name="pinNameA_OPEN.Location" type="System.Drawing.Point, System.Drawing"> ! <value>232, 296</value> </data> <data name="pinNameA_OPEN.Size" type="System.Drawing.Size, System.Drawing"> --- 785,826 ---- <value>11</value> </data> + <data name="pinNameA_OUT2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> + <value>NoControl</value> + </data> + <data name="pinNameA_OUT2.Location" type="System.Drawing.Point, System.Drawing"> + <value>232, 296</value> + </data> + <data name="pinNameA_OUT2.Size" type="System.Drawing.Size, System.Drawing"> + <value>50, 20</value> + </data> + <data name="pinNameA_OUT2.TabIndex" type="System.Int32, mscorlib"> + <value>44</value> + </data> + <data name="pinNameA_OUT2.Text" xml:space="preserve"> + <value>OUT2</value> + </data> + <data name="pinNameA_OUT2.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> + <value>MiddleRight</value> + </data> + <data name="pinNameA_OUT2.ToolTip" xml:space="preserve"> + <value>OUT2 - auxiliary output 2.</value> + </data> + <data name=">>pinNameA_OUT2.Name" xml:space="preserve"> + <value>pinNameA_OUT2</value> + </data> + <data name=">>pinNameA_OUT2.Type" xml:space="preserve"> + <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>pinNameA_OUT2.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>pinNameA_OUT2.ZOrder" xml:space="preserve"> + <value>11</value> + </data> <data name="pinNameA_OPEN.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <value>NoControl</value> </data> <data name="pinNameA_OPEN.Location" type="System.Drawing.Point, System.Drawing"> ! <value>232, 316</value> </data> <data name="pinNameA_OPEN.Size" type="System.Drawing.Size, System.Drawing"> *************** *** 942,946 **** </data> <data name="pinNameB_OPEN.Location" type="System.Drawing.Point, System.Drawing"> ! <value>532, 296</value> </data> <data name="pinNameB_OPEN.Size" type="System.Drawing.Size, System.Drawing"> --- 975,979 ---- </data> <data name="pinNameB_OPEN.Location" type="System.Drawing.Point, System.Drawing"> ! <value>532, 316</value> </data> <data name="pinNameB_OPEN.Size" type="System.Drawing.Size, System.Drawing"> *************** *** 1004,1007 **** --- 1037,1073 ---- <value>1</value> </data> + <data name="pinNameB_OUT2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> + <value>NoControl</value> + </data> + <data name="pinNameB_OUT2.Location" type="System.Drawing.Point, System.Drawing"> + <value>532, 296</value> + </data> + <data name="pinNameB_OUT2.Size" type="System.Drawing.Size, System.Drawing"> + <value>50, 20</value> + </data> + <data name="pinNameB_OUT2.TabIndex" type="System.Int32, mscorlib"> + <value>54</value> + </data> + <data name="pinNameB_OUT2.Text" xml:space="preserve"> + <value>OUT2</value> + </data> + <data name="pinNameB_OUT2.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> + <value>MiddleLeft</value> + </data> + <data name="pinNameB_OUT2.ToolTip" xml:space="preserve"> + <value>OUT2 - auxiliary output 2.</value> + </data> + <data name=">>pinNameB_OUT2.Name" xml:space="preserve"> + <value>pinNameB_OUT2</value> + </data> + <data name=">>pinNameB_OUT2.Type" xml:space="preserve"> + <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>pinNameB_OUT2.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>pinNameB_OUT2.ZOrder" xml:space="preserve"> + <value>1</value> + </data> <data name="pinNameB_RI.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <value>NoControl</value> |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 06:49:47
|
Update of /cvsroot/com0com/com0com/setup In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22317 Modified Files: params.cpp Log Message: Added pin OUT2 Index: params.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/params.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** params.cpp 19 Oct 2007 16:09:55 -0000 1.9 --- params.cpp 8 Apr 2008 06:49:44 -0000 1.10 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2008/04/08 06:49:44 vfrolov + * Added pin OUT2 + * * Revision 1.9 2007/10/19 16:09:55 vfrolov * Implemented --detail-prms option *************** *** 267,270 **** --- 270,277 ---- } else + if (!lstrcmpi(pNewVal, "rout2")) { + newPin |= C0C_PIN_ROUT2; + } + else if (!lstrcmpi(pNewVal, "ropen")) { newPin |= C0C_PIN_ROPEN; *************** *** 283,286 **** --- 290,297 ---- } else + if (!lstrcmpi(pNewVal, "lout2")) { + newPin |= C0C_PIN_LOUT2; + } + else if (!lstrcmpi(pNewVal, "lopen")) { newPin |= C0C_PIN_LOPEN; *************** *** 677,684 **** --- 688,697 ---- case C0C_PIN_RDTR: pVal = "rdtr"; break; case C0C_PIN_ROUT1: pVal = "rout1"; break; + case C0C_PIN_ROUT2: pVal = "rout2"; break; case C0C_PIN_ROPEN: pVal = "ropen"; break; case C0C_PIN_LRTS: pVal = "lrts"; break; case C0C_PIN_LDTR: pVal = "ldtr"; break; case C0C_PIN_LOUT1: pVal = "lout1"; break; + case C0C_PIN_LOUT2: pVal = "lout2"; break; case C0C_PIN_LOPEN: pVal = "lopen"; break; case C0C_PIN_ON: pVal = "on"; break; *************** *** 735,742 **** " ri=[!]<p> - wire RI pin to <p> (!on by default)\n" "\n" ! "The possible values of <p> above can be rrts, lrts, rdtr, ldtr, rout1, lout1\n" ! "(remote/local RTS/DTR/OUT1), ropen, lopen (logical ON if remote/local port is\n" ! "open) or on (logical ON). The exclamation sign (!) can be used to invert the\n" ! "value.\n" "\n" "Special values:\n" --- 748,755 ---- " ri=[!]<p> - wire RI pin to <p> (!on by default)\n" "\n" ! "The possible values of <p> above can be rrts, lrts, rdtr, ldtr, rout1, lout1,\n" ! "rout2, lout2 (remote/local RTS/DTR/OUT1/OUT2), ropen, lopen (logical ON if\n" ! "remote/local port is open) or on (logical ON). The exclamation sign (!) can be\n" ! "used to invert the value.\n" "\n" "Special values:\n" |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 06:47:41
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21563 Modified Files: com0com.h pinouts.c Log Message: Added pin OUT2 Index: pinouts.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/pinouts.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pinouts.c 19 Oct 2007 16:03:41 -0000 1.3 --- pinouts.c 8 Apr 2008 06:47:37 -0000 1.4 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2007-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.4 2008/04/08 06:47:37 vfrolov + * Added pin OUT2 + * * Revision 1.3 2007/10/19 16:03:41 vfrolov * Added default values *************** *** 29,33 **** * Implemented pinout customization * - * */ --- 32,35 ---- *************** *** 83,86 **** --- 85,89 ---- SET_PIN_OUTS(DTR); SET_PIN_OUTS(OUT1); + SET_PIN_OUTS(OUT2); SET_PIN_OUTS(OPEN); *************** *** 143,146 **** --- 146,150 ---- CASE_PIN(DTR) CASE_PIN(OUT1) + CASE_PIN(OUT2) CASE_PIN(OPEN) Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/com0com.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** com0com.h 14 Mar 2008 15:28:39 -0000 1.40 --- com0com.h 8 Apr 2008 06:47:37 -0000 1.41 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.41 2008/04/08 06:47:37 vfrolov + * Added pin OUT2 + * * Revision 1.40 2008/03/14 15:28:39 vfrolov * Implemented ability to get paired port settings with *************** *** 286,292 **** #define C0C_PIN_OUTS_DTR 1 #define C0C_PIN_OUTS_OUT1 2 ! #define C0C_PIN_OUTS_OPEN 3 ! C0C_PIN_OUTS pinOuts[4]; SERIAL_HANDFLOW handFlow; --- 289,296 ---- #define C0C_PIN_OUTS_DTR 1 #define C0C_PIN_OUTS_OUT1 2 ! #define C0C_PIN_OUTS_OUT2 3 ! #define C0C_PIN_OUTS_OPEN 4 ! C0C_PIN_OUTS pinOuts[5]; SERIAL_HANDFLOW handFlow; |
From: Vyacheslav F. <vf...@us...> - 2008-04-08 06:44:44
|
Update of /cvsroot/com0com/com0com/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20421 Modified Files: com0com.h Log Message: Added pin OUT2 Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/include/com0com.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** com0com.h 19 Oct 2007 15:58:18 -0000 1.6 --- com0com.h 8 Apr 2008 06:44:35 -0000 1.7 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.7 2008/04/08 06:44:35 vfrolov + * Added pin OUT2 + * * Revision 1.6 2007/10/19 15:58:18 vfrolov * Added default values *************** *** 60,67 **** --- 63,72 ---- #define C0C_PIN_RDTR 0x00000002 #define C0C_PIN_ROUT1 0x00000004 + #define C0C_PIN_ROUT2 0x00000008 #define C0C_PIN_ROPEN 0x00000080 #define C0C_PIN_LRTS 0x00000100 #define C0C_PIN_LDTR 0x00000200 #define C0C_PIN_LOUT1 0x00000400 + #define C0C_PIN_LOUT2 0x00000800 #define C0C_PIN_LOPEN 0x00008000 #define C0C_PIN_ON 0x10000000 |