result output: Mysqld is alive2. Get several current status values for MySQL- - -hlocalhost status3. Get the current connection information for the database- - -Hlocalhost processlist4. Get the number of connections for the current database - - - BNe "Select Host,countfromgroup by host;" Information_schema5. Check, repair, analyze, optimize the related tables in MySQLServer- - -- all-databaseson the MySQL connection client, execute the following command1. Used to
1 Product
2. Features
The main function of this product is to monitor the communication data in the serial line. It is very suitable for serial programming staff. By capturing the serial communication data, we can analyze the communication protocols or data of hardware and software, the biggest advantage of this prod
Delphi serial port and voice fax Advanced Programming
DelphiTutorial Series of books(028)《DelphiAdvanced Programming for serial port and voice fax Organize netizens (state)Email:Shuaihj@163.com
:
Part1
Part2
Part3
Author: Wen Jinshan Tang zhupeng
Series name
the receiver, and the effect is clear at a glance. For example:
After installing vspm, click vspm-> virtual serial port plug-in the Start menu, and overwrite the vspm. ini file in the directory to the program root directory. Remember to back up the original file. At this time you start vspm again, is the state of COM3-COM4 connection, COM5-COM6 connection.
Run two uartassist commands, set them to com
Reads digital signals from the serial portThis example shows how to monitor the switch status by establishing a serial port communication between the Arduino and the computer.Hardware requirementsArduino Development BoardAn instantaneous switch, button, or mobile Switch10 k ohm resistanceBreadWireCircuit
Image develope
The following is an example of Z-tek (USB2.0) to a serial adapter (model ZK-U03-2A):
1, according to the requirements of the installation of the adapter driver, "Device Manager/Port", you can find a "USB serial Port (COM4)", the following figure:
2, right click on "USB
the original events. developers can directly
The following functions are called to trigger events. These events are loaded by default when the software platform starts.
1) void OnReceiveDataHandler (byte [] revdata );
Trigger receiving data events
2) void OnSendDataHandler (byte [] senddata );
Trigger the data sending event. When the Self mode is applied during network communication, you can use this event to independently send data.
3) void OnDeviceRuningLogHandler (stringstatetext );
Output
virtual serial port software to establishCom2AndCom3In this case, the data of the serial port debugging assistant is sentWrite Data in the edit box, for example:"HuaChina University of Science and Technology"And then click "Hand", It will be found that the data receiving area of another
and cannot predict when it will end. In VB program, this problem can be solved by inserting a doevent statement in the loop structure. In Java, the best way is to use threads, just like the following code fragment.
Public Testport Extend Thread
{
...
InputStream input = Serialport.getinputstream ();
StringBuffer buf = new StringBuffer ();
Boolean stopped = false;
...
public void Run ()
{
try {
while (!stopped)
int ch = input.read ();
if (ch== ' q ' | | ch== ' q ')
{
/* End read,
writetotaltimeoutconstant;} Commtimeouts, * lpcommtimeouts;
Set the timeout function to setcommtimeouts. In its prototype, the pointer to receive commtimeouts is a parameter:
Bool setcommtimeouts (Handle hfile, // handle to communications deviceLpcommtimeouts // pointer to comm time-out Structure);
The following procedure sets the serial port read operation timeout to 10
(unsupportedcommoperationexception e ){}Try {Outputstream. Write (messagestring. getbytes ());} Catch (ioexception e ){}}}}}}
The preceding two routines are simplified. After the port is opened and the data stream and serial port are not closed after the transmission is complete. In the routine, we can see that comatrix ortidentifier provides the Open Method to
, this series of products provide optional photoelectric isolation (2 KV) and Surge Protection (25 kv esd) functions 。
This product features: Optional photoelectric isolation (2KV) and Surge Protection (25KV ESD) features; Automatic Control of Data flow ADDC (Automatic Data Direction Control) features; RS-485 Data Control l: ADDC can be controlled through the RTS; built-in terminal resistance; chip hardware traffic control to ensure no data loss; advanced
retrospect, perhaps I did not notice that 51 single-chip serial port baud rate generator can only use T1, and I have been using T0 as a baud rate generator.Recently began to contact the STM32 series chip, because there is a firmware library for the operation of the underlying register is encapsulated, very close to advanced programming, learning and easy to use,
In the previous article, you should know which interface your printer uses. After connecting the printer to the computer using the data cable, select the appropriate port in the driver to print it.
The following describes the serial port printer driver operation steps.
1. Select the correct port number in the driver.
Y
, this series of products provide optional photoelectric isolation (2 KV) and Surge Protection (25 kv esd) functions 。
This product features: Optional photoelectric isolation (2KV) and Surge Protection (25KV ESD) features; Automatic Control of Data flow ADDC (Automatic Data Direction Control) features; RS-485 Data Control l: ADDC can be controlled through the RTS; built-in terminal resistance; chip hardware traffic control to ensure no data loss; advanced
Remember to close the port after it is enabled, andThe connection object is the same. It must be closed after it is used. Port. Close ();} Catch (Exception ex){ // Caught exception information MessageBox. Show (ex. Message, " Prompt " );}}
2. If you want to monitor the status of the device in real time, there is a good event. There is a datareceived event
the writefile () function returns (). because the asynchronous mode works normally in a single thread, the only difference is that when writefile () is executed, it may also execute readfile () (depending on the time when the writefile () function is executed ), the table is not listed here. 3. multi-thread comparison: the performance of a single thread is the same. What about multi-thread? The following code uses multithreading. It first creates a read thread to
RTS as a signal, but when the serial port is low, there is a signal. When it is high, there is no signal, and the status obtained with tiocmget is the opposite, that is to say, tiocmget/tiocmset only obtains/controls whether the corresponding pins of the serial port have signals, and does not reflect the real level of
Prepare
Raspberry Pi Development Board ( Click here to purchase ) (has been brushed into the official Raspbian system )
USB to Serial board ( click here to buy )
DuPont Line (4 root)
Connection
串口板 树莓派--------------------VCC +5V(非必须)RX TXD(GPIO15)TX RXD(GPIO14)GND Ground Raspberry Pi pin Map (40PIN Gpio For example, 26PIN Gpio compatible) serial
Http://blog.sina.com.cn/s/blog_6151984a0100ejfg.html/Sbin/Getty-l 38400 ttys0 VT100Command used:Tty view which terminal to useWho views logged-on usersW. View login usersEcho "ABC">/dev/pts /*Echo "123">/dev/ttyama0 information transmission between different terminalsWhen you run a program, the process will definitely correspond to a terminal, and the printf print information will appear on the terminal. When the program enters the kernel state (such as calling the driver ), printk prints inform
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.