Section contents
ccomms.oxh
this& = NewCommServ&:
Creates a comms server object and returns a handle which allows the object to be manipulated.
this& |
An value which represents the created object |
If the object could not be created then an error is generated
which should be trapped by an ONERR
handler.
LOCAL this& this& = NewCommServ&: DeleteCommServ:(this&)
DeleteCommServ:(BYREF this&)
Destroys the comms server object.
BYREF this& |
A handle to a comms server object |
LOCAL this& this& = NewCommServ&: DeleteCommServ:(this&)
CommServClose:(this&)
Closes a connection to the comms server.
this& |
A handle to a comms server object |
LOCAL this&,result% this& = NewCommServ&: result% = CommServConnect%:(this&) CommServClose:(this&) DeleteCommServ:(this&)
result% = CommServConnect%:(this&)
Opens a connection to the comms server.
this& |
A handle to a comms server object |
result% |
An error code |
LOCAL this&,result% this& = NewCommServ&: result% = CommServConnect%:(this&) CommServClose:(this&) DeleteCommServ:(this&)
result% = CommServGetPortInfo%:(this&,name$,info&)
Obtains the port information for a comms module specified by
name (for example, ECUART
for RS232).
this& |
A handle to a comms server object |
name$ |
A name of a serial port |
info& |
A handle to a serial information object |
result% |
An error code |
LOCAL this&,info&,result% this& = NewCommServ&: info& = NewSerialInfo&: result% = CommServConnect%:(this&) result% = CommServGetPortInfo%:(this&,"ECUART",info&) CommServClose:(this&) DeleteSerialInfo:(info&) DeleteCommServ:(this&)
result% = CommServGetPortInfo2%:(this&,index&,module&,info&)
Obtains the port information for a comms module specified by
an index number from 0. This allows you to enumerate through the
loaded comms modules. You can obtain the current number of loaded
comms modules by calling CommServNumPorts
.
this& |
A handle to a comms server object |
index& |
Index of the port (starting at 0) |
modeul& |
A descriptor to return the name of a loaded module |
info& |
A handle to a serial information object |
result% |
An error code |
result% = CommServLoadCommModule%:(this&,name$)
Use this function to load a comms module.
this& |
A handle to a comms server object |
result% |
An error code |
.CSY
) is
automatically appended by this function. /System/Libs
directories on all drives for this file LOCAL this& this& = NewCommServ&: result% = CommServConnect%:(this&) result% = CommServLoadCommModule%:(this&,"IRCOMM") result% = CommServUnloadCommModule%:(this&,"IRCOMM") CommServClose:(this&) DeleteCommServ:(this&)
result% = CommServNumPorts%:(this&,BYREF num&)
Use this function to find out how many comms module (CSYs) are loaded
this& |
A handle to a comms server object |
BYREF num& |
On return, holds the number of loaded CSYs |
result% |
An error code |
result% = CommServUnloadCommModule%:(this&,name$)
Use this function to unload a comms module for instance, if switching from RS232 to infra-red operation.
this& |
A handle to a comms server object |
result% |
An error code |
LOCAL this& this& = NewCommServ&: result% = CommServConnect%:(this&) result% = CommServLoadCommModule%:(this&,"IRCOMM") result% = CommServUnloadCommModule%:(this&,"IRCOMM") CommServClose:(this&) DeleteCommServ:(this&)
There is no need to unload a comms module when the connection to the server is closed, as this is done automatically.
version& = CommServVersion&:(this&)
Creates and returns a handle to a version object.
The version number may be incremented in future releases of the file server. If extra features are added in such releases, the version number may be used by application programs as a basis for assessing the capabilities of the file server
this& |
A handle to a comms server object |
version& |
A handle to a version
object. This must be freeded with a call to DeleteVersion: |
LOCAL this&,version& this& = NewCommServ&: version& = CommServVersion&:(this&) DeleteVersion:(version&) DeleteCommServ:(this&)