Skip to content
Snippets Groups Projects
Commit 56e833ec authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent 7a8b2866
No related branches found
No related tags found
No related merge requests found
...@@ -39,21 +39,21 @@ name.copy(buf2,60,0,name.length); ...@@ -39,21 +39,21 @@ name.copy(buf2,60,0,name.length);
var laenge_name = name.length; var laenge_name = name.length;
buf2.writeUInt32BE(0x80000040, 0); //Fragment header and data size buf2.writeUInt32BE(0x80000040, 0); //Fragment header and data size
xid_ID.copy(buf2,4,0,4); xid_ID.copy(buf2,4,0,4);
buf2.writeUInt32BE(0x00000000, 8); // Message type call buf2.writeUInt32BE(0x00000000, 8); // Message type call
buf2.writeUInt32BE(0x00000002, 12);// RPC Version 2 buf2.writeUInt32BE(0x00000002, 12);// RPC Version 2
buf2.writeUInt32BE(0x000607af, 16);// Device core buf2.writeUInt32BE(0x000607af, 16);// Device core
buf2.writeUInt32BE(0x00000001, 20);// Device coe version buf2.writeUInt32BE(0x00000001, 20);// Device coe version
buf2.writeUInt32BE(0x0000000a, 24);// create link/oder oder buf2.writeUInt32BE(0x0000000a, 24);// create link/oder oder
buf2.writeUInt32BE(0x00000000, 28);// credentials buf2.writeUInt32BE(0x00000000, 28);// credentials
buf2.writeUInt32BE(0x00000000, 32);// credentials buf2.writeUInt32BE(0x00000000, 32);// credentials
buf2.writeUInt32BE(0x00000000, 36);// verifier buf2.writeUInt32BE(0x00000000, 36);// verifier
buf2.writeUInt32BE(0x00000000, 40);// verifier buf2.writeUInt32BE(0x00000000, 40);// verifier
buf2.writeUInt32BE(0x63890750, 44);// client ID !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! buf2.writeUInt32BE(0x63890750, 44);// client ID !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
buf2.writeUInt32BE(0x00000000, 48);// no lock device buf2.writeUInt32BE(0x00000000, 48);// no lock device
buf2.writeUInt32BE(0x000007d0, 52);// lock time out 2000 buf2.writeUInt32BE(0x000007d0, 52);// lock time out 2000
buf2.writeUInt32BE(laenge_name, 56);// device name len buf2.writeUInt32BE(laenge_name, 56);// device name len
// buf2.writeUInt32BE(0x696e7374, 60);// device name // buf2.writeUInt32BE(0x696e7374, 60);// device name
// buf2.writeUInt32BE(0x30000000, 64);// device name + fill bytes // buf2.writeUInt32BE(0x30000000, 64);// device name + fill bytes
//------------------------net--clink--------------------------- //------------------------net--clink---------------------------
...@@ -72,23 +72,24 @@ var laenge_name = name.length; ...@@ -72,23 +72,24 @@ var laenge_name = name.length;
var er2; var er2;
//console.log('core_channel data: ' + data.toString()); //console.log('core_channel data: ' + data.toString());
console.log('core_channel data: ' + utils.inspect(data)); console.log('core_channel data: ' + utils.inspect(data));
data.copy(buf_8,0,4,8); data.copy(buf_8,0,4,8);
console.log(buf_8); console.log(buf_8);
console.log(buf_3); console.log(buf_3);
er1=buf_8.readInt32BE (0); er1=buf_8.readInt32BE (0);
er2=xid_ID.readInt32BE (0); er2=xid_ID.readInt32BE (0);
//------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------
data.copy(buf_link_ID,0,32,36);
data.copy(buf_link_ID,0,32,36);
console.log('Ausgabe link buffer 5: '+ buf_link_ID); console.log('Ausgabe link buffer 5: '+ buf_link_ID);
link[5]= buf_link_ID.readInt32BE (0); link[5]= buf_link_ID.readInt32BE (0);
console.log('Ausgabe link 5: '+link[5]); console.log('Ausgabe link 5: '+link[5]);
//------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------
console.log('buf_8: '+er1); console.log('buf_8: '+er1);
console.log('xid_temp: '+er2); console.log('xid_temp: '+er2);
if (er1 == er2){ if (er1 == er2){
...@@ -108,11 +109,11 @@ var laenge_name = name.length; ...@@ -108,11 +109,11 @@ var laenge_name = name.length;
// clink.end(); // clink.end();
}); });
link[2].on('end', function() { link[2].on('end', function() {
console.log('link disconnected'); console.log('link disconnected');
}); });
//------------------------net--clink--------------------------- //------------------------net--clink---------------------------
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment