Syntax
isreachable=pingIP([IP,tt])
Input Parameter
IP : | | IP address |
tt : | | timeout time; default is 1 second |
Output Parameter
isreachable : | | true if a response was found |
Copyright 2023-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm is designed to check the reachability of an FTP server by sending a single ping to a specified IP address. It is part of the SolidGeometry library and was introduced in version 5.3.
Input Parameters
- IP: The IP address of the server to ping. If not provided, the default is '129.187.200.238'.
- tt: The timeout time in seconds for the ping response. The default value is 1 second.
Output Results
- isreachable: A boolean value that is true if the server responds to the ping within the specified timeout.
Algorithm Steps
- Retrieve the IP address and timeout time from the input parameters using the
getfuncparams
function. If not provided, use the default values.
- Check the operating system. If it is macOS, construct a ping command using the specified IP and timeout.
- Execute the ping command using the
system
function and capture the output.
- Determine if the server is reachable by checking if the output contains the phrase '1 packets transmitted, 1 packets received'.
- If the operating system is not macOS, assume the server is reachable by default.
- If there are no output arguments, print a message indicating whether the server is responding within the specified timeout.
Algorithm explaination created using ChatGPT on 2025-08-19 00:37. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21