Created
December 4, 2016 14:55
-
-
Save hatzel/abb3ea759f564ab46be8f2cab3f278c5 to your computer and use it in GitHub Desktop.
When executing this in the examples directory of node-dbus you can observe incorrect datatypes being sent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DBus = require('../'); | |
var dbus = new DBus(); | |
function Type(signature, name) { | |
return { type: signature, name: name }; | |
} | |
var service = dbus.registerService('session', 'test.lol'); | |
var obj = service.createObject('/test/lol'); | |
var iface1 = obj.createInterface('test.lol.i1'); | |
iface1.addProperty('byte', { | |
type: Type('d', 'some_double'), | |
getter: function(callback) { | |
callback(1.0); | |
} | |
}); | |
iface1.addProperty('uint32', { | |
type: Type('d', 'some_double'), | |
getter: function(callback) { | |
callback(257.0); | |
} | |
}); | |
iface1.addProperty('double', { | |
type: Type('d', 'some_double'), | |
getter: function(callback) { | |
callback(257.5); | |
} | |
}); | |
iface1.update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment