{"_id":"7f","_rev":"15-652fe8225efdd07302f83ee50baa50a4","name":"7f","description":"7F protocol library for node.js","dist-tags":{"latest":"1.1.3"},"versions":{"1.0.0":{"name":"7f","version":"1.0.0","main":"./lib/7f","description":"7F protocol library for node.js","author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"dependencies":{"bits":"~0.1.0"},"devDependencies":{"coffee-script":"~1.6.3","buster":"~0.6.12","buster-coffee":"~0.1.4","sinon":"~1.5.2"},"maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"licenses":[{"type":"GPLv3"}],"scripts":{"build":"coffee -c -o lib/ src/","test":"buster test"},"bugs":{"url":"https://github.com/flosse/node-7f/issues"},"_id":"7f@1.0.0","dist":{"shasum":"cc8e094f14e60f1c505c92a217abecefd4bed126","tarball":"https://registry.npmjs.org/7f/-/7f-1.0.0.tgz","integrity":"sha512-/lXQQoKNi6OplmfFd4/M8Jk2YY5nXWGzE6nZxG1E2VGx7ne3Q0rAo/KUJict6yw53ve81keV1Z7K8ZNH6WYOXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICv4NVz5idVZcscvEXLDdFc6ZDtyp4KKCoP2o5h1OdPnAiEAu8qThGChp0cyx0MBnSRwbRQYx6oBIv1s/QoiEbtajhs="}]},"_from":"node-7f/","_npmVersion":"1.3.11","_npmUser":{"name":"flosse","email":"mail@markus-kohlhase.de"}},"1.0.1":{"name":"7f","version":"1.0.1","main":"./lib/7f","description":"7F protocol library for node.js","author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"dependencies":{"bits":"~0.1.0"},"devDependencies":{"coffee-script":"~1.6.3","buster":"~0.6.12","buster-coffee":"~0.1.4","sinon":"~1.7.3"},"maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"licenses":[{"type":"GPLv3"}],"scripts":{"build":"coffee -o lib/ -c src/*.coffee","test":"buster test"},"bugs":{"url":"https://github.com/flosse/node-7f/issues"},"_id":"7f@1.0.1","dist":{"shasum":"c130a87cb061ba46223349ea1cdbed5574eb1e04","tarball":"https://registry.npmjs.org/7f/-/7f-1.0.1.tgz","integrity":"sha512-7NFlmM77nS8VqemHgJavzxzCHffpYdKaj6SEFqrprjkx0A/aJa8GGE3sUJewHlWzm12dfxeI4OH9hs4FOG0rUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzwKioLqDIU4oaLN7R/RFWuNPnpNSVxjOWjAHrCTsz/gIhANoZdTfLq4jiXGOEiaX38ML3ZOCtwuLqL1ZJ9byWPP67"}]},"_from":"node-7f/","_npmVersion":"1.3.11","_npmUser":{"name":"flosse","email":"mail@markus-kohlhase.de"}},"1.1.0":{"name":"7f","version":"1.1.0","main":"./lib/7f","description":"7F protocol library for node.js","author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"dependencies":{"bits":"~0.1.0"},"devDependencies":{"coffee-script":"~1.6.3","buster":"~0.6.12","buster-coffee":"~0.1.4","sinon":"~1.7.3"},"maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"licenses":[{"type":"GPLv3"}],"scripts":{"build":"coffee -o lib/ -c src/*.coffee","test":"buster test"},"bugs":{"url":"https://github.com/flosse/node-7f/issues"},"homepage":"https://github.com/flosse/node-7f","_id":"7f@1.1.0","dist":{"shasum":"4b304f2eba308861e365fbe26ed4806cf28c737c","tarball":"https://registry.npmjs.org/7f/-/7f-1.1.0.tgz","integrity":"sha512-JzKpDyCRekmUpm+MuBK9cxuNk9fupZCFxPgPGx/mBSbzdsDDQeLS3EecWt/vzeYRUpvIe03VtmU7IbFRrsfiRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6pqble8rBhNsp3Dc6GpxdktqdqBrDb+SpVC/ijXzFvAiEAzbbBz3RagFxx9701UPCnEq/77v7k6JCzi0UPx+2uNAM="}]},"_from":"node-7f","_npmVersion":"1.3.14","_npmUser":{"name":"flosse","email":"mail@markus-kohlhase.de"}},"1.1.1":{"name":"7f","version":"1.1.1","main":"./lib/7f","description":"7F protocol library for node.js","author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"dependencies":{"bits":"~0.1.0"},"devDependencies":{"coffee-script":"~1.6.3","buster":"~0.6.12","buster-coffee":"~0.1.4","sinon":"~1.7.3"},"maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"licenses":[{"type":"GPLv3"}],"scripts":{"build":"coffee -o lib/ -c src/*.coffee","test":"buster test"},"bugs":{"url":"https://github.com/flosse/node-7f/issues"},"homepage":"https://github.com/flosse/node-7f","_id":"7f@1.1.1","dist":{"shasum":"af1a0ce3eee2900b69060162a00ad353306c22d0","tarball":"https://registry.npmjs.org/7f/-/7f-1.1.1.tgz","integrity":"sha512-I+eTyJMweBdkTLq4wbN/zG75aVyk9oWKrK5OF2ZHW4e7vq4IUTn7JmqWLoC8eeGeFICEbaCz71u7Gm/REsTkNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSXasYX+3MN5HdaHkxBaTD6j6ihrc2W5CErwMH7njf2gIhAKMhp+VKYdSYveWEiHJDqSDv2FGyA31s5nnCEClh5i3p"}]},"_from":"node-7f/","_npmVersion":"1.3.14","_npmUser":{"name":"flosse","email":"mail@markus-kohlhase.de"}},"1.1.2":{"name":"7f","version":"1.1.2","main":"./lib/7f","description":"7F protocol library for node.js","author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"dependencies":{"bits":"~0.1.1"},"devDependencies":{"coffee-script":"~1.6.3","buster":"~0.6.12","buster-coffee":"~0.1.4","sinon":"~1.7.3","usage":"~0.3.9","async":"~0.2.9"},"maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"licenses":[{"type":"GPLv3"}],"scripts":{"build":"coffee -o lib/ -c src/*.coffee","test":"buster test"},"bugs":{"url":"https://github.com/flosse/node-7f/issues"},"homepage":"https://github.com/flosse/node-7f","_id":"7f@1.1.2","dist":{"shasum":"9091c9489fc73dd830d3f0e9a4b8b9ef983c0521","tarball":"https://registry.npmjs.org/7f/-/7f-1.1.2.tgz","integrity":"sha512-/7oSHnoGBXcDTH73gtbc80mL5bXJfCmOq9PwYEEytU+WO9GIf8tKT6aOFUCNgC6KDiGNl0XYsYM7PRvIjj222A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+KAb2nnSk4lBFWi32imBE1T5nm4FbIxZb3fV/XXLuUAIgTCLh1Yy+iZNq6byTGN0jYMryu8X/K3Zm2z7A3GRNrDA="}]},"_from":"node-7f/","_npmVersion":"1.3.17","_npmUser":{"name":"flosse","email":"mail@markus-kohlhase.de"}},"1.1.3":{"name":"7f","version":"1.1.3","main":"./lib/7f","description":"7F protocol library for node.js","author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"dependencies":{"bits":"~0.1.1"},"devDependencies":{"chai":"^1.9.1","coffee-script":"~1.8.0","mocha":"^1.21.4"},"maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"license":"GPLv3","scripts":{"build":"coffee -o lib/ -c src/*.coffee","test":"mocha --compilers coffee:coffee-script/register spec/*.spec.coffee"},"gitHead":"4a672c39a5c75a67d63f8e4c1a3d35878374eace","bugs":{"url":"https://github.com/flosse/node-7f/issues"},"homepage":"https://github.com/flosse/node-7f","_id":"7f@1.1.3","_shasum":"88d2cb194fceeb96db7b24bc710b283451e7a851","_from":"node-7f","_npmVersion":"2.1.1","_nodeVersion":"0.10.32","_npmUser":{"name":"flosse","email":"mail@markus-kohlhase.de"},"dist":{"shasum":"88d2cb194fceeb96db7b24bc710b283451e7a851","tarball":"https://registry.npmjs.org/7f/-/7f-1.1.3.tgz","integrity":"sha512-1gETEtJY35yPbpHv5vFaTbUIYy+gkOhAF6jbVa96uZ8emftfLTLafKmsIVY197PN4zwhm7tUmo3urtNBsdCkwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYul4OWgmE9W4I9mvG18SUkOFRBa49TT3XilBWMfzjxAIgLx69qFFx3/5X0fC0ES9ziR93DzS3Unwp5z23ygWKPWE="}]}}},"readme":"# lib7f\n\n7F protocol library for Node.js\n\n[![Build Status](https://secure.travis-ci.org/flosse/node-7f.png)](http://travis-ci.org/flosse/node-7f)\n[![Dependency Status](https://gemnasium.com/flosse/node-7f.png)](https://gemnasium.com/flosse/node-7f)\n[![NPM version](https://badge.fury.io/js/7f.png)](http://badge.fury.io/js/7f)\n\n## Usage\n\n```shell\nnpm install 7f\n```\n\n### Server\n\n```coffeescript\nlib7f  = require \"7f\"\nserver = new lib7f.Server\nserver.on \"client\", (client) ->\n  client.on \"message\", (msg) ->\n    console.log msg\n    header = {nr: 1}\n    advancedHeader =\n      logicalNr:  1245\n      command:    lib7f.constants.Command.TO\n      type:       lib7f.constants.DataType.BYTEARRAY\n      count:      3\n    data = new Buffer 7\n    msg = new lib7f.Message header, advancedHeader, data\n    client.send msg\n\nserver.on \"reconnect\", (client) ->\n  console.log \"client #{client.id} has reconnected\"\n\nserver.connect -> # the server is ready\n```\n\nYou can also specify the port, the server address to which the server should be\nbound to, the servers specification number and it's login function ID:\n\n```coffeescript\nserver = new lib7f.Server\n  host: \"192.168.10.30\"\n  port: 5010\n  specificationNr: 8\n  loginFunctionId: 5\n```\n\n### Client\n```coffeescript\n\nlib7f  = require \"7f\"\n\nclient = new lib7f.Client 7,\n  host: \"192.168.0.100\"\n  port: 5010\n  specificationNr: 3\n  loginFunctionId: 9\n\nclient.on \"message\", (msg) ->\n  console.log msg\n  header = {nr: 4}\n  advancedHeader =\n    logicalNr:  54\n    command:    lib7f.constants.Command.FETCH\n    type:       lib7f.constants.DataType.WORD\n    count:      9\n  data = new Buffer 33\n  msg = new lib7f.Message header, advancedHeader, data\n  client.send msg\n\nclient.on \"error\", (err) ->\n  console.log \"something went wrong\"\n\nclient.on \"login\", ->\n  console.log \"client is now logged in\"\n\nclient.on \"connect\", ->\n  console.log \"client is connected\"\n  client.login()\n\nclient.on \"disconnect\", ->\n  console.log \"client is now disconnected\"\n\nclient.connect()\n```\n\n## License\n\nGPLv3\n","maintainers":[{"name":"flosse","email":"mail@markus-kohlhase.de"}],"time":{"modified":"2022-06-12T14:08:35.903Z","created":"2013-10-18T01:29:10.767Z","1.0.0":"2013-10-18T01:29:13.875Z","1.0.1":"2013-10-23T14:05:37.895Z","1.1.0":"2013-12-04T22:06:57.079Z","1.1.1":"2013-12-12T23:45:19.074Z","1.1.2":"2014-01-09T19:03:37.632Z","1.1.3":"2014-09-29T19:16:05.752Z"},"author":{"name":"Markus Kohlhase","email":"mail@markus-kolhase.de"},"repository":{"type":"git","url":"https://github.com/flosse/node-7f"},"homepage":"https://github.com/flosse/node-7f","bugs":{"url":"https://github.com/flosse/node-7f/issues"},"license":"GPLv3","readmeFilename":"README.markdown"}