Begginer Question about TK::filevent

From: dhillon2004 (ma_dhillon_at_hotmail.com)
Date: 09/03/04


Date: 3 Sep 2004 14:01:06 -0700

Hello All,
I am beginer in Perl. I am trying a serial port data logging
application.
Requirement of my application is that it should be capable of
receiving and transmitting on same or diffrent ports depending on the
options.
I transmit 34 Bytes of data and would receive 34 bytes of data in
return. Now the problem is that I have to time stamp the packet on the
receive side whenever comlete pkt is received.
I am on windows XP machine and I have Active State Perl 5.8
I am using win32::serialPort pm for configuration setup.
I am trying to use Tk::filevent to iniatiate a call back whenever my
Serial port becomes readable.
But i am getting an error "Not a Glob reference in IO pm"
I have given the follwoing command:

$mw->fileevent($ob, 'readable', \&read_comport);
$mw is an my mainwindow instance
$ob is the object of my comport.
I wish to call &read_comport whenever my comport becomes readable
But i get the above error as mentioned above and my program quits.

I am doing right.
Can the object $ob be passed as fileHandle to fileevent??
or I am interprating something wrong!!
Your help would behighly apprecaited!!
Thanks a lot in advance!!

Sincerely,
Mandeep



Relevant Pages

  • Re: why cant i write to a file with this code?
    ... Can't really say without knowing the format of the data that your hardware device sends through the serial port. ... You are assuming that your readstatement always returns a single chunk, or a packet, from your hardware device. ... The Linux kernel has absolutely no idea, nor does it care, what you have attached to the serial port, and the format of the data you are receiving. ...
    (comp.os.linux.misc)
  • WSDL/SOAP/XML-RPC HELP
    ... I have to define and make something like virtual driver for serial port ... It is not important what is connected on serial port. ... I read some tutorials, guides on XML-RPC, SOAP and WSDL, ... I was planning to use Perl becouse I know something about it. ...
    (comp.lang.python)
  • Re: Vb and GPS via Bluetooth
    ... you use Bluetooth like any other serial port. ... You simply bind the ... >device to a comport and open it. ... You can use OnComm event handling ...
    (microsoft.public.vb.general.discussion)
  • Re: The big Debate on DoEvents
    ... avoid Application.DoEvents and deal with the serial port processing in ... I have a program that receives information from the serial port. ... a progressbar telling me how much of the information I have received. ... user clicks on the screen at any point whilst receiving information ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Can you help me to explain a question about serial port and resolve the problem.
    ... You shoud not change settings of the serial port while you transmit data or ... In chips side, they are identified by CHIP NUMBER and MARKPARITY ... without receiving followed CMD and SPACEPARITY command from computer. ...
    (microsoft.public.development.device.drivers)