npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rf1996

v1.2.6

Published

Ironlogic RF1996 (Z2-USB 1996) library wrapper for Node.js.

Downloads

3

Readme

rf1996

IronLogic RF1996 (Z2-USB 1996) library wrapper for Node.js. Works on Windows and supports 32bit Node.js only, due to library's restrictions.

Installation


$ npm install rf1996

Methods

.open(port, callback)

Establishes connection with rf1996. Executes callback after method execution. Error (if any) is passed to the callback as an argument.

.device()

Reads connected device info.

.read()

Reads card data.

.write(object)

Writes EmMarine data to a card. Returns an object with information about operation's status. Expects first argument to be an object.


	// Object example
	// Writes [0099] 125,00123
	{
		brackets: 99,
		group: 125,
		decimal: 123
	}

.clear()

Wipes out data from a card.

Example usage


const rf1996 = require('rf1996');
rf1996.open('COM5', function(err) { // Open device connected to certain COM port
	var val = null;
	if(!err) {
		var device = rf1996.device(); // Read connected device info
		console.log(device);
		/*
			Example output: { 
				port: '\\\\.\\COM5',
				device: 'Adapter RF-1996-125 Khz',
				serial: '820',
				model: '2081',
				firmware: '418',
				license: 'License 01.01.2016',
				cards: '10'
			}
		*/

		rf1996.clear();

		rf1996.write({ // Writes [0099] 125,00123
			brackets: 99,
			group: 125,
			decimal: 123
		});

		setInterval(function() {
			var data = rf1996.read(); // Read card data
			if(data.emMarine != val && data.emMarine != '[0000] 000,00000') {
				val = data.emMarine;
				console.log(data);
				/*
					Example output: { 
						card: 'Temic protected by password',
						temic: 'b3 c5 da 4F fc b2 aa b5 ',
						emMarine: '[0000] 000,00582',
						locksLimit: '1',
						locks: '0',
						battery: 'Discharged'
					}
				*/ 
			} else if(data.emMarine != val && data.emMarine == '[0000] 000,00000' && val != null) {
				val = data.emMarine;
				console.log('No card');
			}
		}, 1000);
	} else {
		console.log(err);
	}
});

License

This is only a wrapper for Ironlogic's RF1996 library from their publicly distributed SDK. All rights for the library belong to IronLogic company and other respective owners.