From 84adefa331c4159d432d22840663c38f155cd4c1 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 20 Nov 2009 14:54:40 +0000 Subject: The R13B03 release. --- lib/megaco/doc/src/megaco_flex_scanner.xml | 157 +++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 lib/megaco/doc/src/megaco_flex_scanner.xml (limited to 'lib/megaco/doc/src/megaco_flex_scanner.xml') diff --git a/lib/megaco/doc/src/megaco_flex_scanner.xml b/lib/megaco/doc/src/megaco_flex_scanner.xml new file mode 100644 index 0000000000..eb206e5d13 --- /dev/null +++ b/lib/megaco/doc/src/megaco_flex_scanner.xml @@ -0,0 +1,157 @@ + + + + +
+ + 20012009 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + megaco_flex_scanner + Micael Karlberg + Micael Karlberg + + Micael Karlberg + + 2009-05-04 + %VSN% + megaco_flex_scanner.xml +
+ megaco_flex_scanner + Interface module to the flex scanner linked in driver. + +

This module contains the public interface to the flex scanner + linked in driver. The flex scanner performs the scanning phase + of text message decoding.

+ +

The flex scanner is written using a tool called flex. + In order to be able to compile the flex scanner driver, this + tool has to be available.

+ +

By default the flex scanner reports line-number of an error. + But it can be built without line-number reporting. Instead + token number is used. This will speed up the scanning some + 5-10%. Use when + configuring the application.

+ +

The scanner will, by default, be built as a reentrant scanner if the + flex utility supports this (it depends on the version of flex). + It is possible to explicitly disable this even when flex support this. + Use when + configuring the application.

+ +
+ +
+ DATA TYPES + = 1 + + ]]> + + +
+ + + + + start() -> {ok, PortOrPorts} | {error, Reason} + + + PortOrPorts = megaco_ports() + Reason = term() + + +

This function is used to start the flex scanner. + It locates the library and loads the linked in driver.

+ +

On a single core system or if it's a non-reentrant scanner, + a single port is created. On a multi-core system with a reentrant + scanner, several ports will be created (one for each scheduler).

+ +

Note that the process that calls this function must + be permanent. If it dies, the port(s) will exit and the driver unload.

+ + +
+
+ + + stop(PortOrPorts) -> stopped + + + PortOrPorts = megaco_ports() + + +

This function is used to stop the flex scanner. It also + unloads the driver.

+ + +
+
+ + + is_reentrant_enabled() -> Boolean + + + Boolean = boolean() + + +

Is the flex scanner reentrant or not.

+ + +
+
+ + + is_scanner_port(Port, PortOrPorts) -> Boolean + + + Port = port() + PortOrPorts = megaco_ports() + Boolean = boolean() + + +

Checks if a port is a flex scanner port or not (usefull when + if a port exits).

+ + +
+
+ + + scan(Binary, PortOrPorts) -> {ok, Tokens, Version, LatestLine} | {error, Reason, LatestLine} + + + Binary = binary() + PortOrPorts = megaco_ports() + Tokens = list() + Version = megaco_version() + LatestLine = integer() + Reason = term() + + +

Scans a megaco message and generates a token list to be passed on the parser.

+
+
+ +
+ +
+ -- cgit v1.2.3