Datasheet
API ActionScript 3 class
246
trace(evt.data[i]['mac-address'])
trace(" " + evt.data[i]['signal-strength'])
}
}
}
API Delphi Client
This is implementation of MikroTik RouterOS API Client for Delphi. It supports execution of parallel requests to
router and has database-like interface for easy use.
Classes
RouterOSAPI unit contains definition of two classes which you need to work with API protocol from your Delphi
programs.
TRosApiClient
This class encapsulates properties and methods to make a connection to router via RouterOS API protocol.
• function Connect(Hostname, Username, Password: String; Port: String = '8728'): Boolean;
This function connects to the router and performs login procedure. It returns True if login was successful, False
otherwise.
• function Query(Request: array of String; GetAllAfterQuery: Boolean): TROSAPIResult;
Makes a query to the router. Request is array of string, first one being the command and others are parameters. If
GetAllAfterQuery is True, then TROSAPIResult.GetAll is executed after sending a query.
• function Execute(Request: array of String): Boolean;
If you do not need to receive any output from your query, use this method. It simply calls Query function and frees
returned object.
• property Timeout: Integer;
With this property you can set timeout value for network operations (in milliseconds).
• property LastError: String;
This read-only property contains textual description of last error occured.
• procedure Disconnect;
Disconnects from the router.










