Wednesday, August 10, 2011

TAXI Framework documentation

TAXI Framework documentation

Welcome to the Taxi documentation website ! Here you will find a variety of resources to learn about what is Taxi is all about, how it works, and more importantly, how you can use it to change the world !

TAXI is a software developped at the IMARA Lab from INRIA. It is used as plateform for our automated vehicles, the CyberCars (http://www.lara.prd.fr/). It targets both engineers who want to prepare demos, test new hardware, check if the vehicles are operational, etc., and researchers who want a quick way to implement and test new algorithms, designs, solutions.

TAXI provides an abstraction to access sensors and actuators.
TAXI implements communication tools like Zeroconf or XML-RPC for vehicle collaboration and remote control.
TAXI allows finally to build demonstration by wrapping together various algorithms.

http://lara.inria.fr/doc/taxi/

Wednesday, August 3, 2011

WaitForSingleObject_example.cpp

//#include "stdafx.h"
//#include

//#include

int _tmain(int argc, _TCHAR* argv[])
{

DWORD ThreadID, dwRet;

HANDLE hTh;
// Creates a thread to execute within the virtual address space of the calling process
hTh=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ThreadMain,(LPVOID)10,0,&ThreadID);
if(hTh==NULL)
{
wprintf(L"CreateThread() failed, error %u\n", GetLastError());
return 1;
}
else
wprintf(L"CreateThread() is OK, thread ID %u\n", ThreadID);
// Blocks/wait till thread terminates
// Waits until the specified object is in the signaled state or
// the time-out interval elapses.
// The INFINITE parameter make the function return only when the object is signaled
wprintf(L"Waiting the child thread terminates/signaled...\n");
dwRet = WaitForSingleObject(hTh,INFINITE);
wprintf(L"WaitForSingleObject() returns value is 0X%.8X\n", dwRet);

switch(dwRet)
{
case WAIT_ABANDONED:
wprintf(L"Mutex object was not released by the thread that\n" L"owned the mutex object before the owning thread terminates...\n");
break;
case WAIT_OBJECT_0:
wprintf(L"The child thread state was signaled!\n");
break;
case WAIT_TIMEOUT:
wprintf(L"Time-out interval elapsed, and the child thread's state is nonsignaled.\n");
break;
case WAIT_FAILED:
wprintf(L"WaitForSingleObject() failed, error %u\n", GetLastError());
ExitProcess(0);
}

if(CloseHandle(hTh) != 0)
wprintf(L"hTh's child thread handle was closed successfully!\n");
else
wprintf(L"Failed to close hTh child thread handle, error %u\n", GetLastError());

wprintf(L"Main process & thread ready to exit...\n");

return 0;

}

The WaitForSingleObject() Example

Create a new empty Win32 console application project. Give a suitable project name and change the project location if needed.

Then, add the source file and give it a suitable name.



Project file created:

The following source codes to add and build:

#include "stdafx.h"
#include

#include

// Thread counts till PassVal

void ThreadMain(LONG PassVal)
{
LONG i;
for(i=0;iApplication testing:



How can i install winxp in Compaq Presario CQ62 ?

You change the bootdisk in the BIOS to the cd. Then boot from the XP CD. And press a key when it tells you to. However, this will wipe Windows 7. So, if you want anything copy everything you want (except programs), before you format the hard drive.

Also, NOTE: XP doesnt have drivers for most of whats on the system (LAN/Sound/Card reader etc). So, if this is the only computer you've got, go to the HP site search for this laptop, download the drivers and copy them to something. Before you start. Or you wont get back on the internet..

Also NOTE: If the hard drive in this is SATA, you'll have to disable AHCI in the BIOS (change it to IDE mode). Or XP will crash before you get to the setup screen. Unless you download the SATA drivers, unzip/extract them and add them when it says to press F6 (on a floppy).

The XP CD doesn't have SATA drivers on it either. If you dont add the SATA drivers during the install, DON'T change it back to AHCI after you install XP. Or it'll crash

Also, make sure you've got an XP key. A windows 7 key wont work

download winxp drivers the following links:

http://laptop-driver.blogspot.com/2010/11/compaq-presario-cq62-windows-xp-driver.html

In my case: my notebook model is Presario CQ62-303u

I try to change SATA driver mode to IDE mode, but my notebook BIOS doesn't have that choice.

The following link have some discuss of SATA driver problem in winxp installation.

http://h30434.www3.hp.com/t5/Notebook-Operating-systems-and/SATA-drivers-for-XP-solution-on-0x0000007B-BSOD/td-p/114120

1. You download CPU-Z

2. You should check chipset of notebook.

3. You should download manuals for SATA problem.

4. You download nlite

5. Read manual (3) and create winxp boot CD/DVD.

6. Intsall winxp.

Sunday, July 17, 2011

Silver pen writes circuits on any material

University of Illinois engineers have developed a silver-inked rollerball pen capable of writing electrical circuits and interconnects on paper, wood and other surfaces. The pen is writing whole new chapters in low-cost, flexible and disposable electronics.

Led by Jennifer Lewis, the Hans Thurnauer professor of materials science and engineering, and Jennifer Bernhard, a professor of electrical and computer engineering, the team published its work in the journal Advanced Materials.
“Pen-based printing allows one to construct electronic devices ‘on-the-fly,’ ” said Lewis, the director of the Frederick Seitz Materials Research Laboratory. “This is an important step toward enabling desktop manufacturing (or personal fabrication) using very low cost, ubiquitous printing tools.”
While it looks like a typical silver rollerball pen, the pen’s ink is a solution of real silver. After writing, the liquid in the ink dries to leave conductive silver pathways – in essence, paper-mounted wires. The ink maintains its conductivity through multiple bends and folds of the paper, enabling devices with great flexibility and conformability.
“The key advantage of the pen is that the costly printers and printheads typically required for inkjet or other printing approaches are replaced with an inexpensive, hand-held writing tool,” said Lewis, who is also affiliated with the Beckman Institute for Advanced Science and Technology. The ability to create freestyle conductive pathways enables new possibilities in art, disposable electronics and folded three-dimensional devices. For example, the researchers used the silver pen to sketch a copy of the painting “Sae-Han-Do” by Jung Hee Kim, which portrays a house, trees and Chinese text. The ink serves as wiring for an LED mounted on the roof of the house, powered by a five-volt battery connected to the edge of the painting. The researchers also have demonstrated a flexible LED display on paper, conductive text and three-dimensional radio-frequency antennas.
Next, the researchers plan to expand the palette of inks to enable pen-on-paper writing of other electronic and ionically conductive materials.



Mutex Linux version to Windows version

I nowadays working on Synchronization problems in Windows CE. Than I studying and searching in the Internet resources, some software developers solve the problems for Mutex.

The following links have examples and comparing in linux and windows.

http://www.ibm.com/developerworks/linux/library/l-ipc2lin3/index.html

http://suacommunity.com/dictionary/pthread_mutex_lock-entry.php

I little bit analysis above articles. In my case mutex problems linux to windows version.

Linux version:

pthread_mutex_init(&mt_protectClientList, NULL);

Windows version:

mt_protectClientList=CreateMutex(NULL,false,NULL);


Linux version:

pthread_mutex_lock( &(pc_serverData->mt_protectClientList) );

Windows version:

dwWaitResult=WaitForSingleObject(mt_protectClientList,INFINITE);


Linux version:

pthread_mutex_unlock( &(pc_serverData->mt_protectClientList) );

Windows version:

if(dwWaitResult==WAIT_OBJECT_0)

{ ReleaseMutex(mt_protectClientList); }

But, I don't know exactly correct and working well. (Compiling noerror :) )


Saturday, July 16, 2011

Freelancer.com