Serial_GetPortInfo (function reference)

Troi Serial Plug-in > Functions reference > Serial_GetPortInfo
Troi Serial Plug-in for FileMaker Pro

Serial_GetPortInfo

Get information and status of the serial port with the specified name.

SyntaxFunction badge

Serial_GetPortInfo ( switches ; portname )

Parameters

switchesspecifies which information you want to get
portnamethe name of the serial port you want 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
-Verbosereturns 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:

$$-50paramErrparameter error

Other errors may be returned.

Originated in

Troi Serial Plug-in 5.0

Compatibility

FileMaker Pro 12 to 16

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

Related functionFunction badge

Serial_GetPortNames

Online Help Page for Troi Serial Plug-in for 12 to 16 –> Serial_GetPortInfo (serip4815) 2017-0525 17:41:23