If I remember right, RS232 uses a voltage feed of +-12V. And I know, from my own experience, that an open connector can give any state, it depends how the hardware is designed.
The question is: Do you get antoher result when you have a negative voltage on the cts pin?
Maybe you can try with a real modem, if you set DTR high/active, then RTS, the modem should respond with setting CTS high/active.
Again, if I remember right, "high/active" really means a negative voltage on the pin in question. But I might be wrong here, so you'd better check that piece of information.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
Am new to VC++.Am using list control(report type) to represent my data obtained from serial port.Am able to select the data in the list control but not able to copy. Should i need to write any code for copying data from control list.I don't want to copy the data to any other controls with in the project.What i need is to select the data in control list, press ctrl+c and copy the data to notepad/word.Please help me out.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
I went through the link u have sent that doesn't matches with my requirement.First thing is am using control list box and am not having any button to copy.What i need is
1) Select the data in the control list by using mouse
2)copy by pressing ctrl+ C
3)pasting in a notepad or word document(outside the project).
From within the IDE, press Ctrl+R and select Accelerator from the list of types. Click the New button. Double-click the newly added accelerator item. Check the Ctrl checkbox. Type a C in the Key combobox. Press Enter. You should now have a Ctrl+C accelerator key. Check out the LoadAccelerators() function.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
I would like my UDP server to send the data when the client connects; say at a rate of 100 msec.
But I can only get it working when the Server does a receive first (so the client has to do a send) then the Server does the send.
Can this be done? The server fails if I do not do the Receive and the client fails if I dont run the server first.
If I comment out the receive I get error 10057 on the send.
The error is WSAENOTCONN.
That's expected since you're using the "from" address from the recvfrom(),
which isn't going to be a valid address without a successful recvfrom() call.
I would like my UDP server to send the data when the client connects;
UDP is connectionless so you don't know if a client is connected or not.
It sounds like you need to either...
1) Keep track of clients that are listening - that would mean a client has to send a notification to
the server when it's ready to receive datagrams. The server can store a list of "connected" clients and
send the periodic datagrams to every address on the list.
2) Broadcast the periodic datagrams. Set the socket option SO_BROADCAST on the socket and send
to the broadcast address (INADDR_BROADCAST). The clients need to set the SO_BROADCAST socket option
I just want to Broadcast UDP packets out on a local network, what destination address do I use
You could use the limited broadcast address 255.255.255.255, however it is best to use the correct IP broadcast address of your local network segment (more successful in my own experience). You can calculate the correct broadcast address, see here.
Which kind of device are you communicating with ? USB doesn't work like a serial port: you don't have access directly to the port but instead you get the handle of a driver. This driver is shipped with the device you want to communicate with and manages all the communication with the device.
To get the handle of the driver, simply call CreateFile supplying the correct driver name, then you should be able to use ReadFile and WriteFile. You can also do some more specific stuff by calling DeviceIOControl (in which you can pass some specific IO code which is dependent of your driver).
So, if you want more help, you'll need to give a lot more information (which device do you try to access, if you have documentation with it, ...).
don't tell me that you don't find the way to implement the secant-method or bisection method!
You have only to implement the algorithm:
ask for a function f(x) and for the borders x1 and x2.
check that sign(f(x1)) != sign(f(x2)) .
Then compute x3 inside the interval (x1, x2). This according on the algorithm, in bisection case x3=(x1+x2)/2,....in secant method it's only the point where the line from (x1,f(x1)) to (x2,f(x2)) intercept the x-axe.
then choose the new interval (or x1-x3 or x3-x2) according on where is the root.
Then start again on the new interval.
Do this 10000...000 times and stop it. Or stop when the interval is "too small".
Last Visit: 31-Dec-99 18:00 Last Update: 10-May-21 19:37