Code Monkey home page Code Monkey logo

appwerft.ti.iec60870's Introduction

Ti.IEC60870-5-104

This module is the Titanium implementation of IEC 60870-5-104 communication standard. The library can be used to program clients as well as servers. The module is work on progress and not ready for production.

Usage as client

First we need a connection to the server:

var IEC60870 = require("de.appwerft.j60870");

var conn = IEC60870.createConnection({
	address : "192.168.0.3",
	port : 1234,
	commonAddressFieldLength : INT, // length of the Common Address (CA) field of the ASDU
	cotFieldLength : INT, // length of the Cause Of Transmission (COT) field of the ASDU
	ioaFieldLength : INT, //  length of the Information Object Address (IOA) field of the ASDU
	maxIdleTime : INT, // maximum time in ms that the connection may be idle before sending a test frame
	maxTimeNoAckReceived : INT, // maximum time in ms that no acknowledgement has been received (for I-Frames or Test-Frames) before actively closing the connection. 
	maxTimeNoAckSent : INT,
	maxUnconfirmedIPdusReceived : INT
});
conn.connect(require("onConnectHandler"),onErrorHandler);

Alternatively to constructor parameters you can provide a json file in you folder Ressources. In this case you can simple connect by

var conn = IEC60870.createConnection();
conn.connect(require("onConnectHandler"),onErrorHandler);

The default path of configuration file j60870.json you can overwrite in your tiapp.xml with parameter J60870_PATH. In this case you can only connect one server.

Inside of onConnectHandler.js can can implement:

module.exports = function(_connection) {
    _connection.startDataTransfer();
    _connection.send();
};

appwerft.ti.iec60870's People

Watchers

James Cloos avatar Brenton House avatar

Forkers

hbaocr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.