Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An Erlang/Tcl Interface

License

NotificationsYou must be signed in to change notification settings

fredyouhanaie/etclface

Repository files navigation

This is aTcl extension that will allow software writtenin Tcl andErlang to communicate using theErlang/OTP interface,erl_interface.

Introduction

Erlang provides two native interfaces that enable communication betweenErlang processes and external programs using Erlang's message passingmechanism.

One of these interfaces iserl_interface, which allows the externalprogram to register as a node in a Distributed Erlang network and exchangemessages with Erlang processes.

Some of the aims of the Tcl extension are:

  • Let a Tcl application use Erlang for processing.
  • Let an Erlang application use a Tcl/Tk based GUI, or other Tclextensions such as Expect.

The initial version will only expose enougherl_interface functions toallow a Tcl application to communicate with Erlang nodes. Currently,there are many functions inerl_interface, however, only the followingsubset will be provided:

  • register with epmd as a node
  • send/receive messages
  • decode/encode between internal and Tcl types

Build and Installation

Prerequisites

You will need the following software/packages:

  • Tcl/Tk 8.5 or higher
  • Erlang/OTP, R15B03 or higher
  • TeX, if producing the documentation
  • Cweb, which can be obtained fromhere, orautomatically installed with the TeX Live package.
  • cmake
  • ccmake, not mandatory, but a useful tool for editing cmake parameters
  • make
  • C compiler, GCC was used during development
  • tcllib, provides doctools and dtplite, which is needed for the manpage

Build

Once you have the source files on a local disk, change to theetclfacedirectory, then

mkdir -pv _build# for out-of-source buildscd _buildcmake ..make# to create the librarymake man# to create the man pagemake doc# optional, for the PDF docs

Installation

if the build is successful, then you should have the following filesin the_build directory:

  • libetclface.so
  • etclface.3tcl.gz
  • etclface.pdf (ifmake doc was run)

You can then install the library, by default under/usr/local/, with

make install# ensure you have permissions

The PDF file is not installed anywhere, it is up to you to move/copyit somewhere convenient.

You can also change the installation directory when configuring cmake,e.g.

mkdir -pv _buildcd _buildcmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..

The$HOME/.local directory in the above example is standard on theLinux systems, and it allows users to have their own privateequivalent of/usr/local directory.

Every timemake install is run, the file_build/install_manifest.txt will contain the list of the installedfiles.

Testing

The software has been tested on Debian GNU/Linux only. The testscripts can be found in theTests directory.

To run the testsuite:

cd _buildmake tests

The testsuite will start a local erlang node in the background, usingrun_erl, that will be used to test the communication betwen the Tcland Erlang processes. The erlang node will only be active during thetest. While active, the erlang node will write to log files in/tmp/erlnode/.

If, for some reason, the erlang node is left running, it can bestopped as follows, note that the trailing/ is required:

echo 'q().' | to_erl /tmp/erlnode/

Documentation

There are two pieces of documentation, a man page and a single PDFfile generated from theCWEB source code.

The man page is generated from theetclace.man file and, onceinstalled, can be accessed usingman etclface. It describes all theTcl commands implemented byetclface.

The PDF file contains the implementation details, including thecomplete source code.

Feedback and Contributions

Comments and feedback are welcome, please use the issue tracker forthis.

Please use pull requests for patch contributions.

Enjoy!

Fred Youhanaie

About

An Erlang/Tcl Interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp