IrDA support is provided by the IrDA protocol module
ircomm.csy
. Using this module is simply a matter of providing a
different filename and port name as parameters to
RCommServ::LoadCommModule()
. Achieving this with the example code
is a matter of replacing the call which loads ecuart.csy
with the
following code fragment.
RCommServ server;
server.Connect ();
server.LoadCommModule (_L ("IRCOMM"));
RComm commPort;
commPort.Open (server, _L ("IrCOMM::0"), ECommExclusive);
A program that wants to provide the ability to use an infra-red as
well as a cabled connection should provide the facility for loading either of
these .csy
files, depending on the wishes of the user. The exact
name used for the port can either be hard-coded or else looked up through
GetPortInfo()
as needed.
Note that the serial port defaults for ircomm.csy
are
different to those used by ecuart.csy
, and changing these defaults
can change the way the IrDA protocol module behaves. We recommend that no
change be made to the default settings unless you fully understand the
implications of such changes.
IrDA.