¡¾ÀíÂÛ֪ʶƪ¡¿Linux»ìºÏ±à³Ì+log4cpp
ÓÉÓÚҪʹÓõ½log4cppµÄ¿â£¬¶ølog4cµÄ×ÊÁÏÊǷdz£µÄÉÙ£¬Ò²ÀÁµÃÈ¥Ñо¿ËüµÄÓ÷¨£¬ÓÚÊǾ;ö¶¨ÊÔÊÔ»ìºÏ±à³ÌÕßÍæÒâ¡£
Ê×ÏÈÏÈÒýÓÃÏÂC++ËüµÄfather: StroustrupµÄһƪÎÄÕ¡¶C++ Style and Technique FAQ¡·£¨http://www2.research.att.com/~bs/bs_faq2.html£©ÀïµÄһС¸öƬ¶Î£º
Just declare the C function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code
extern "C" void f(int); // one way
extern "C" { // another way
int g(double);
double h();
};
void code(int i, double d)
{
f(i);
int ii = g(d);
double dd = h();
// ...
}
The definitions of the functions may look like this:
/* C code: */
void f(int i)
{
/* ... */
}
int g(double d)
{
/* ... */
}
double h()
{
/* ... */
}
Note that C++ type rules, not C rules, are used. So you can't call function declared ``extern "C"'' with the wrong number of argument. For example:
// C++ code
void more_code(int i, double d)
{
double dd = h(i,d); // error: unexpected arguments
// ...
}
Just declare the C++ function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code:
extern "C" void f(int);
void f(int i)
{
// ...
}
Now f() can be used like this:
/* C code: */
void f(int);
void cc(int i)
{
f(i);
/* ... */
}
Naturally, this works only for non-member functions. If you want to call member functions (incl. virtual functions) from C, you need to provide a simple wrapper. For example:
// C++ code:
class C {
// ...
virtual double f(int);
};
extern "C" double call_C_f(C* p, int i) // wrapper function
{
return p->f(i);
}
Now C::f() can be used like this:
/* C code: */
double call_C_f(struct C* p, int i);
void ccc(struct C* p, int i)
{
double d = call_C_f(p,i);
/* ... */
}
If you want to call overloaded functions from C, you must provide wrappers with distinct names for th
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
LINUX
·þÎñ½éÉÜ£¨ÇåÎú°æ£©
·þÎñÁÐ±í£¨°´×Öĸ˳ÐòÅÅÁУ©
·þÎñÃû
±ØÐ裨ÊÇ/
·ñ£©
ÓÃ;ÃèÊö
×¢½â
acon
·ñ
ÓïÑÔÖ§³Ö
ÌØ±ðÖ§³Ö×óÊÖÊéдÓïÑÔ:
°¢À²®Óï,
²¨Ë¹ÓïºÍÏ£²®À³Óï
acpi
·ñ
µçÔ´¹ÜÀí
ÊÖÌáµçÄÔµç³ØµçÉÈ¼à¿ØÆ÷
acpid
·ñ
¼àÌý¾«Áé½ø³Ì
´Ë½ø³Ì¼àÌý²¢·ÖÅäÄÚºËÖеÄacpi
ʼþ
adsl
·ñ
ÄÚ²¿ADSL
¿ ......
1.´Ó80386¿ªÊ¼£¬Intel´¦ÀíÆ÷µÄÏßÐÔ32±»·ÖΪ3¸öÓò£¬×î¸ßʮλΪ´ËÏßÐÔµØÖ·ÔÚҳĿ¼µÄË÷Òý£»ÖмäʮλΪ´ËÏßÐÔµØÖ·ÔÚÒ³±íÖеÄË÷Òý£»×îµÍ12ΪÎïÀíµØÖ·µÄµÍ12루Ҳ¿ÉÒÔ˵ÊÇÒ³ÄÚÆ«ÒÆÁ¿£©¡£Ã¿¸ö½ø³ÌÒ»¶¨Óи÷×Ô¶ÀÁ¢µÄÒ³±í£¨×¢Ò⣺ÕâÀï˵µÄÊǽø³Ì£¬¶ø²»ÊÇÏ̡߳£ÔÚlinuxÀïÏß³ÌÆäʵ¾ÍÊÇÇáÁ¿¼¶µÄ½ø³Ì£¬ËûÃÇÊÇÁ¬Ò³Ä¿Â¼¶¼ÏàͬµÄ½ø³Ì£¬Ö»ÊÇ ......