/// @{ Summary
///    BamelgForwarder is lightweight windows service used as relay for bidirectional data transfer between sockets, serial ports and pipes.
///    Unlike similar solutions it uses modern event-driven architecture and accomplish all IO tasks within single thread.
/// @}

/// @{ Usage examples
///    REM Run as application
///    BamelgForwarder
///
///    REM Use provided batch files to install and run BamelgForwarder as Windows service
/// @}

/// @{ Downloads
///    Executable and source
/// @}
	
/// @{ Config examples
; Serial port endpoint. Default serial settings (DCB) comes from Device Manager
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\device]
@="SerialPort"
"SerialPortPath"="\\\\.\\COM6"

#"SerialPortReadIntervalTimeout"=dword:0000000a  
; Default is 10. See http://msdn.microsoft.com/ru-ru/library/windows/desktop/aa363190(v=vs.85).aspx

#"SerialPortBaudRate"=dword:00004B00             
; Default value comes from Device Manager

#"SerialPortParity"="NOPARITY"     
; NOPARITY / ODDPARITY / EVENPARITY / MARKPARITY / SPACEPARITY
              
#"SerialPortStopBits"="ONESTOPBIT"               
; ONESTOPBIT / ONE5STOPBITS / TWOSTOPBITS
; TCPv4-client endpoint
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\device]
@="TCPv4"

"TCPv4Endpoint"="127.0.0.1:2346"
; Connect to 127.0.0.1:2346
; TCPv4-server endpoint
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\server]
@="TCPv4Server"

"TCPv4ServerEndpoint"="127.0.0.1:2346"
; Listen and wait single client on "127.0.0.1:2346"
; TCPv6-client endpoint
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\device]
@="TCPv6"

"TCPv6Endpoint"="[::1]:2346"
; Connect to [::1]:2346
	
; TCPv6-server endpoint
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\server]
@="TCPv6Server"

"TCPv6ServerEndpoint"="[::1]:2345"
; Listen and wait single client on "[::1]:2345"
	
; NamedPipe client endpoint
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\device]
@="NamedPipe"

"NamedPipePath"="\\\\.\\pipe\\BamelgHttpServer"
; Connect to \\.\pipe\BamelgHttpServer
	
; NamedPipe server endpoint
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Eugeny Grishul\BamelgForwarder\sensor\device]
@="NamedPipeServer"

"NamedPipeServerPath"="\\\\.\\pipe\\RelayPipe"
; Listen on \\.\pipe\RelayPipe
	

/// @}