04-12-2009
Have the other side send back some kind of information (eg 0xFF or some other byte of your choosing) as soon as all information has been received.
10 More Discussions You Might Find Interesting
1. Programming
Hai there,
Can any one provide me with a ansi c source code for
opening com1 or com2 and read data. The port is connected to
another serial communication device on rs232 port.
The o/s is Sco Unix 5.0.6
Matter urgent
Viswanath (0 Replies)
Discussion started by: viswanath
0 Replies
2. UNIX for Dummies Questions & Answers
I am having trouble with a device connected through a serial port on my sun workstation ( I am running solaris 7).
The seriel device works on an identical workstation running the same o/s version but when I move it to the initial workstation it doesn't work. I am using an rs232 serial cable and... (1 Reply)
Discussion started by: Henrik
1 Replies
3. Solaris
Hi,
I am working with Sun Solaris 9 Sparc,Sun-Blade-100.In my application,I need to monitor the UPS using Serial port.
When I am using JRE 1.4 in my application,I am able to monitor it but when I am upgrading the JRE version from 1.4 to JRE1.6. I am not able to monitor the UPS.It is showing the... (1 Reply)
Discussion started by: smartgupta
1 Replies
4. OS X (Apple)
Hello,
I am trying to use a rs232 device through a USB serial port on my MacBook pro laptop. I think the device needs the communication parameters to be
9600 n 8 1
my question is does anyone know what the default communication parameters are for mac os x 10.5.7 unix? And if the default... (0 Replies)
Discussion started by: jamesapp
0 Replies
5. Windows & DOS: Issues & Discussions
Hello all.
I have an old computer with M$-DOS 7. I want to use it like a dumb terminal, with telnet. I need to connect it to my desktop These are my questions:
How can i configure the serial port on dos?
How can i telnet form dos to the serial port?
How can i set up a telnet server on the... (12 Replies)
Discussion started by: mghis
12 Replies
6. Shell Programming and Scripting
Hi,
I have a external board connected to my serial port. I need to execute "shutdown -r now" command when system boot up. When system boots up it requires a username ans password. Then I need to run my command. I can use rc script but that is rebooting system before it asks for username and... (0 Replies)
Discussion started by: charlie.arya
0 Replies
7. Solaris
Hi Everyone,
In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Discussion started by: bobby320
3 Replies
8. Web Development
I am trying to write to a serial port and capture the reponse in a file -
adduser ethan dialout
The user `ethan' is already a member of `dialout'
root@meow:/home/ethan# ls -l /dev/ttyS0
crw-rw-r-- 1 ethan dialout 4, 64 Oct 7 20:55 /dev/ttyS0
$fh1 = fopen("/dev/ttyS0", "w+");... (74 Replies)
Discussion started by: Meow613
74 Replies
9. Web Development
I need to set a serial port to 9600 7E1. How do I accomplish this?
I've tried every combination, with no luck. (6 Replies)
Discussion started by: Meow613
6 Replies
10. Solaris
Hello,
I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build.
The first part is what confuses me -the cabling.
I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies
LEARN ABOUT PHP
imagecolorallocate
IMAGECOLORALLOCATE(3) 1 IMAGECOLORALLOCATE(3)
imagecolorallocate - Allocate a color for an image
SYNOPSIS
int imagecolorallocate (resource $image, int $red, int $green, int $blue)
DESCRIPTION
Returns a color identifier representing the color composed of the given RGB components.
imagecolorallocate(3) must be called to create each color that is to be used in the image represented by $image.
Note
The first call to imagecolorallocate(3) fills the background color in palette-based images - images created using imagecreate(3).
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $red
-Value of red component.
o $green
-Value of green component.
o $blue
-Value of blue component.
These parameters are integers between 0 and 255 or hexadecimals between 0x00 and 0xFF.
RETURN VALUES
A color identifier or FALSE if the allocation failed.
Warning
This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on
Booleans for more information. Use the === operator for testing the return value of this function.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.3 | |
| | |
| | Returns FALSE if the allocation failed. Previ- |
| | ously -1 was returned. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
imagecolorallocate(3) example
<?php
$im = imagecreate(100, 100);
// sets background to red
$background = imagecolorallocate($im, 255, 0, 0);
// sets some colors
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
// hexadecimal way
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
?>
SEE ALSO
imagecolorallocatealpha(3), imagecolordeallocate(3).
PHP Documentation Group IMAGECOLORALLOCATE(3)