Serial_GetPortInfo |
Get information and status of the serial port with the specified name.
Syntax
Serial_GetPortInfo ( switches ; portname )
Parameters
switches | specifies which information you want to get |
portname | the name of the serial port you want to get the information of |
Switches
switches can be one of this:
-Status | (default) returns the status of a serial port: this can be: open/closed/not found |
-Verbose | returns a detailed list of information about the port |
Returned Result
Data type returned
Text
Result
The requested information.
If an error occurs an error code is returned. Returned error codes can be:
$$-50 | paramErr | parameter error |
Other errors may be returned.
Originated in
Troi Serial Plug-in 5.0
Compatibility
FileMaker Pro 16 to FileMaker Pro 2023
Example
Set Field [ result ; Serial_GetPortInfo( "-Status" ; "COM1") ]
This returns the status of the COM1 serial port. If the port is open the result will be the text: “open”.
Example 2
Set Field [ result ; Serial_GetPortInfo ( "-Verbose" ; "usb12345" ) ]
This returns information of the “usb12345” serial port. If the port is open the result will be similar to this:
Port name: usb12345
Status: open
Bytes in receive buffer: 123
Trigger filename: SimpleSerial
Trigger script name: Receive data TriggerScript
Used in example file
Debug.fmp12
Related functions
Serial_GetPortNames |
Serial_GetUSBInfo |
Related topics
Troi Serial Plug-in online help (overview)