Good afternoon all

I am busy with a project where I need to read an RFID tag, get the data
associated with the tag and then push the data to a web page for a
security person to monitor.

I can successfully read the tag by using LogicAlloy's ALE server. It
then calls my Catalyst application at http://localhost/ale/notifier :

sub notifier : Private {
        my ( $self, $c ) = @_;
        
        #$c->stash->{template} = 'notifier.tt2';
        $c->stash->{tagdata} = $c->request->params->{tagdata};
        open (TagData, '>C:\Eclipse Projects\Asset
Tracker\AssetTracker\lib\AssetTracker\tagdata.txt');
        print TagData $c->request->params->{tagdata};
        close TagData;
        
}

As you can see I do not get the associated tag data yet, I am just
trying to display the tag data received from the ALE server.

I can see that the data is coming through correctly by monitoring the
console debug and checking the tagdata.txt file.

The problem that I have is that I have no idea how to push the data to a
web page instead of pulling.

Hi,

you might want to have a look at http://meteorserver.org/. This server pushes data to a client via a persistent http connection. To handle such things with catalyst is not a very good idea. the ALE server will talk to the meteor server and not the catalyst application.

If you do not need realtime push you could reload a catalyst page every x seconds.

This page opens the file tagdata.txt and prints its content. Add a html meta tag to reload the page every x seconds.


moritz


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to