REQUIREMENT client.c.windowsCE |
Type | NEW |
Priority | HIGH |
Status | CLOSED |
Topic | Windows CE based xmlBlaster clients (C, C++, C#). | ||||||||||||||||||||||||||||||
Des cription |
The C client library supports the Windows CE environment. This setup is tested for Windows CE 4.2 (Windows Pocket PC 2003) target on a ARMV5 processor (compatible to ARMV4). and a Windows Mobile CE 5.2 target with a ARMV8 processor.
Unmanaged code access (C,C++) To compile the xmlBlasterClientC DLL use the -DWINCE command line setting. The outcome is xmlBlasterClientC-Arm4.dll, pthreads270-Arm4.dll and zlib123-Arm4.dll. You are now ready to use any C or C++ code to link against the dll. Managed code access (C#) There exists a P/Invoke wrapper around the above C dll which allows you to develop in the managed .net world. When compiled the default target chosen is Win32 .net 2.x, this works fine for example on Windows XP or Windows 2003. Please use the following preprocessor defines:
Example compilation on a Windows platform (Win32 or CE compact framework .net 2.x) cd xmlBlaster\src\csharp csc /unsafe -debug+ -out:TestPInvoke.exe PInvokeCE.cs XmlBlasterAccess.cs TestPInvoke.cs Note: The xmlBlasterClientC.dll library is assumed to be in the same directory as the executable or available over the PATH setting. You can however force any fixed path by editing PInvokeCE.cs and recompile (search for the "xmlBlasterClientC" string). Example compilation on a Linux platform (mono 1.2) cd xmlBlaster\src\csharp mcs /d:XMLBLASTER_MONO -debug+ -out:Hello.exe NativeC.cs XmlBlasterAccess.cs Hello.cs Managed C++ wrapper (C++,VB.net,C#) There is a first - not finished - prototype of a managed C++ code.
Note that managed C++ is NOT supported on CE compact framework .net, it
is only supported on normal desktop .NET environments.
Probably this approach is dropped again as the above C# approach covers
all and can act as a gateway for other .net languages. |
||||||||||||||||||||||||||||||
Example C |
Example for a Windows XP setup Here is an example how to setup the development environment for free on Windows, using our ant build to compile. See Visual Studio 2005 versus embedded VC++ 4.
Use the zlib 1.2.3 - http://www.zlib.net/ - and compile yourself for Windows CE.
Set /DZLIB_DLL (and /D_WIN32_WCE if not defined yet) and switch off pre-compiled headers
(exclude gzio.c and example.c). To have single threaded xmlBlaster access (to publish(), get(), but no update()) please set the compiler define XB_NO_PTHREADS=1. Like this you avoid to install pthreads.
To have full multi threaded access with xmlBlaster callbacks please
link against the pthreads-win32 2.7.0 library from http://sources.redhat.com/pthreads-win32/. |
||||||||||||||||||||||||||||||
Example C |
Example for a Linux development setup Here is an example how to setup the development environment for free on Linux.
|
||||||||||||||||||||||||||||||
Example Csharp |
Accessing xmlBlaster from C# We provide a wrapper around our Windows CE xmlBlaster client library called xmlBlaster/src/csharp/PInvokeCE.cs. It wraps the xmlBlasterClientC-Arm4.dll (and pthreads270-Arm4.dll, zlib123-Arm4.dll). Like this any C# code can access xmlBlaster with compression support, multithreaded and with tunneled callbacks. A demo client to get you started is xmlBlaster/src/csharp/TestPInvoke.cs. You need to compile the three dlls yourself or download them at http://www.xmlblaster.org/xmlBlaster-win-dll-1.4-15829M.zip. Then create a VC++ 8.0 project for Smartphone or PocketPC or Windows Mobile and compile Hello.cs, TestPInvoke.cs or your own client. |
||||||||||||||||||||||||||||||
Example C |
Example message delivery The following screenshot shows the connection properties (jconsole server side) from a Psion Workabout Pro running Windows CE 4.2 with a Intel XScale StrongARM 400 MHz processor.
It is connected over WLAN to a Linux box on which the xmlBlaster server is running.
The test finished with one million messages send to the PDA without any problems.
|
||||||||||||||||||||||||||||||
Configure |
These configurations are tested:
NOTE: Configuration parameters are specified on command line (-someValue 17) or in the
xmlBlaster.properties file (someValue=17). See requirement "util.property" for details. |
||||||||||||||||||||||||||||||
Todo |
|
||||||||||||||||||||||||||||||
See CODE | HelloWorld.c | ||||||||||||||||||||||||||||||
See CODE | XmlBlasterAccessUnparsed.h | ||||||||||||||||||||||||||||||
See | http://sources.redhat.com/pthreads-win32/ | ||||||||||||||||||||||||||||||
See | http://www.gzip.org/zlib/ | ||||||||||||||||||||||||||||||
See REQ | client.c.socket | ||||||||||||||||||||||||||||||
See REQ | protocol.socket | ||||||||||||||||||||||||||||||
See REQ | client.c.queue | ||||||||||||||||||||||||||||||
See REQ | client.csharp | ||||||||||||||||||||||||||||||
See REQ | interface | ||||||||||||||||||||||||||||||
See TEST | TestMethods |
This page is generated from the requirement XML file xmlBlaster/doc/requirements/client.c.windowsCE.xml